← Prev in month ← Prev in thread
Next in thread → Next in month →

RE: [ubl-ndrsc] Derivation of complexTypes with attributes and element-values

From
Gunther Stuhec
Date
2002-11-08T06:55:00+00:00
ID
Thread
RE: [ubl-ndrsc] Derivation of complexTypes with attributes and element-values
Hello Eve, I guess, we can use that construct for the restiction of named version although.
I will try an example for that.
The CCT itself is an Identifier.Type like the following structure: <!
--

=====

CCT: Identifier. Type

=====

--> <xsd:complexType name="IdentifierType"> <xsd:simpleContent> <xsd:extension base="xsd:token"> <xsd:attribute name="schemeId" type="xsd:token" use="optional"/> <xsd:attribute name="schemeName" type="xsd:token" use="optional"/> <xsd:attribute name="schemeAgencyId" type="xsd:token" use="optional"/> <xsd:attribute name="schemeAgencyName" type="xsd:token" use="optional"/> <xsd:attribute name="schemeVersionId" type="xsd:token" use="optional"/> <xsd:attribute name="schemeDataURI" type="xsd:token" use="optional"/> <xsd:attribute name="schemeURI" type="xsd:token" use="optional"/> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> And based on this CCT, I can generate a named complexType for a BCC. This BCC representing a "Article. Identification. Identifier", for example. This BCC do not need all attributes and have a max. length of 20 characters, because can be the maximum length of all different identifiers for articles. Therefore you need some restrictions in this named complexType, like the following example: <!--

=====

BCC: Article. Identification. Identifier

=====

--> <xsd:complexType name="ArticleIdentifier"> <xsd:simpleContent> <xsd:restriction base="cct:IdentifierType"> <xsd:maxLength value="20"/> <xsd:attribute name="schemeName" use="prohibited"/> <xsd:attribute name="schemeAgencyName" use="prohibited"/> </xsd:restriction> </xsd:simpleContent> </xsd:complexType> I hope, you' re agree with that.
Kind regards, Gunther
← Prev in month ← Prev in thread
Next in thread → Next in month →