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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-dev message

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


Subject: RE: [ubl-dev] Problems on Translating UBL XSD Schema into Relax NG (3/6)


Naito-san,

Thank you for your reports.  Your work is very valuable as both feedback to UBL NDR and to implementers. However, I would like to pass along one slight word of caution - UBL made a decision early on that we would base our work on XSD and would not allow the limitations of other schema languages (RelaxNG, Schematron, et. al) to limit our use of XSD features.  As you work through your efforts, I am hopeful that we will be able to capture all of the issues for submission to the RelaxNG TC.

Mark 



> -----Original Message-----
> From: Hiroshi Naito [mailto:naitoh@is.oit.ac.jp]
> Sent: Tuesday, February 03, 2004 5:25 AM
> To: ubl-dev@lists.oasis-open.org
> Subject: [ubl-dev] Problems on Translating UBL XSD Schema 
> into Relax NG
> (3/6)
> 
> 
> Hi,
> 
> I send the report 3/6 about Problems on Translating UBL XSD 
> Schema into Relax NG. 
> 
> I will post UBL schema library describing with Relax NG at 
> this weekend.
> These schemas is generated from XSD schamas and spreadsheets 
> including in
> UBL 1.0 beta package with Java, Perl and XSLT.
> 
> Thanks
> 
> -----------------------------------------------------------------
> 3. Multiple <import>ing of the same schema document
> 
> 3.1 The UBL Schema Description using XSD
>  With XSD, even if the same schema document is imported multiple
> times, validation error don't occur. For efficiency,
> almost XML applications avoid importing the same schema document
> more than once. So each XSD schema in UBL library imports
> other schemas by which it use to define elements and types. 
> 
> For example, CoreComponentParameters schema which defines elements
> and types for describing annotation is imported in all UBL XSD
> schemas.
> 
> Codes from common/UBL-RepresentationTerms-1.0-beta.xsd
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:CoreComponentTypes:1:0-beta"
>     schemaLocation="UBL-CoreComponentTypes-1.0-beta.xsd"/>
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:CoreComponentParameters:1:0-beta"
>     schemaLocation="UBL-CoreComponentParameters-1.0-beta.xsd"/>
> 
> Codes from maindoc/UBL-Invoice-1.0-beta.xsd
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:CoreComponentParameters:1:0-beta"
>    
> schemaLocation="../common/UBL-CoreComponentParameters-1.0-beta.xsd" />
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:RepresentationTerms:1:0-beta"
>    schemaLocation="../common/UBL-RepresentationTerms-1.0-beta.xsd" />
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:CommonAggregateTypes:1:0-beta"
>    schemaLocation="../common/UBL-Reusable-1.0-beta.xsd" />
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:codelist:InvoiceTypeCode:1:0-beta"
>    
> schemaLocation="../codelist/use/UBL-CodeList-InvoiceTypeCode-U
> se-1.0-beta.xsd" />
>   <xsd:import 
> namespace="urn:oasis:names:tc:ubl:codelist:CurrencyCode:1:0-beta"
>    
> schemaLocation="../codelist/use/UBL-CodeList-CurrencyCode-Use-
> 1.0-beta.xsd" />
> 
> 3.2 The UBL Schema Description using Relax NG
> 1) Problem
>  Though Relax NG has a feature including other schemas, it 
> don't have a feature importing other schemas. If the same
> schema document is imported multiple times, validation error
> will occur. 
> 
> 2) Solution
>  With Relax NG schema, instead of including other schemas in
> each schema using them,  only some schemas would include schemas as
> the follows:
> 
> (a) Reusable includes all Codelist schemas.
> 
> Generated Codes in UBL-Reusable-1.0-beta.rng
>   <include 
> href="../codelist/use/UBL-CodeList-TaxLevelCode-Use-1.0-beta.rng" />
>   <include 
> href="../codelist/use/UBL-CodeList-TransportEquipmentSizeTypeC
> ode-Use-1.0-beta.rng" />
>   <include 
> href="../codelist/use/UBL-CodeList-TransportEquipmentTypeCode-
> Use-1.0-beta.rng" />
>   <include 
> href="../codelist/use/UBL-CodeList-HazardousPackingCriteriaCod
> e-Use-1.0-beta.rng" />
>   ...
> 
> (b) Maindoc schemas include CoreComponentParameters, 
> RepresentationTerms and Reusable. 
> 
> Generated Codes in UBL-Invoice-1.0-beta.rng
>   <include 
> href="../common/UBL-CoreComponentParameters-1.0-beta.rng" />
>   <include href="../common/UBL-RepresentationTerms-1.0-beta.rng" />
>   <include href="../common/UBL-Reusable-1.0-beta.rng" />
> 
>  CoreComponentTypes schema is referred from only RepresentationTerms,
> and is used to derive restricted Types from CoreComponentTypes,
> then CoreComponentTypes is not included in any Relax NG schemas. 
> DataTypes is not included also.
> 
>  These inclusion rules are sufficient to validate XML documents
> using Relax NG schemas, but are not sufficient to validate each
> Relax NG schema. So lines for including referred schemas are left
> as a comment as the follows:
> 
> Generated Codes in UBL-RepresentationTerms-1.0-beta.rng
>   <!-- <include href="CoreComponentParameters:1:0-beta.rng"> -->
> 
> 3.3 Proposition to Relax NG language specification.
>  When describing a large schama library using Relax NG, 
> it is too difficult to manage the relationship between
> component schemas because of the lack of XSD-like importing
> feature. Relax NG should support features importing other
> schema and avoiding to import them multiple times.
> 
> -----------------------------------------------------------------
> 
> 
> 
> 
> -----
> Hiroshi Naito, Osaka Institute of Technology <http://www.oit.ac.jp/>
> 
> 


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