[Bug 20876] [XQX30] decimalFormatDecl

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20876

Jim Melton <jim.melton@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Jim Melton <jim.melton@acm.org> ---
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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 17 March 2013 22:58:01 UTC