- From: Josh Spiegel <josh.spiegel@oracle.com>
- Date: Mon, 14 Dec 2015 07:16:49 -0800 (PST)
- To: Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
- Cc: Jim Melton <jim.melton@oracle.com>
- Message-ID: <9B7508D4-9457-4260-8196-3D4D0DFCA8B4@oracle.com>
> ACTION A-622-02: Josh Spiegel to propose changes to XQueryX to support > new grammar for empty expressions in braces and return to group with a > proposal. The following XQuery productions were changed so that the enclosed expression is optional: CatchClause, ValidateExpr, OrderedExpr, UnorderedExpr, CompDocConstructor, CompTextConstructor, CompCommentConstructor, CompNamespaceConstructor I looked at other expressions where the enclosed expression is already optional: In computedAttributeConstructor, valueExpr is optional. In computedPIConstructor, piValueExpr is optional. In computedElementConstructor, contentExpr is optional. In extensionExpr, argExpr is optional. So I think the following XQueryX changes are appropriate: - Make argExpr optional in: computedCommentConstructor, computedDocumentConstructor, unorderedExpr, orderedExpr, validateExpr - Make catchExpr optional in catchClause - Make tryClause optional in tryCatchExpr (argExpr is already optional in computedTextConstructor) (uriExpr is already optional in computedNamespaceConstructor) I don't think any changes to the stylesheet are necessary. That should cover optional enclosed expressions. However, the string constructor was recently added and I think we need to add an element to the XQueryX schema: <xsd:complexType name="stringConstructor"> <xsd:complexContent> <xsd:extension base="expr"> <xsd:sequence> <xsd:choice minOccurs="0" maxOccurs="unbounded"> <xsd:element name="stringConstructorChars" type="xsd:string"/> <xsd:element name="stringConstructorInterpolation" type="exprWrapper"/> </xsd:choice> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:element name="stringConstructor" type="stringConstructor" substitutionGroup="expr"/> And we will also need to update the XQueryX stylesheet: <xsl:template match="xqx:stringConstructor"> <xsl:text>``[</xsl:text> <xsl:apply-templates/> <xsl:text>]``</xsl:text> </xsl:template> <xsl:template match="xqx:stringConstructorInterpolation"> <xsl:text>`{</xsl:text> <xsl:apply-templates/> <xsl:text>}`</xsl:text> </xsl:template> <xsl:template match="xqx:stringConstructorChars"> <xsl:value-of select="."/> </xsl:template> I have applied these changes to a local copy of the specification (diffs attached). Thanks, Josh
Attachments
- text/html attachment: stored
- text/html attachment: xquerx.xsd.dif.html
- text/html attachment: stored
- text/html attachment: xqueryx-CDATA.xsl.xml.dif.html
- text/html attachment: stored
Received on Monday, 14 December 2015 15:17:45 UTC