Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.7.0
-
None
-
Windows XP
Description
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.