Next in thread → Next in month →

Re: [ubl] Question about Extension Schemas

From
G. Ken Holman <>
Date
2010-03-30T00:55:10+00:00
ID
Thread
Re: [ubl] Question about Extension Schemas
At 2010-03-29 10:14 -0400, Betty Harvey wrote:
>A few weeks ago I started writing some more information on WIKI.  I started
>reading the NDR on the extension schemas and found it very confusing.
>The text in the NDR isn't very descriptive.

Can you characterize where you felt the NDR were misleading?  NDRs 
aren't meant to be tutorial but only a set of rules.

>Can someone send me a
>small-compliant example of how a UBL extension should be constructed.

I posted one recently in the discussion of signature extensions:

   http://lists.oasis-open.org/archives/ubl/200911/msg00019.html

Note that the signature details are changed from that post, but the 
post illustrates the use of an extension.

Here is an example from my training material (actually from my 
XSLT/XQuery class in my discussion of the utility of namespaces):

<Invoice xmlns="urn:oasis:...:xsd:Invoice-2"
          xmlns:cbc="urn:oasis:...:xsd:CommonBasicComponents-2"
          xmlns:cac="urn:oasis:...:xsd:CommonAggregateComponents-2"
          xmlns:ext="urn:oasis:...:xsd:CommonExtensionComponents-2"
          xmlns:demo="urn:x-Demo:Demo">
   <ext:UBLExtensions>
     <ext:UBLExtension>
       <cbc:ID>Demo1</cbc:ID>
       <cbc:Name>Demonstration</cbc:Name>
       <ext:ExtensionAgencyID>CSL</ext:ExtensionAgencyID>
       <ext:ExtensionAgencyName>Crane Softwrights Ltd.
</ext:ExtensionAgencyName>
       <ext:ExtensionVersionID>0.1</ext:ExtensionVersionID>
       <ext:ExtensionAgencyURI>http://www.CraneSoftwrights.com/links/res-dev.htm</ext:ExtensionAgencyURI>
       <ext:ExtensionURI>urn:x-Demo:Demo:0.1</ext:ExtensionURI>
       <ext:ExtensionReasonCode listURI="urn:x-Demo:Demo:ReasonCodes">1
</ext:ExtensionReasonCode>
       <ext:ExtensionReason>Illustration</ext:ExtensionReason>
       <ext:ExtensionContent>
         <demo:Demo>
           <demo:Thing>This is a test</demo:Thing>
           <cbc:ID>DemoTest</cbc:ID>
           <demo:Total currencyID="GBP">100.00</demo:Total>
         </demo:Demo>
       </ext:ExtensionContent>
     </ext:UBLExtension>
   </ext:UBLExtensions>

   <cbc:ID>A00095678</cbc:ID>
   <cbc:IssueDate>2005-06-21</cbc:IssueDate>
   <cbc:Note>sample</cbc:Note>
   <cac:AccountingSupplierParty>
     <cac:Party>
       <cac:PartyName>
...

The second day of my two-day UBL class directs the students on the 
creation of extensions.

I'm assuming you are reading:

   http://docs.oasis-open.org/ubl/cs01-UBL-2.0-NDR/

Those NDRs require that ext:UBLExtensions be the first child 
[ELD12].  The extensions schema has the structural descriptions 
necessary for the above illustration:

http://docs.oasis-open.org/ubl/os-UBL-2.0-update/xsd/common/UBL-CommonExtensionComponents-2.0.xsd

What rules for extensions do you think would improve the NDR?

Thanks!

. . . . . . . . Ken


--
XSLT/XQuery training:         San Carlos, California 2010-04-26/30
Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03
XSLT/XQuery training:                 Ottawa, Canada 2010-05-10/14
XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11
Vote for your XML training:   http://www.CraneSoftwrights.com/o/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/o/
G. Ken Holman                 mailto:
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/o/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Next in thread → Next in month →