Bug 20864 - [XQX30] Annotation arguments
[XQX30] Annotation arguments
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 3.0
Candidate Recommendation
PC Windows NT
: P2 normal
: ---
Assigned To: Jim Melton
Mailing list for public feedback on specs from XSL and XML Query WGs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-04 14:30 UTC by Tim Mills
Modified: 2013-11-19 00:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2013-02-04 14:30:44 UTC
XQueryX annotations allows expressions as arguments, rather than restricting the arguments to be literals.

  <xsd:complexType name="annotation">
    <xsd:sequence>
      <xsd:element name="annotationName" type="EQName"/>
      <xsd:element name="arguments" type="exprList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>
Comment 1 Jim Melton 2013-03-17 22:43:16 UTC
You are quite right.  One could say that this is not an error, because we already know that it is possible to write certain XQueryX expressions that cannot be transformed to correct XQuery expressions and that cannot be caught by validating the XQueryX document against the XQueryX schema. 

However, this problem was not difficult to fix, so I have done so.  Henceforward,

  <xsd:complexType name="annotation">
    <xsd:sequence>
      <xsd:element name="annotationName" type="EQName"/>
      <xsd:element name="arguments" type="exprList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

is:

  <xsd:complexType name="annotation">
    <xsd:sequence>
      <xsd:element name="annotationName" type="EQName"/>
      <xsd:element name="arguments" type="literalList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

and:

  <xsd:complexType name="literalList">
    <xsd:sequence>
      <xsd:element ref="constantExpr" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>


Thanks for observing this problem!

I've marked this bug as RESOLVED/FIXED.  If you agree, please mark it CLOSED.
Comment 2 Tim Mills 2013-05-07 16:16:08 UTC
Thanks.  I'm happy that this resolves the problem.
Comment 3 Jim Melton 2013-11-19 00:16:48 UTC
The author of the original bug report agrees that it has been resolved to his satisfaction.  The fact that it was not marked CLOSED at the time was accidental, so I am marking it CLOSED now.