pyxb
pyxb copied to clipboard
AnyContent not definable
When i define an element of "TDocumentable" with the below type, i get an error
Unable to convert DOM node {http://deuta.de/config/DeutaMsgDatabase}shortdesc at
[14:36] to binding
when i create a node like this:
<doc content-type="dita-topic">
<shortdesc>My data types</shortdesc>
</doc>
How can i define a type which is loaded by pyxb but not further validated?
Type definition:
<xs:complexType name="TDocumentable" abstract="true">
<xs:complexContent>
<xs:extension base="TBase">
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element name="doc" type="TDoc"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TAnyContent" mixed="true">
<xs:complexContent>
<xs:extension base="TBase">
<xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded"
processContents="skip"></xs:any>
</xs:sequence>
<xs:anyAttribute/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TDoc">
<xs:complexContent>
<xs:extension base="TAnyContent">
<xs:attribute name="content-type" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="html-para">
<xs:annotation><xs:documentation>HTML content type within "p" tag
</xs:documentation></xs:annotation>
</xs:enumeration>
<xs:enumeration value="dita-section">
<xs:annotation><xs:documentation>DITA content type within "topic/section" tag
</xs:documentation></xs:annotation>
</xs:enumeration>
<xs:enumeration value="dita-topic">
<xs:annotation><xs:documentation>DITA content type within "topic" tag
</xs:documentation></xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>