This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It's possible to define a decimalFormatDecl which is both the default (@default = 'true') and has a name. This isn't possible in XQuery. I'd argue that the "default" attribute here is redundant. Absence of the decimalFormatName is enough to indicate that it is the declaration for the default decimal format.
It is true that the XQueryX schema permits both a "name" child element and a "default" attribute with a value of 'true' to both be specified in the same decimalFormatDecl element. However, any attempt to transform such a decimalFormatDecl element to XQuery syntax will generate an error: <xsl:template match="xqx:decimalFormatDecl"> <xsl:if test="@xqx:default = 'true' and xqx:decimalFormatName"> <xsl:message terminate="yes">Incorrect XQueryX: xqx:decimalFormatDecl does not allow both @default=true and xqx:decimalFormatName</xsl:message> </xsl:if> <xsl:text>declare </xsl:text> <xsl:if test="@xqx:default = 'true'"> <xsl:text>default </xsl:text> </xsl:if> <xsl:text>decimal-format </xsl:text> <xsl:if test="xqx:decimalFormatName"> <xsl:apply-templates select="xqx:decimalFormatName"/> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates select="xqx:decimalFormatParam"/> </xsl:template> Nonetheless, your point is taken and I have modified the XQueryX schema accordingly: <xsd:complexType name="decimalFormatDeclType"> <xsd:sequence> <xsd:element name="decimalFormatName" type="EQName" minOccurs="0"/> <xsd:element name="decimalFormatParam" minOccurs="0" maxOccurs="unbounded"> <xsd:complexType> <xsd:sequence> <xsd:element name="decimalFormatParamName"> <xsd:simpleType> <xsd:restriction base="xsd:NMTOKEN"> <xsd:enumeration value="decimal-separator"/> <xsd:enumeration value="grouping-separator"/> <xsd:enumeration value="infinity"/> <xsd:enumeration value="minus-sign"/> <xsd:enumeration value="NaN"/> <xsd:enumeration value="percent"/> <xsd:enumeration value="per-mille"/> <xsd:enumeration value="zero-digit"/> <xsd:enumeration value="digit"/> <xsd:enumeration value="pattern-separator"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="decimalFormatParamValue" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> I've marked this bug RESOLVED/FIXED. If you agree, please mark it CLOSED.
Thanks. I'm happy that this resolves the problem.
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.