[xml] xmlschema - simpleContent in complexType



Hello List:

I am using LibXML2 2.6.9 on FreeBSD.

I have a big (proprietary, unfortunately) XML schema.

When I run it through xmlSchemaParse() I get a bunch of these:

  Found unexpected type 9 in BillInfo content model
  Found unexpected type 9 in DueDateInfo content model
  Found unexpected type 9 in List content model
  Found unexpected type 9 in List content model
  Found unexpected type 9 in Product content model

...and so on...

This error looks to be generated by xmlSchemaBuildContentModel() in xmlschemas.c.

Type 9 is:  XML_SCHEMA_TYPE_SIMPLE_CONTENT

Sure enough, this schema has a bunch of simpleContent blocks in complexType blocks. For example:

. . .

 <xsd:element name="BillInfo" type="BillInfoType1"
      nillable="false" minOccurs="0"/>

. . .

   <xsd:complexType name="BillInfoType1" mixed="true">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attributeGroup ref="BillToOtherTnAttrGrp"/>
                <xsd:attributeGroup ref="BillInfoAttrGrp"/>
                <xsd:attributeGroup ref="EffectiveBillDateAttrGrp"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>


Bug? Feature? Pilot error? To do? I'm far from an XMLSchema expert!

The "xmlspy" program on windows eats this schema without problem.

And for some reason, I _think_ I was able to read this with LibXML 2.6.8 or 2.6.7 during preliminary testing, but not 100% sure now.

Sorry I can't give more context without violating various agreements.

Thanks,

-- Ward



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]