OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-ndrsc message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: 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

-----Original Message-----
From: Eve L. Maler [mailto:eve.maler@Sun.COM]
Sent: Donnerstag, 7. November 2002 21:36
To: UBL-NDRSC (E-mail)
Subject: Re: [ubl-ndrsc] Derivation of complexTypes with attributes and
element-values



This looks great to me -- as long as we're sure that, by leaving the
faceted versions unnamed, we're not tossing away a really good
opportunity for reuse.  Customizers can always easily do their own
faceting (and naming if they want), so I think we're okay.

      Eve

Stuhec, Gunther wrote:
 > Hello Bill,
 >
 > I checked all possibilities of supplementary restrictions of BCCs 
now. A found a solution without changes our defined structure of the CCTs.
 >
 > I will show you on the following example.
 >
 > The following complexType represents the BCC "CompactAttribute". It 
includes all information in it. It bases on the built-in datatype 
"xsd:decimal" and have included the additional attribute "currencyId" 
which represents the supplementary component "Currency. Identification" 
and the attribute group "cct:commonAttributes" with all global defined 
attributes.
 >
 > 	<xsd:complexType name="CompactAttribute">
 > 		<xsd:simpleContent>
 > 			<xsd:extension base="xsd:decimal">
 > 				<xsd:attribute name="currencyId" type="xsd:token" use="required"/>
 > 				<xsd:attributeGroup ref="cct:commonAttributes"/>
 > 			</xsd:extension>
 > 		</xsd:simpleContent>
 > 	</xsd:complexType>
 >
 > With that construct is the tuple "complexType/simpleType" (like the 
following one) not necessary anymore.
 >
 > 	<xsd:simpleType name="AmountContent" id="000106">
 > 		<xsd:restriction base="xsd:decimal"/>
 > 	</xsd:simpleType>
 > 	<xsd:complexType name="AmountType" id="000105">
 > 		<xsd:simpleContent>
 > 			<xsd:extension base="cct:AmountContent"/>
 > 		</xsd:simpleContent>
 > 	</xsd:complexType>
 >
 > This will be an big advantage. Because you need only one construct 
for representing the complete BCC. But this construct will have another 
big advantage.
 >
 > If you will restrict the content component or the supplementary 
components in another derived BBIE, you can do that without any copying 
of the complete structure. In the following example I restricted the 
length of the specific BBIE by the facets totalDigits and fractionDigits 
without influencing the BCC itself:
 >
 > 	<xsd:element name="CompactTaxAmountRestriction">
 > 		<xsd:complexType>
 > 			<xsd:simpleContent>
 > 				<xsd:restriction base="cct:CompactAttribute">
 > 					<xsd:totalDigits value="10"/>
 > 					<xsd:fractionDigits value="5"/>
 > 				</xsd:restriction>
 > 			</xsd:simpleContent>
 > 		</xsd:complexType>
 > 	</xsd:element>
 >
 > If you would like to restrict the supplementary component "Currency. 
Identification" too. It will be possible now, without any difficult 
definitions. The following example shows this restriction:
 >
 > 	<xsd:element name="CompactTaxAmountRestriction">
 > 		<xsd:complexType>
 > 			<xsd:simpleContent>
 > 				<xsd:restriction base="cct:CompactAttribute">
 > 					<xsd:totalDigits value="10"/>
 > 					<xsd:fractionDigits value="5"/>
 > 					<xsd:attribute name="currencyId">
 > 						<xsd:simpleType>
 > 							<xsd:restriction base="xsd:token">
 > 								<xsd:length value="5"/>
 > 							</xsd:restriction>
 > 						</xsd:simpleType>
 > 					</xsd:attribute>
 > 				</xsd:restriction>
 > 			</xsd:simpleContent>
 > 		</xsd:complexType>
 > 	</xsd:element>
 >
 > And, if you change anything inside of the BCC "CompactAttribute". It 
will impact all BBIE, which are derived from it, without any problems.
 >
 > I guess, this solves my problem.
 >
 > What do you think about it?
 >
 > Kind regards,
 >
 > 	Gunther
 >
 > ----------------------------------------------------------------
 > To subscribe or unsubscribe from this elist use the subscription
 > manager: <http://lists.oasis-open.org/ob/adm.pl>
 >

-- 
Eve Maler                                        +1 781 442 3190
Sun Microsystems                     NEW!!! cell +1 781 354 9441
Web Technologies and Standards               eve.maler @ sun.com



----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC