-
Bug
-
Resolution: Fixed
-
P3
-
7
-
1.4
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2206353 | 7 | Joe Wang | P3 | Closed | Fixed | b134 |
Attached a group of invalid test cases (schema + xml document). Validator interprets all of them as valid pairs.
Example of schema:
<xsd:element name="doc">
<xsd:complexType>
<xsd:choice>
<xsd:element name="elem" type="Regex" minOccurs="1" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="Regex">
<xsd:restriction base="xsd:string">
<xsd:pattern value=""/>
</xsd:restriction>
</xsd:simpleType>
The following xml document is valid for this schema:
<?xml version="1.0"?>
<doc xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='reA2.xsd' >
<!--
base='string', pattern='', value='a', type='invalid', RULE='1'
-->
<elem>a</elem>
</doc>
Example of schema:
<xsd:element name="doc">
<xsd:complexType>
<xsd:choice>
<xsd:element name="elem" type="Regex" minOccurs="1" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="Regex">
<xsd:restriction base="xsd:string">
<xsd:pattern value=""/>
</xsd:restriction>
</xsd:simpleType>
The following xml document is valid for this schema:
<?xml version="1.0"?>
<doc xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='reA2.xsd' >
<!--
base='string', pattern='', value='a', type='invalid', RULE='1'
-->
<elem>a</elem>
</doc>
- backported by
-
JDK-2206353 Validator incorrectly interprets an empty regex pattern
- Closed