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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-lcsc message

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


Subject: Re: UBL 0.81 CCT draft-9-mod


Note: In the interest of greater input into this - i am moving the discussion to the LC list.

Personally, i have problems with the concept of trying to validate data content in the schema language.  In general, i would try and avoid ANY restrictions on ANY CC Type.  Old EDI systems struggled with this idea - and once we have put them in implementations cannot get around them.  

also, from what i understand in the XSD spec (http://www.w3c.org/TR/xmlschema-2/#normalizedString) both 'normalizedString' and 'token' are variants on 'string'.  As 'string' offers facets for 'whiteSpace' and also 'pattern' it is possible to extend these if a particular implementation wants to.

what is the problem with making code and identifier (and every other data type) as 'string'? what are we trying to gain by enforcing patterns in the data?

PS chee-kai - i think your definitions are inconsistent- how can we change 'code' and 'identifier' to be 'normalizedString' and yet have their own internal codes and identifiers still as 'tokens'?

Chin Chee-Kai wrote:
Hi,

In the interest of capturing some of those agreements
and discussions into file, and to synchronize everyone's
view, I've made an attempt to review the types in the
CCT.xsd and put in additional changes that I thought
appropriate.  

The change log is stored as the first comment block
after the disclaimer.

In particular, I've added a GloballyUniqueIDType in CCT.
This might mean a review of Reusables and other Main Docs
to see if using this GloballyUniqueIDType might be a
better alternative to referencing TextType.

I've also questions about the attributes in "Identifier"
having "schemeAgencySchemeID" and "schemeAgencySchemeAgencyID",
and some usage "danger" of having "PercentType" being
an xsd:decimal (the source might have intended 0.30 to
mean 30%, but receipient interprets the lexical value
"0.30" as 0.30% which is 100 times smaller).

As these question could be due to my own ignorance of
what might have gone on much earlier, I haven't changed
them.  I'd appreciate if anyone has some info on 
answers to the above.

Please see if this "mod"ed CCT.xsd might need other changes
and we could hammer this info some firmer form for inclusion
in 0.81-draft-9, or possibly 0.82-draft-1.

Thanks.


Best Regards,
Chin Chee-Kai
SoftML
Tel: +65-6820-2979
Fax: +65-6743-7875
Email: cheekai@SoftML.Net
http://SoftML.Net/
  

<?xml version="1.0" encoding="UTF-8"?> <!-- Universal Business Language (UBL) Schema 0.81 draft 9 mod Copyright (C) OASIS Open (2003). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. =============================================================================== For our absent friend, Michael J. Adcock - il miglior fabbro =============================================================================== Universal Business Langauge Specification (http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=ubl) OASIS Open (http://www.oasis-open.org/) Document Type: CoreComponentTypes --> <!-- edited with Crimson Editor v3.40 rel. by Chin Chee-Kai (UBL) 2003 Sep 06 - For AmountType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. - For BinaryObjectType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. Also, changed the attribute 'filename' from <xsd:attribute name="filename" type="xsd:token" use="optional"/> to <xsd:attribute name="filename" type="xsd:string" use="optional"/> - For CodeType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. Also, changed the attribute 'name' from <xsd:attribute name="name" type="xsd:token" use="optional"/> to <xsd:attribute name="name" type="xsd:normalizedString" use="optional"/> - For IdentifierType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. Also, changed the extension's base type from <xsd:extension base="xsd:token"> to <xsd:extension base="xsd:normalizedString"> - For MeasureType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. Also, changed by removing default='2002' from <xsd:attribute name="unitCodeListVersionID" type="xsd:token" use="optional" default="2002"/> to <xsd:attribute name="unitCodeListVersionID" type="xsd:token" use="optional" /> - For QuantityType, changed from <xsd:extension base="xsd:decimal"> <xsd:attribute name="unitCode" type="xsd:token" use="required"/> <xsd:attribute name="unitCodeListID" type="xsd:normalizedString" use="optional" default="Rec20"/> <xsd:attribute name="unitCodeListAgencyID" type="xsd:normalizedString" use="optional" default="UN/CEFACT"/> <xsd:attribute name="unitCodeListVersionID" type="xsd:normalizedString" use="optional" default="2003"/> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> to <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="unitCode" type="xsd:token" use="required"/> <xsd:attribute name="unitCodeListID" type="xsd:token" use="optional" /> <xsd:attribute name="unitCodeListAgencyID" type="xsd:token" use="optional" /> <xsd:attribute name="unitCodeListVersionID" type="xsd:token" use="optional" /> </xsd:extension> - For TextType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. - For NameType, moved the <xsd:attributeGroup> reference to first line after <xsd:extension>. - For ElectronicAddressType, inserted the <xsd:attributeGroup> as <xsd:attributeGroup ref="cct:commonAttributes"/> - Added GloballyUniqueIDType definition as a new complexType and element. --> <!-- edited with Crimson Editor v3.40 rel. by Chin Chee-Kai (UBL) 2003 Jun 06 Upgraded version from 0p70 to 0p80 Removed all id="CCTcccccc" attributes Changed all default="2002" attributes to default="2003" Added global element definition corresponding to each complexType definition (NDR Rule) --> <!-- edited with XMLSPY v5 rel. 2 U (http://www.xmlspy.com) by Gunther Stuhec (UBL) --> <!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Gunther Stuhec (SAP AG Walldorf) --> <!-- edited with XML Spy v5.0 (http://www.xmlspy.com) by Tim McGrath (UBL LC) 18-Jan-2003 --> <!--Generated by XML Authority. Conforms to w3c http://www.w3.org/2001/XMLSchema--> <xsd:schema targetNamespace="urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.81" xmlns:cct="urn:oasis:names:tc:ubl:CoreComponentTypes:1.0:0.81" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <!--Group of common attributes which be used in all Core Components (aggregate and basic).--> <xsd:attributeGroup name="commonAttributes"> <xsd:attribute name="UID" type="xsd:ID" use="optional"/> <xsd:attribute name="UIDRef" type="xsd:IDREF" use="optional"/> <xsd:attribute name="UIDRefs" type="xsd:IDREFS" use="optional"/> <xsd:attribute name="language" type="xsd:language" use="optional" default="en"/> </xsd:attributeGroup> <!-- ##### CORE COMPONENT TYPES ##### --> <!--All definitons with ID = CCT* are Core Component Types according the ebXML Core Component Specification v 1.85 and V1.90--> <!--All definitons with ID = CCS* are Core Component Supplementary Components according the ebXML Core Component Specification V1.90--> <!--All definitons with with ID = CCD* are Core Component Data Types according the ebXML Core Component Specification V1.90--> <!-- ===== CCT: AmountType ===== --> <xsd:element name="Amount" type="cct:AmountType"/> <xsd:complexType name="AmountType"> <xsd:simpleContent> <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="currencyID" type="xsd:token" use="required"/> <xsd:attribute name="codeListVersionID" type="xsd:token" use="optional" default="2003"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: BinaryObjectContent ===== --> <xsd:element name="BinaryObject" type="cct:BinaryObjectType"/> <xsd:complexType name="BinaryObjectType"> <xsd:simpleContent> <xsd:extension base="xsd:base64Binary"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="mimeCode" type="xsd:token" use="optional"/> <xsd:attribute name="charsetCode" type="xsd:token" use="optional"/> <xsd:attribute name="filename" type="xsd:string" use="optional"/> <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: CodeType ===== --> <xsd:element name="Code" type="cct:CodeType"/> <xsd:complexType name="CodeType"> <xsd:simpleContent> <xsd:extension base="xsd:token"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="listID" type="xsd:token" use="optional"/> <xsd:attribute name="listAgencyID" type="xsd:token" use="optional"/> <xsd:attribute name="listVersionID" type="xsd:token" use="optional"/> <xsd:attribute name="listAgencySchemeID" type="xsd:token" use="optional"/> <xsd:attribute name="listAgencySchemeAgencyID" type="xsd:token" use="optional"/> <xsd:attribute name="name" type="xsd:normalizedString" use="optional"/> <xsd:attribute name="languageID" type="xsd:language" use="optional"/> <xsd:attribute name="listURI" type="xsd:anyURI" use="optional"/> <xsd:attribute name="listSchemeURI" type="xsd:anyURI" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: DateTimeType ===== --> <xsd:element name="DateTime" type="cct:DateTimeType"/> <xsd:complexType name="DateTimeType"> <xsd:simpleContent> <xsd:extension base="xsd:dateTime"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: DateType ===== --> <xsd:element name="Date" type="cct:DateType"/> <xsd:complexType name="DateType"> <xsd:simpleContent> <xsd:extension base="xsd:date"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: TimeType ===== --> <xsd:element name="Time" type="cct:TimeType"/> <xsd:complexType name="TimeType"> <xsd:simpleContent> <xsd:extension base="xsd:time"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: IdentifierType ===== --> <xsd:element name="Identifier" type="cct:IdentifierType"/> <xsd:complexType name="IdentifierType"> <xsd:simpleContent> <xsd:extension base="xsd:normalizedString"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="schemeID" type="xsd:token" use="optional"/> <xsd:attribute name="schemeAgencyID" type="xsd:token" use="optional"/> <xsd:attribute name="schemeVersionID" type="xsd:token" use="optional"/> <xsd:attribute name="schemeAgencySchemeID" type="xsd:token" use="optional"/> <xsd:attribute name="schemeAgencySchemeAgencyID" type="xsd:token" use="optional"/> <xsd:attribute name="schemeDataURI" type="xsd:anyURI" use="optional"/> <xsd:attribute name="schemeURI" type="xsd:anyURI" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: IndicatorType ===== --> <xsd:element name="Indicator" type="cct:IndicatorType"/> <xsd:complexType name="IndicatorType"> <xsd:simpleContent> <xsd:extension base="xsd:boolean"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: MeasureType ===== --> <xsd:element name="Measure" type="cct:MeasureType"/> <xsd:complexType name="MeasureType"> <xsd:simpleContent> <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="unitCode" type="xsd:token" use="required"/> <xsd:attribute name="unitCodeListVersionID" type="xsd:token" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: NumericType ===== --> <xsd:element name="Numeric" type="cct:NumericType"/> <xsd:complexType name="NumericType"> <xsd:simpleContent> <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: PercentType ===== --> <xsd:element name="Percent" type="cct:PercentType"/> <xsd:complexType name="PercentType"> <xsd:simpleContent> <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: QuantityType ===== --> <xsd:element name="Quantity" type="cct:QuantityType"/> <xsd:complexType name="QuantityType"> <xsd:simpleContent> <xsd:extension base="xsd:decimal"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="unitCode" type="xsd:token" use="required"/> <xsd:attribute name="unitCodeListID" type="xsd:token" use="optional" /> <xsd:attribute name="unitCodeListAgencyID" type="xsd:token" use="optional" /> <xsd:attribute name="unitCodeListVersionID" type="xsd:token" use="optional" /> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: TextType ===== --> <xsd:element name="Text" type="cct:TextType"/> <xsd:complexType name="TextType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="languageID" type="xsd:language" use="optional" default="en"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: NameType ===== --> <xsd:element name="Name" type="cct:NameType"/> <xsd:complexType name="NameType"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="languageID" type="xsd:language" use="optional" default="en"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: ElectronicAddressType ===== --> <xsd:element name="ElectronicAddress" type="cct:ElectronicAddressType"/> <xsd:complexType name="ElectronicAddressType"> <xsd:simpleContent> <xsd:extension base="xsd:anyURI"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:attribute name="protocolID" type="xsd:token" use="required"/> <xsd:attribute name="languageID" type="xsd:language" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> <!-- ===== CCT: GloballyUniqueIDType ===== --> <!-- E.g. 2B93C220-E0C2-11D7-94FC-00E0290FEEC7 Usage: Writers SHOULD generate uppercase hexadecimal values. Readers MUST accept mixed upper- and lower-case hexadecimal values. --> <xsd:element name="GloballyUniqueID" type="cct:GloballyUniqueIDType"/> <xsd:complexType name="GloballyUniqueIDType"> <xsd:simpleContent> <xsd:restriction base="xsd:string"> <xsd:attributeGroup ref="cct:commonAttributes"/> <xsd:pattern value="[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" /> </xsd:restriction> </xsd:simpleContent> </xsd:complexType> </xsd:schema>

-- 
regards
tim mcgrath
phone: +618 93352228  
postal: po box 1289   fremantle    western australia 6160



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