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

"Re: [xml] xmlschema - simpleContent in complexType"



Hi,

on 4/27/2004 9:29 PM Ward Willats wrote:

> 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

Try removing the attribute "mixed" from the <complexType>. The attribute 
"mixed" should have no affect if <simpleContent> is used [1], but this 
seems to confuse the XML Schema processor by now. Additionally it would 
be good to bugzilla this.

[1] http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/#d0e7881

Regards,

Kasimier




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