<?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>3757</bug_id>
          
          <creation_ts>2006-09-21 03:45:54 +0000</creation_ts>
          <short_desc>[FS] technical: 2.3.1 ElementValue</short_desc>
          <delta_ts>2007-11-04 06:00:05 +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>Formal Semantics 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Dyck">jmdyck</reporter>
          <assigned_to name="Michael Dyck">jmdyck</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>11930</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-09-21 03:45:54 +0000</bug_when>
    <thetext>2.3.1 / -- / para 4,5,6
&quot;Element nodes have a type annotation and contain a complex value or a
simple value. ... A simple value is a sequence of atomic values. A complex
value is a sequence of attribute nodes followed by a sequence of element,
text, comment, or processing-instruction nodes.&quot;

    First, this definition doesn&apos;t support the following example from
    2.3.2:
          element weight of type xs:integer {
            attribute xsi:type of type xs:QName {
              &quot;xs:integer&quot; of type xs:QName
            },
            42 of type xs:integer
          }
    (An attribute node followed by an atomic value doesn&apos;t satisfy the
    definition for &apos;complex value&apos; or &apos;simple value&apos;.)

    More generally, what is the mapping between FS ElementValues and XDM
    ElementNodes? In particular, if an FS ElementValue V represents an
    XDM Element Node N, then what does V&apos;s inner Value represent, with
    respect to N? It seems that sometimes it represents the concatenation
    of N&apos;s &apos;attributes&apos; and &apos;children&apos; properties, and sometimes it
    represents the concatenation of N&apos;s &apos;attributes&apos; and &apos;typed-value&apos;
    properties. (The above example is an instance of the latter.) I think
    this is non-obvious enough that it should be spelled out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12043</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-09-26 14:59:05 +0000</bug_when>
    <thetext>Michael,

That example is interesting. Here it corresponds to the fact
that XML Schema allows complextype with simple content. I believe
we are aligned with that I.e., you will find atomic values in the
content iff the type has simple content.

We may be better of sticking to XML Schema&apos;s terminology here, I don&apos;t
think there is something wrong with the spec as is, but some clarifications
could be added.

Being that late in the process, specific suggested text would be
greatly appreciated.

Best,
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12056</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-09-26 16:01:35 +0000</bug_when>
    <thetext>Michael,
The XLST and XML Query Working Groups have considered that comment and decided to re-classify it as editorial.
Further comments and suggestions on this thread would be greatly appreciated.
Best,
- Jerome
On behalf of the XSLT and XML Query WGs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12214</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-09-30 06:57:12 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; 
&gt; I don&apos;t think there is something wrong with the spec as is

So you don&apos;t think the disagreement between definitions and example constitutes something wrong with the spec?

&gt; Being that late in the process, specific suggested text would be
&gt; greatly appreciated.

Well, you could change &quot;contain a complex value or a simple value&quot; to &quot;contain a sequence of attribute nodes followed by either a complex value or a simple value&quot;, and drop the attribute stuff from the defn of complex value. Note that &quot;complex value&quot; isn&apos;t used anywhere else, so there isn&apos;t a problem with changing its definition. That should take care of the definition/example disagreement.

Not sure about the general mapping though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12222</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-10-01 02:13:50 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt;
&gt;     In particular, if an FS ElementValue V represents an
&gt;     XDM Element Node N, then what does V&apos;s inner Value represent, with
&gt;     respect to N? It seems that sometimes it represents the concatenation
&gt;     of N&apos;s &apos;attributes&apos; and &apos;children&apos; properties, and sometimes it
&gt;     represents the concatenation of N&apos;s &apos;attributes&apos; and &apos;typed-value&apos;
&gt;     properties.

That fact that an V&apos;s inner Value doesn&apos;t represent N&apos;s &apos;children&apos; and &apos;typed-value&apos; properties at the same time is a serious problem, I think, because  V might occur in a context that wants the property that isn&apos;t represented. For instance, consider the post-validation V referred to above:

    element weight of type xs:integer {
      attribute xsi:type of type xs:QName {
        &quot;xs:integer&quot; of type xs:QName
      },
      42 of type xs:integer
    }

If you apply an axis step like child::node() to V, you&apos;ll get an empty sequence, because V does not contain any child NodeValues. But presumably it should yield a TextValue (i.e., text { &quot;42&quot; }), because the corresponding N does (still) have a Text Node in its &apos;children&apos; property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13090</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2006-12-07 06:55:45 +0000</bug_when>
    <thetext>This problem is not resolved in the PR, which I believe is a serious shortcoming: if there isn&apos;t a well-defined correspondence between the XQuery/XPath Data Model and the objects that the FS manipulates, then there&apos;s a good chance that the semantics the FS defines are not the semantics of XQuery/XPath.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14207</commentid>
    <comment_count>6</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-02-26 00:15:31 +0000</bug_when>
    <thetext>The complete fix for this bug does not appear in the Recommendation of 23 January 2007.  It will be considered for a future publication (either an Errata document or some possible future version of the specification). </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>