<?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>1527</bug_id>
          
          <creation_ts>2005-07-09 19:12:53 +0000</creation_ts>
          <short_desc>Grammar for abbreviated step</short_desc>
          <delta_ts>2005-07-20 17:15:35 +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>XPath 2.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Don Chamberlin">chamberl</reporter>
          <assigned_to name="Don Chamberlin">chamberl</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>4467</commentid>
    <comment_count>0</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-07-09 19:12:53 +0000</bug_when>
    <thetext>The syntax for an abbreviated step now looks like this:

AbbrevForwardStep ::= &quot;@&quot;? NodeTest
NodeTest ::= KindTest | NameTest

This allows users to write silly things like this:

@comment()

which looks for a comment node on the attribute axis.
Of course, there is nothing on the attribute axis but attribute nodes, so there 
is no need for a KindTest following &quot;@&quot; in an abbreviated step.

We could eliminate this kind of silliness by changing the grammar as follows:

AbbrevForwardStep ::= NodeTest | &quot;@&quot; NameTest
NodeTest ::= KindTest | NameTest</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4491</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-07-10 08:14:19 +0000</bug_when>
    <thetext>Please note that XPath 1.0 did not have any &quot;natural&quot; way of expressing an empty
node-set. It is therefore customary for XSLT 1.0 users wanting an empty node-set
(e.g. as a parameter to a template) to write expressions that are guaranteed to
select nothing, such as &quot;/..&quot; or &quot;@comment()&quot;. The former is actually
recommended in the XSLT 1.0 specification, and the latter is suggested in at
least one book.

Michael Kay</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4879</commentid>
    <comment_count>2</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-07-19 16:54:51 +0000</bug_when>
    <thetext>On further thought, it occurs to me that a kind test in the abbreviated syntax 
can be used to search for attributes of a particular type, as in this example:

@attribute(*, xs:date) 

This use case, together with Mike Kay&apos;s comments, prompts me to withdraw my 
suggestion for a syntax change. If no one objects, I will mark this comment as 
closed with a resolution of &quot;WONTFIX&quot;.

--Don C.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5006</commentid>
    <comment_count>3</comment_count>
    <who name="Scott Boag">scott_boag</who>
    <bug_when>2005-07-20 14:52:48 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; @attribute(*, xs:date) 

I&apos;m not sure what the &quot;@&quot; buys you here.  Why is that different from simply 
    attribute(*, xs:date)
?

FYI, I&apos;ve tested your proposal and it works fine.  But maybe we should go ahead
and leave it alone, since it would be another XPath 1.0 incompatibility, which I
would like to avoid.

-scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5010</commentid>
    <comment_count>4</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2005-07-20 17:14:38 +0000</bug_when>
    <thetext>On July 20, 2005, the Query and XSLT working groups voted to close this comment 
without change to specifications.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>