← Prev in month ← Prev in thread
Next in thread → Next in month →

Problems on Translating UBL XSD Schema into Relax NG (1/6)

From
Hiroshi Naito
Date
2004-01-30T09:27:00+00:00
ID
Thread
Problems on Translating UBL XSD Schema into Relax NG (1/6)
MHonArc v2.5.0b2 -->
















ubl message






[Date Prev]
 | [Thread Prev]
 | [Thread Next]
 | [Date Next]

--

[Date Index]
 | [Thread Index]
 | [List Home]








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




From: Hiroshi Naito <>
To: 
Date: Fri, 30 Jan 2004 18:37:20 +0900






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: 
← Prev in month ← Prev in thread
Next in thread → Next in month →