Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: PeterHeintz on November 03, 2004, 06:00:05 am
-
I am fiddling around with the XML-Schema generation and I had very quickly some success to design my schema somehow top down.
On the leaves of my tree I get lost. I don’t know how to model e.g.
<xs:element name="Doc.Title" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute ref="Language" use="required"/>
<xs:attribute name="Status" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="UnderDevelopment"/>
<xs:enumeration value="Released"/>
<xs:enumeration value="Obsolete"/>
<xs:enumeration value="Replaced"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
or in other words just a node containing a text node and two attributes.
Any help is welcome.
-
I have the same problem. I created complexType, extended from xsd:string a and attribute added. I got this :
<xs:complexType name="objectclass">
<xs:complexContent>
<xs:extension base="xs:string">
<xs:sequence/>
<xs:attributeGroup ref="objectclass.att"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
- it is not valid - I need nested simpleContent (insted of complexContent), without empty xs:sequence.