[xml] validator bug in libxml2-2.4.23?

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">


And the following DTD:

        (FareSearch) >
<!ELEMENT FareSearch
           OutputSpec?) >
<!ELEMENT SliceItinerarySpec
          ANY >
<!ELEMENT SliceItineraryInfo
          ANY >
<!ELEMENT TripSegmentList
          ANY >
          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 )

...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]