Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6943252

Schema compiler allows to use value of fractionDigits that is more than allowed by base type

XMLWordPrintable

    • 1.4
    • generic
    • generic
    • Verified

        The specification (http://www.w3.org/TR/xmlschema-2) states:
        [Definition:]
        1) byte is derived from short
        2) short is derived from int and so on ....
        that is derived from decimal by fixing the value of fractionDigits to be 0 and disallowing the trailing decimal point.

        The piece of code that compiles attached "negative" schemas from W3C test suite
        ----------------
         SchemaFactory sf = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
         sf.setErrorHandler(errorCollector);
         Schema schema = sf.newSchema( new File("byte_fractionDigits004.xsd"));
        ----------------
        does not throw SAXException as expected.

              joehw Joe Wang
              lkuskov Leonid Kuskov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: