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] | [List Home]


Subject: Fw: [ubl-lcsc] UBL 1.0 Beta Review - Common Core Component .xsds



 
----- Original Message -----
Sent: Monday, December 15, 2003 6:56 PM
Subject: [ubl-lcsc] UBL 1.0 Beta Review - Common Core Component .xsds

Attached is my analysis of the UBL 1.0 Beta CCTS .xsd files compared to
the OAGi version of these files.  If you have any questions or comments,
please let me know.

Regards,

garret



OAGIS-UBL Common Core Component .xsd Review

December 8, 2003

 

Files to be compared:

 

Source

XML Schema File Name

File/Version Date

UBL 1p0 Beta

UBL-CoreComponentTypes-1.0-beta.xsd

 

UBL 1p0 Beta

UBL-RepresentationTerms-1.0-beta.xsd

 

UBL 1p0 Beta

UBL-DataTypes-1.0-beta.xsd

 

OAGIS 9.0

CoreComponentTypes.xsd

01 December 2003

OAGIS 9.0

RepresentationTerms.xsd

01 December 2003

OAGIS 9.0

DataTypes.xsd

01 December 2003

 

General Issues:

 

Namespace.? OAGIS and UBL use different notation and naming in their namespace declarations.? This should not be a major issue since it is expected that OAGIS and UBL will eventually use the same set of common core component schema files once they are officially approved and hosted by a mutually agreed upon international standards organization such as UN/CEFACT ATG2 or ISO.? Once this occurs, OAGIS and UBL will simply reference the namespace names adopted by the mutually agreed upon standards organization.? As long as the content of the common core component schema files remain unchanged, there should be no visible impace to end users.

 

Annotation.? OAGIS and UBL have different documentation/annotation standards but again, this is not expected to be an issue once the common core component schema files are implemented by a mutually agreed upon international standards organization.

 

XML Schema Namespace Prefix.? OAGIS uses xs: as the namespace prefix for http://www.w3.org/2001/XMLSchema.? UBL uses the prefix xsd:.? As with namespaces and annotations, this is not expected to be an issue once the common core component schema files are implemented by a mutually agreed upon international standards organization.

 

Global Elements.? UBL defines both global elements and types in its common core component schema files.? OAGIS only defines types.? This was introduced by UBL in 1p0 Beta and probably requires some additional discussion.? Defining global elements for each Core Component Type, Representation Term, and Data Type should not create any technical problems for OAGIS but it is questionable if this would be appropriate for a set of common core component schemas.? Since Core Component Types, Representation Terms, and Data Types are not directly implemented as BCCs or BBIEs, it is not clear what value they would have as global elements.

 

