Bug 7053 - [XQX11] cannot represent a catchErrorList wildcard in XQueryX
Summary: [XQX11] cannot represent a catchErrorList wildcard in XQueryX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2009-06-23 20:16 UTC by Andrew Eisenberg
Modified: 2009-11-02 19:59 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Eisenberg 2009-06-23 20:16:42 UTC
tryCatchExpr is defined as follows:

[169]    TryCatchExpr     ::=    TryClause CatchClause+
[170]    TryClause        ::=    "try" "{" TryTargetExpr "}"
[171]    TryTargetExpr    ::=    Expr
[172]    CatchClause      ::=    "catch" CatchErrorList CatchVars? "{" Expr "}"
[173]    CatchErrorList   ::=    NameTest ("|" NameTest)*

We also say:

[102]    NameTest         ::=    QName | Wildcard

This allows expressions such as:

try {1} catch * {2}

In XQueryX 1.1 we see:

<!-- CatchErrorList (part of the TryCatchExpression)     -->
<!-- Corresponds to the following XQuery syntax          -->
<!-- CatchErrorList ::=                                  -->
<!--       NameTest ( "|" NameTest )*                    -->

  <xsd:complexType name="catchErrorList">
      <xsd:element ref="nameTest" maxOccurs="unbounded"/>

  <xsd:element name="catchErrorList" type="catchErrorList"/>

We also see:

  <xsd:element name="nameTest" type="QName"/>

I don't believe that we can represent the query above in XQueryX 1.1. xqx:catchErrorList needs to be able to contain xqx:Wildcard.
Comment 1 Jim Melton 2009-09-06 20:31:47 UTC
Good catch!  Thanks for finding this.  I have modified both the XQueryX 1.1 schema and the corresponding stylesheet to support wildcards in addition to QNames within the errlist.  As a result, I'm marking this bug RESOLVED/FIXED.  If you agree with the solution (which you can find in member CVS at the usual place), please mark the bug CLOSED.