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

    Details

    • Subcomponent:
    • Resolved In Build:
      1.4
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: