<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5640</bug_id>
          
          <creation_ts>2008-04-12 14:15:59 +0000</creation_ts>
          <short_desc>[XQuery] Typed value of a node</short_desc>
          <delta_ts>2008-04-12 18:09:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/xquery/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mukul Gandhi">mukul_gandhi</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>19792</commentid>
    <comment_count>0</comment_count>
    <who name="Mukul Gandhi">mukul_gandhi</who>
    <bug_when>2008-04-12 14:15:59 +0000</bug_when>
    <thetext>In the XQuery 1.0 document, http://www.w3.org/TR/xquery/, it&apos;s mentioned:

Section: 2 Basics
The typed value of a node is a sequence of zero or more atomic values.

I am confused about this statement. Could somebody please help me understand this.

For e.g., if the XML document is:

&lt;root&gt;
  &lt;x id=&quot;attrVal&quot;&gt;
    &lt;y&gt;123&lt;/y&gt;
  &lt;/x&gt;
&lt;/root&gt;

Then what is the typed value of element node, say &lt;x&gt; according to this definition?

Regards,
Mukul</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19793</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-04-12 14:39:01 +0000</bug_when>
    <thetext>If there is no schema or the schema defines x as having mixed content, then the typed value is &quot;123&quot; (with some surrounding whitespace unless you chose to remove it), as an instance of xs:untypedAtomic. If the schema defines x as having element-only content, then attempting to get the typed value throws an error. This is explained in bullet 4 of the section that you refer to, which itself is a summary of the rules given in the XDM data model specification.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19794</commentid>
    <comment_count>2</comment_count>
    <who name="Mukul Gandhi">mukul_gandhi</who>
    <bug_when>2008-04-12 18:09:53 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; If there is no schema or the schema defines x as having mixed content, then the
&gt; typed value is &quot;123&quot; (with some surrounding whitespace unless you chose to
&gt; remove it), as an instance of xs:untypedAtomic. If the schema defines x as
&gt; having element-only content, then attempting to get the typed value throws an
&gt; error. This is explained in bullet 4 of the section that you refer to, which
&gt; itself is a summary of the rules given in the XDM data model specification.
&gt; 

Thanks, Mike for the explanation. It helps me.

Regards,
Mukul</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>