United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8015243 : SchemaFactory does not catch enum. value that is not in the value space of the base type, anyURI.

Details
Type:
Bug
Submit Date:
2010-04-08
Status:
Resolved
Updated Date:
2014-02-12
Project Name:
JDK
Resolved Date:
2013-10-17
Component:
xml
OS:
generic
Sub-Component:
jaxp
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
jaxp_1.5,8
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
Attached schema (anyURI_b006.xsd) holds invalid instance of xs:anyURI. The piece of code that compiles it
----------------
 SchemaFactory sf = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);
 sf.setErrorHandler(errorCollector);
 Schema schema = sf.newSchema( new File("anyURI_b006.xsd"));
----------------
does not throw SAXException:
----------------- 
ERROR] enumeration-valid-restriction: Enumeration value '\\' is not in the value space of the base type, anyURI.
-----------------
as expected.

See also the bug http://www.w3.org/Bugs/Public/show_bug.cgi?id=4048

                                    

Comments
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jaxp/rev/0c3f951630fe
User:  lana
Date:  2013-10-22 16:29:10 +0000

                                     
2013-10-22
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/bc04f561bb78
User:  lana
Date:  2013-10-22 17:23:08 +0000

                                     
2013-10-22
URL:   http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/0c3f951630fe
User:  joehw
Date:  2013-10-17 18:24:25 +0000

                                     
2013-10-17
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/bc04f561bb78
User:  joehw
Date:  2013-10-17 18:57:13 +0000

                                     
2013-10-17
According to https://www.w3.org/Bugs/Public/show_bug.cgi?id=4048, the invalid enumeration value in anyURI_b006 is:  //.  Backslashes are not interpreted as path separators but they are allowed in xs:anyURI values, "file:///c:\foo\bar.jpg" for example, is valid xs:anyURI value.

                                     
2013-10-15
Tested xsd still contains invalid enumeration value: \\
Schema can be loaded by factory.newSchema(new File("anyURI_b006.xsd")) without warnings/errors despite on invalid instance of xs:anyURI
                                     
2013-05-22
EVALUATION

From the last note of http://www.w3.org/Bugs/Public/show_bug.cgi?id=4048, it seems to me the test had been marked invalid, so I think we need to exclude this one from the jck. 

Quote from the last note of bug 4048:
Perhaps we should mark these particular tests as invalid, but add a note saying
the rules are fuzzy.

Decision: mark the expected result as "invalid".
                                     
2010-12-03



Hardware and Software, Engineered to Work Together