Failed to report IDREF binding error.
--------------------------------------
Key: XERCESJ-1439
URL: https://issues.apache.org/jira/browse/XERCESJ-1439
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema 1.1 Structures
Affects Versions: 2.9.1
Reporter: Kun Xu
Priority: Minor
Fix For: 2.10.0
Failed to report IDREF binding error.
Example
XSD:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ids">
<xs:attribute name="id_attr" type="xs:ID" default="zxc"/>
<xs:attribute name="idref_attr" type="xs:IDREF" default="zxc"/>
<xs:assert test="//@id_attr = 'abc'"/>
<xs:assert test="//@idref_attr = 'zxc'"/>
</xs:complexType>
<xs:element name="root" type="ids"/>
</xs:schema>
XML:
<?xml version="1.0"?>
<root xsi:noNamespaceSchemaLocation="test_idref.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id_attr="abc"/>
Suggestion:
Should checks IDREF binding before we applies default attribute. Please
verify the attached patch. Thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]