[
https://issues.apache.org/jira/browse/XERCESJ-1731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mukul Gandhi resolved XERCESJ-1731.
-----------------------------------
Assignee: Mukul Gandhi
Resolution: Fixed
The fix for this issue, has been committed with SVN revision 1894472.
> XML Schema validation error message improvements, when XML attributes are
> validated
> -----------------------------------------------------------------------------------
>
> Key: XERCESJ-1731
> URL: https://issues.apache.org/jira/browse/XERCESJ-1731
> Project: Xerces2-J
> Issue Type: Improvement
> Components: XML Schema 1.0 Structures, XML Schema 1.1 Structures
> Affects Versions: 2.12.1
> Reporter: Mukul Gandhi
> Assignee: Mukul Gandhi
> Priority: Minor
>
> I've been using the following XML Schema validation example, for this issue.
> XML Schema document,
> <?xml version="1.0"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified"
> targetNamespace="http://ns0">
> <xs:element name="X">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="a" type="xs:string"/>
> </xs:sequence>
> <xs:attribute name="att1" type="xs:integer" use="required"/>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> XML instance document, that's validated with above mentioned XML Schema
> document,
> <?xml version="1.0"?>
> <X xmlns="http://ns0" att1="105">
> <a>hello</a>
> </X>
> Upon doing, above mentioned XML Schema validation, XercesJ currently produces
> following two error messages,
> cvc-complex-type.3.2.2: Attribute 'att1' is not allowed to appear in element
> 'X'.
> cvc-complex-type.4: Attribute 'att1' must appear on element 'X'.
> I find, above mentioned error messages little bit confusing.
> I propose that, the second error message cited above should contain namespace
> information as well, something like following,
> cvc-complex-type.4: Attribute 'att1' belonging to namespace 'http://ns0',
> must appear on element 'X'.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]