Wrong error info is reported when using a bad tag in a sequence
---------------------------------------------------------------
Key: XERCESC-1724
URL: https://issues.apache.org/jira/browse/XERCESC-1724
Project: Xerces-C++
Issue Type: Bug
Components: Validating Parser (Schema) (Xerces 1.5 or up only)
Affects Versions: 2.7.0
Environment: Windows XP
Reporter: Bill Yan
Define a schema and use a bad tag in the sequence like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="myTYpe">
<xs:sequence id="abc" maxOccurs="1" minOccurs="1">
<xs:badtag/>
</xs:sequence>
</xs:complexType>
</xs:schema>
when using XercesDOMParser::loadGrammar() to check the validity of this schema
file, the following error info is reported:
"Warning generated during parsing, 'badtag' is not allowed for the content of a
'choice' model group. Only element, group, choice, sequence and any are
allowed. - Line 5, Col 25",
I think this is wrong, because "sequence" is used in the schema file instead of
"choice", so the expected error info should be like this:
"Warning generated during parsing, 'badtag' is not allowed for the content of a
'sequence' model group..... - Line 5, Col 25".
I tried to change "sequence" to "all" and "choice", the error info is reported
correctly.
--
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]