[xml] validator bug in libxml2-2.4.23?
- From: Nathan Myers <ncm itasoftware com>
- To: xml gnome org
- Subject: [xml] validator bug in libxml2-2.4.23?
- Date: Tue, 13 Aug 2002 01:13:20 -0400
I think I have encountered a validator bug in libxml2 2.4.23.
With the following XML input:
----------------
<?xml version="1.0"?>
<!DOCTYPE QPXQuery SYSTEM "file:/tmp/fs2.dtd">
<QPXQuery>
<FareSearch>
<SliceItinerarySpec>
</SliceItinerarySpec>
<PaxSpec>
</PaxSpec>
<PricingSpec>
</PricingSpec>
</FareSearch>
</QPXQuery>
----------------
And the following DTD:
----------------
<!ELEMENT QPXQuery
(FareSearch) >
<!ELEMENT FareSearch
(((SliceItinerarySpec|SliceItineraryInfo)+|TripSegmentList),
PaxSpec*,
CustomerSpec?,
PricingSpec?,
OutputSpec?) >
<!ELEMENT SliceItinerarySpec
ANY >
<!ELEMENT SliceItineraryInfo
ANY >
<!ELEMENT TripSegmentList
ANY >
<!ELEMENT PaxSpec
ANY >
<!ELEMENT CustomerSpec
ANY >
<!ELEMENT PricingSpec
ANY >
<!ELEMENT OutputSpec
ANY >
----------------
Running "xmllint --valid" reports:
----------------
xm.xml:12: validity error: Element FareSearch content doesn't follow the DTD
Expecting (((SliceItinerarySpec | SliceItineraryInfo)+ | TripSegmentList) ,
PaxSpec* , CustomerSpec? , PricingSpec? , OutputSpec?),
got (SliceItinerarySpec PaxSpec PricingSpec )
</FareSearch>
^
----------------
...but it seems to me that the "got" sequence quoted (and found in
the document) should satisfy the "Expecting" expression above it.
Am I mistaken? Are nested alternatives like "((( A | B )+ | C), D?)"
not supported? (I find that "((((A | B), ( A | B )*) | C), D?)"
appears to work.)
Nathan Myers
ncm itasoftware com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]