This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
There seems to be a small anomaly concering xqx:computedPIConstructor. The schema allows the piValueExpr to be omitted: <xsd:complexType name="computedPIConstructor"> <xsd:complexContent> <xsd:extension base="expr"> <xsd:sequence> <xsd:choice> <xsd:element name="piTarget" type="xsd:NCName"/> <xsd:element name="piTargetExpr" type="exprWrapper"/> </xsd:choice> <xsd:element name="piValueExpr" type="exprWrapper" minOccurs="0"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> The stylesheet for xqx:computedPIConstructor, on the other hand, does not take any special action when it is omitted: <xsl:template match="xqx:computedPIConstructor"> <xsl:text> processing-instruction </xsl:text> <xsl:value-of select="xqx:piTarget"/> <xsl:apply-templates select="xqx:piTargetExpr"/> <xsl:apply-templates select="xqx:piValueExpr"/> </xsl:template> This means that the following XQueryX document is accepted by the schema: <?xml version="1.0"?> <xqx:module xmlns:xqx="http://www.w3.org/2005/XQueryX" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2005/XQueryX http://www.w3.org/2005/XQueryX/xqueryx.xsd"> <xqx:mainModule> <xqx:queryBody> <xqx:elementConstructor> <xqx:tagName>elem</xqx:tagName> <xqx:elementContent> <xqx:computedPIConstructor> <xqx:piTarget>pi</xqx:piTarget> </xqx:computedPIConstructor> </xqx:elementContent> </xqx:elementConstructor> </xqx:queryBody> </xqx:mainModule> </xqx:module> The stylesheet transforms this into the following, which is not a valid XQuery: <elem>{ processing-instruction pi}</elem> Either the xqx:piValueExpr should be made mandatory, or the stylesheet should generate an additional "{}" when it is omitted.
Thanks for this bug report. The XQueryX stylesheet has been revised so that the braces are output unconditionally instead of only when the XQueryX document specifies a value for the PI constructor. Since this would appear to completely resolve your comment, you are requested to mark this bug CLOSED at your earliest convenience.