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

XML Schema 1.1: should not accept "fractionDigits" as a valid facet for precisionDecimal.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.1
    • 2.10.0
    • None

    Description

      "fractionDigits" should not be a valid facet for precisionDecimal.

      Example

      XSD:

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

      <simpleType name="decDigits">
      <restriction base="precisionDecimal">
      <fractionDigits value="6"/>
      </restriction>
      </simpleType>

      <element name="root">
      <complexType>
      <sequence>
      <element name="elDigits" type="si:decDigits"/>
      </sequence>
      </complexType>
      </element>

      </schema>

      XML:

      <?xml version="1.0" encoding="UTF-8"?>
      <insi:root xmlns:insi="http://www.schemaTest.org/schema11"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.schemaTest.org/schema11
      test_fractiondigits.xsd">

      <elDigits>1.23456</elDigits>

      </insi:root>

      Suggestion.

      Add verification when we apply facet. Please verify the attached 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: