This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10134 - $err:description should be optional
Summary: $err:description should be optional
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://w3.org/TR/xslt-21/#try-catch
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-11 21:56 UTC by Florent Georges
Modified: 2010-12-02 11:46 UTC (History)
0 users

See Also:


Attachments

Description Florent Georges 2010-07-11 21:56:40 UTC
In an xsl:catch, several variables are automatically bound, to
access error details (err:code, err:description, etc.)[1] The
type of err:description is defined to be xs:string.  What is it
supposed to be bound to in the following case (i.e. when invoking
error() without any description string):

    <xsl:try select="error(QName('ns', 'code'))">
       <xsl:catch>
          <xsl:value-of select="$err:description"/>
       </xsl:catch>
    </xsl:try>

  Note that XQuery 1.1 defines the equivalent variable (in its
own grammar) to be of kind xs:string?, so optional.  My humble
opinion is that XQuery is correct here.
Comment 1 Michael Kay 2010-07-16 16:40:09 UTC
Agreed, this needs to be fixed. (Not formally discussed by the WG, but discussed by some WG members after the close of the meeting).
Comment 2 Michael Kay 2010-12-02 11:46:06 UTC
Change applied.