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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

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


Subject: Re: [ubl] Problems on Translating UBL XSD Schema into Relax NG (1/6)


i cannot claim to understtnad the specifics of your issue here, but i 
agree that some of the UBL Naming and Design rules wont work with Relax 
NG (not surprisingly).

what you are actually pioneering is a set of UBL NDRs for Relax NG.  so 
it is quite legitimate to make your own assessment and decision about 
the correct implementation. indeed, one of the benefits of your work is 
to see the strengths and weaknesses of Relax NG.

however, i guess we need to decide whether we want the XML instances for 
a Relax NG schema document to be the same as for a XSD schema document. 
 my feeling is that they should both describe the same XML instance 
doducment - but with differing validation and integrity checks.  that 
is, a recipient of a UBL order should not be able to tell what type of 
schema the sender used and it should not matter which one they validate 
it against.

if a UBL Relax NG Order document is not the same as a UBL Order as 
defined by XSD then we loose a lot of interoperability.

Hiroshi Naito wrote:

>Hi,
>
>I send the report 1/6 about Problems on Translating UBL XSD 
>Schema into Relax NG.  The rest of the report will be posted
>as soon as it will be translated into English.
>
>-------------------------------------------------------------
>Problems on Translating UBL XSD Schema into Relax NG
>
>1. Name of definitions of elements and types
>
>1.1 The UBL Schema Description using XSD
> With W3C XML Schema (XSD), elements and types are defined using
>different syntax (element declaration and type definition), and
>are referenced by their name and namespace to where they belong.
>
>Codes from UBL-CoreComponentTypes-1.0-beta.xsd
>  <xsd:element name="DateTime" type="cct:DateTimeType" />
>  <xsd:simpleType name="DateTimeType">
>    <xsd:restriction base="xsd:dateTime"/>
>  </xsd:simpleType>
>
>1.2 The Description using Relax NG 
>1) Problem
> With Relax NG, reusable modules such as elements and types can
>be defined using a <define> element which defines a general
>named pattern. Named patterns defined elsewhere in the schema
>or other are referenced using a <ref> element.
>
>Because a name attribute of <define> and <ref> element which
>indicates the named pattern has a value of NCName type,
>namespace prefix cannot be specified at a value of the name
>attribute. 
>
>2) Solution
> The name of named patterns correspondent to XSD element and type
>definition is constructed with concatenating "ubl", Namespace
>prefix, and their name with "-" separator.
>
>For example, "ubl-cct-DateTime" is assigned to name of the pattern
>correspondent to <DateTime> element declaration with "cct"
>namespace prefix, and a name "ubl-cct-DateTimeType" is used for
>the definition pattern of "DateTimeType" with "cct" namespace prefix. 
>
>Codes from UBL-CoreComponentTypes-1.0-beta.rng
>  <define name="ubl-cct-DateTime">
>    <element name="DateTime">
>      <ref name="ubl-cct-DateTimeType"/>
>    </element>
>  </define>
>  <define name="ubl-cct-DateTimeType">
>    <data type="dateTime"/>
>  </define>
>  
>1.3 Proposal to Relax NG language specification.
> When describing a large schema library using Relax NG, there
>is a potential naming conflict within pattern's names. So the
>name attribute of <define> and <ref> element can be specified
>with QName.
>
>-------------------------------------------------------------
>
>
>
>-----
>Hiroshi Naito, Osaka Institute of Technology <http://www.oit.ac.jp/>
>1-79-1, Kitayama, Hirakata-City, Osaka, 573-0196, Japan
>TEL: +81-72-866-5194  FAX: +81-72-866-8499, E-Mail: naitoh@is.oit.ac.jp
>
>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/members/leave_workgroup.php.
>
>  
>

-- 
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]