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: [code] Foreign sources for UBL code list definitions

Good morning, folks!

In yesterday's call Chee-Kai thankfully pinned me down regarding UBL code 
lists with foreign sources of enumerated values.  For example, country 
codes and currency codes.

Further to this, I asked Anne to add a "Foreign Source" column in the code 
list spreadsheet.  This is the URL of the XSD file that expresses the code 
list members.

When a foreign code list utilizes the <xsd:restriction> and 
<xsd:enumeration> method of expressing code list members, we can 
programmatically merge all of the members of that list into one of our UBL 
Placebo code list XSD files in order to make a UBL code list.

I've created such an XSLT stylesheet and I've tested it with 6 of the 
UNeDocs code list expressions:

   CountryCode        (239 entries)
   CurrencyCode       (175 entries)
   Incoterms          (13 entries)
   ModeOfTransport    (10 entries)
   UnitsOfMeasurement (1,120 entries)
   UNLocode           (35,060 entries!!)

Using only a dummy placebo file as a source, I've posted a ZIP file where 
this stylesheet can be used:


Note that the stylesheet accesses the foreign XSD file on-the-fly without 
having to copy the foreign XSD file to a local machine.

A comment is added to indicate the date on which the foreign XSD file is 
accessed, and to indicate that the file is a synthesized result of working 
with a placebo definition.

An example of a synthesized result is below ... please ignore the fact that 
it says "StatusCode" as it will actually state the kind of code found in 
the placebo file, which Chee-Kai's process will produce.

Please let me know if you think there are any problems using this technique 
to quickly create UBL expressions of foreign code list contents.


...................... Ken

<?xml version="1.0" encoding="utf-8"?><!--
This is a synthesized file created from merging a UBL code list placebo
delivery W3C Schema expression with the enumerations from a foreign code
list W3C Schema expression.

     Date of merge:            20030910
     URL of foreign code list: 

Any hand-crafted edits to this document WILL BE LOST if this file is
recreated, so please make any required changes in the input files.

Note that all placebo file comments have been preserved, so any reference
below to this file being a "Placebo definition" is not true, this is,
indeed, a "Stock definition" of this code list.
   This is the placebo code list definition that validates against all tokens.
--><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xsd:element name="StatusCode" type="status:StatusCodeType"/>
    <xsd:complexType name="StatusCodeType">
          <xsd:restriction base="cct:CodeType">
             <xsd:enumeration value="0"/>
             <xsd:enumeration value="1"/>
             <xsd:enumeration value="2"/>
             <xsd:enumeration value="3"/>
             <xsd:enumeration value="4"/>
             <xsd:enumeration value="5"/>
             <xsd:enumeration value="6"/>
             <xsd:enumeration value="7"/>
             <xsd:enumeration value="8"/>
             <xsd:enumeration value="9"/>

Next public European delivery:  3-day XSLT/2-day XSL-FO 2003-09-22
Next public US delivery:        3-day XSLT/2-day XSL-FO 2003-10-13
Instructor-led on-site corporate, government & user group training
for XSLT and XSL-FO world-wide:  please contact us for the details

G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/o/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 0-13-140374-5                               Definitive XSL-FO
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X               Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:     http://XMLGuild.info
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/o/bc

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