Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1435

XML Schema 1.1: support special value (NaN) for precisionDecimal in enumeration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 2.9.1
    • None
    • None

    Description

      schema doesn't support NaN in enumeration for precisionDecimal.

      example:

      XSD

      <?xml version="1.0"?>
      <schema xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://www.schemaTest.org/schema11"
      xmlns:sv="http://www.schemaTest.org/schema11">

      <simpleType name="pSpecial">
      <restriction base="precisionDecimal">
      <enumeration value="INF"/>
      <enumeration value="NaN"/>
      </restriction>
      </simpleType>

      <element name="root">
      <complexType>
      <sequence>
      <element name="Special1" type="sv:pSpecial" minOccurs="1" maxOccurs="unbounded"/>
      </sequence>
      </complexType>
      </element>
      </schema>

      XML
      <?xml version="1.0" encoding="UTF-8"?>
      <dv:root xmlns:dv="http://www.schemaTest.org/schema11"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.schemaTest.org/schema11
      test_NAN.xsd">
      <Special1>NaN</Special1>
      <Special1>INF</Special1>
      </dv:root>

      suggestion:

      simply add one condition when verify enumeration members. Please verify the patch. Thanks.

      Attachments

        Activity

          People

            knoaman@ca.ibm.com Khaled Noaman
            kunxu Kun Xu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: