<?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>28537</bug_id>
          
          <creation_ts>2015-04-22 16:41:38 +0000</creation_ts>
          <short_desc>[FO30] [FO31] Examples on fn:element-with-id uses fn:id and is not aligned with accompanying text</short_desc>
          <delta_ts>2015-05-06 01:21:14 +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>Functions and Operators 3.1</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          <cc>jim.melton</cc>
          
          <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>119757</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-22 16:41:38 +0000</bug_when>
    <thetext>Under Examples, under 14.7.2 fn:element-with-id (FO30) and 14.5.2 fn:element-with-id (FO31) the text presently reads (numbering mine):

1) The expression id(&apos;ID21256&apos;)/name() returns &quot;employee&quot;. (The xml:id 
   attribute has the is-id property, so the employee element is selected.).

2) The expression id(&apos;E21256&apos;)/name() returns &quot;employee&quot;. (Assuming the
   empnr element is given the type xs:ID as a result of schema validation, 
   the element will have the is-id property and is therefore its parent is 
   selected. Note the difference from the behavior of fn:id.).

Text of (1) is technically correct, but the section is about fn:element-with-id, not about fn:id. Replacing id(&apos;ID21256&apos;)/name() with element-with-id(&apos;ID21256&apos;)/name() seems to make more sense.

Text of (2) is technically wrong, as id(...) returns the element with is-id property, not its parent. Replacing id(...) with element-with-id(...) fixes this.

And a suggestion: I noticed that fn:idref does not have any example. Not a big deal, but the indirection of this function, and the same question as with fn:id vs fn:element-with-id (i.e., does it select its parent or the attribute/element with is-idref property) seems to warrant one ;).

PS: I filed this bug under FO30, but it applies equally to FO31 as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119772</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-22 22:34:06 +0000</bug_when>
    <thetext>Reclassified as FO31 to ensure it gets on the agenda.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120087</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-05-05 17:42:43 +0000</bug_when>
    <thetext>The changes were accepted and have been applied.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120122</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-05-06 01:21:14 +0000</bug_when>
    <thetext>Thanks, I&apos;ll close the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>