Derivation by Restriction Across Namespaces.? According to the XML Schema specification, derivation by restriction by restriction is not allowed if the element/type is based on another type in a different namespace that has also been derived by restriction (http://www.w3c.org/TR/xmlschema-1/#coss-ct).? An example of this situation from UBL is:

 

UBL-CoreComponentTypes-1.0-beta.xsd

 

<xsd:simpleType name=?IndicatorType?>

??? <xsd:restriction base=?xsd:boolean?/>

</xsd:simpleType>

 

UBL-RepresentationTerms-1.0-beta.xsd

 

<xsd:simpleType name=?IndicatorType?>

??? <xsd:restriction base=?cct:IndicatorType?>

??????? <xsd:pattern value=?false?/>

??????? <xsd:pattern value=?true?/>

??? </xsd:restriction>

</xsd:simpleType>

 

Some XML Schema design tools such as XML Spy do not flag this situation as an error but it is a violation of the XML Schema specification.

 

simpleContent vs. complexContent.? In UBL-RepresentationTerms-1.0-beta.xsd, all Representation Term types are defined as <xsd:simpleContent>.? In OAGIS RepresentationTerms.xsd, all Representation Term types are defined as <xs:complexContent>.

 

Core Component Types:

 

Amount Type.? UBL is based on xsd:decimal.? OAGIS is based on cct:DecimalContent.? cct:DecimalContent is a common type for all decimal CCTs (Amount, Measure, Quantity).? It is based on the built-in XML Schema type decimal and restricts totalDigits to 28 and fractionDigits to 6.? Previous versions of UBL included this decimal restriction on all decimal CCTs.

 

In UBL, the currencyID attribute is optional.? In OAGIS it is required.? Previous versions of UBL marked this attribute as required.? NOTE:? currencyID is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

BinaryObjectType.? UBL includes an attribute for encodingCode.? OAGIS does not include this attribute.? Encoding Code is a valid supplementary component based on CCTS and should be added to the OAGIS schema.

 

IndicatorType.? OAGIS includes a pattern restriction of value=?true? or value=?false?.? UBL does not include this pattern restriction.? This pattern restriction was mutually agreed to in previous discussions between UBL and OAGi.

 

MeasureType.? UBL is based on xsd:decimal.? OAGIS is based on cct:DecimalContent (see comments for AmountType).

 

In UBL, the unitCode attribute is optional.? In OAGIS it is required.? Previous versions of UBL marked this attribute as required.? NOTE:? unitCode is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

QuantityType.? UBL is based on xsd:decimal.? OAGIS is based on cct:DecimalContent (see comments for AmountType).

 

In UBL, the unitCode attribute is optional.? In OAGIS it is required.? Previous versions of UBL marked this attribute as required.? NOTE:? unitCode is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

TextType.? UBL includes an attribute for languageLocaleID.? OAGIS does not include this attribute.? Language Locale ID is a valid supplementary component based on CCTS and should be added to the OAGIS schema.

 

Representation Terms:

 

AmountType.? In UBL, the attribute codeListVersionID is prohibited.? This restriction does not exist in OAGIS.

 

BinaryObjectType.? In UBL, this type is derived by restriction.? In OAGIS, this type is derived by extension.? UBL also includes an attribute definition for mimeCode.

 

PictureType.? UBL includes a definition for PictureType.? OAGIS does not include PictureType.? Picture is a valid secondary representation term based on CCTS and should be added to the OAGIS schema.

 

CodeType.? OAGIS is based on cct:CodeType.? UBL is based on rt:CodeContentType.? rt:CodeContentType is a simpleType based on xsd:token.? It is not clear why this is necessary since the UBL cct:CodeType is also based on xsd:token.

 

MeasureType.? In UBL, the attribute unitCodeListVersionID is prohibited.? This restriction does not exist in OAGIS.

 

QuantityType.? In UBL, the attributes unitCodeListID, unitCodeListAgencyID, and unitCodeListAgencyName are prohibited.? These restrictions do not exist in OAGIS.

 

TextType.? UBL uses derivation by restriction and includes an attribute definition for languageID.? OAGIS uses derivation by extension with no attribute definitions.

 

NameType.? UBL uses derivation by restriction and includes an attribute definition for languageID.? OAGIS uses derivation by extension with no attribute definitions.

 

Data Types:

 

UBL has removed all Data Type definitions in UBL-DataTypes-1.0-beta.xsd so no analysis is necessary.

 

 

 

 

 


To unsubscribe from this mailing list (and be removed from the roster of the OASIS TC), go to http://www.oasis-open.org/apps/org/workgroup/ubl-lcsc/members/leave_workgroup.php.
 

---
 
File has not been scanned
 
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.551 / Virus Database: 343 - Release Date: 12/11/2003

OAGIS-UBL Common Core Component .xsd Review

December 8, 2003

 

Files to be compared:

 

Source

XML Schema File Name

File/Version Date

UBL 1p0 Beta

UBL-CoreComponentTypes-1.0-beta.xsd

 

UBL 1p0 Beta

UBL-RepresentationTerms-1.0-beta.xsd

 

UBL 1p0 Beta

UBL-DataTypes-1.0-beta.xsd

 

OAGIS 9.0

CoreComponentTypes.xsd

01 December 2003

OAGIS 9.0

RepresentationTerms.xsd

01 December 2003

OAGIS 9.0

DataTypes.xsd

01 December 2003

 

General Issues:

 

Namespace.  OAGIS and UBL use different notation and naming in their namespace declarations.  This should not be a major issue since it is expected that OAGIS and UBL will eventually use the same set of common core component schema files once they are officially approved and hosted by a mutually agreed upon international standards organization such as UN/CEFACT ATG2 or ISO.  Once this occurs, OAGIS and UBL will simply reference the namespace names adopted by the mutually agreed upon standards organization.  As long as the content of the common core component schema files remain unchanged, there should be no visible impace to end users.

 

Annotation.  OAGIS and UBL have different documentation/annotation standards but again, this is not expected to be an issue once the common core component schema files are implemented by a mutually agreed upon international standards organization.

 

XML Schema Namespace Prefix.  OAGIS uses xs: as the namespace prefix for http://www.w3.org/2001/XMLSchema.  UBL uses the prefix xsd:.  As with namespaces and annotations, this is not expected to be an issue once the common core component schema files are implemented by a mutually agreed upon international standards organization.

 

Global Elements.  UBL defines both global elements and types in its common core component schema files.  OAGIS only defines types.  This was introduced by UBL in 1p0 Beta and probably requires some additional discussion.  Defining global elements for each Core Component Type, Representation Term, and Data Type should not create any technical problems for OAGIS but it is questionable if this would be appropriate for a set of common core component schemas.  Since Core Component Types, Representation Terms, and Data Types are not directly implemented as BCCs or BBIEs, it is not clear what value they would have as global elements.

 

Derivation by Restriction Across Namespaces.  According to the XML Schema specification, derivation by restriction by restriction is not allowed if the element/type is based on another type in a different namespace that has also been derived by restriction (http://www.w3c.org/TR/xmlschema-1/#coss-ct).  An example of this situation from UBL is:

 

UBL-CoreComponentTypes-1.0-beta.xsd

 

<xsd:simpleType name=”IndicatorType”>

    <xsd:restriction base=”xsd:boolean”/>

</xsd:simpleType>

 

UBL-RepresentationTerms-1.0-beta.xsd

 

<xsd:simpleType name=”IndicatorType”>

    <xsd:restriction base=”cct:IndicatorType”>

        <xsd:pattern value=”false”/>

        <xsd:pattern value=”true”/>

    </xsd:restriction>

</xsd:simpleType>

 

Some XML Schema design tools such as XML Spy do not flag this situation as an error but it is a violation of the XML Schema specification.

 

simpleContent vs. complexContent.  In UBL-RepresentationTerms-1.0-beta.xsd, all Representation Term types are defined as <xsd:simpleContent>.  In OAGIS RepresentationTerms.xsd, all Representation Term types are defined as <xs:complexContent>.

 

Core Component Types:

 

Amount Type.  UBL is based on xsd:decimal.  OAGIS is based on cct:DecimalContent.  cct:DecimalContent is a common type for all decimal CCTs (Amount, Measure, Quantity).  It is based on the built-in XML Schema type decimal and restricts totalDigits to 28 and fractionDigits to 6.  Previous versions of UBL included this decimal restriction on all decimal CCTs.

 

In UBL, the currencyID attribute is optional.  In OAGIS it is required.  Previous versions of UBL marked this attribute as required.  NOTE:  currencyID is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

BinaryObjectType.  UBL includes an attribute for encodingCode.  OAGIS does not include this attribute.  Encoding Code is a valid supplementary component based on CCTS and should be added to the OAGIS schema.

 

IndicatorType.  OAGIS includes a pattern restriction of value=”true” or value=”false”.  UBL does not include this pattern restriction.  This pattern restriction was mutually agreed to in previous discussions between UBL and OAGi.

 

MeasureType.  UBL is based on xsd:decimal.  OAGIS is based on cct:DecimalContent (see comments for AmountType).

 

In UBL, the unitCode attribute is optional.  In OAGIS it is required.  Previous versions of UBL marked this attribute as required.  NOTE:  unitCode is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

QuantityType.  UBL is based on xsd:decimal.  OAGIS is based on cct:DecimalContent (see comments for AmountType).

 

In UBL, the unitCode attribute is optional.  In OAGIS it is required.  Previous versions of UBL marked this attribute as required.  NOTE:  unitCode is required in UBL-RepresentationTerms-1.0-beta.xsd.

 

TextType.  UBL includes an attribute for languageLocaleID.  OAGIS does not include this attribute.  Language Locale ID is a valid supplementary component based on CCTS and should be added to the OAGIS schema.

 

Representation Terms:

 

AmountType.  In UBL, the attribute codeListVersionID is prohibited.  This restriction does not exist in OAGIS.

 

BinaryObjectType.  In UBL, this type is derived by restriction.  In OAGIS, this type is derived by extension.  UBL also includes an attribute definition for mimeCode.

 

PictureType.  UBL includes a definition for PictureType.  OAGIS does not include PictureType.  Picture is a valid secondary representation term based on CCTS and should be added to the OAGIS schema.

 

CodeType.  OAGIS is based on cct:CodeType.  UBL is based on rt:CodeContentType.  rt:CodeContentType is a simpleType based on xsd:token.  It is not clear why this is necessary since the UBL cct:CodeType is also based on xsd:token.

 

MeasureType.  In UBL, the attribute unitCodeListVersionID is prohibited.  This restriction does not exist in OAGIS.

 

QuantityType.  In UBL, the attributes unitCodeListID, unitCodeListAgencyID, and unitCodeListAgencyName are prohibited.  These restrictions do not exist in OAGIS.

 

TextType.  UBL uses derivation by restriction and includes an attribute definition for languageID.  OAGIS uses derivation by extension with no attribute definitions.

 

NameType.  UBL uses derivation by restriction and includes an attribute definition for languageID.  OAGIS uses derivation by extension with no attribute definitions.

 

Data Types:

 

UBL has removed all Data Type definitions in UBL-DataTypes-1.0-beta.xsd so no analysis is necessary.

 

 

 

 

 



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