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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl-ndrsc message

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


Subject: Re: [ubl-lcsc] RE: [ubl-ndrsc] Functional Dependency and Normalizationpaper


Title: Re: [ubl-lcsc] RE: [ubl-ndrsc] Functional Dependency and Normalization paper

Burcham, Bill wrote:
> I guess I should explain my issue with DTD now.  It isn't DTD per se, as
> much as it is global element declarations that are the problem.  UBL doesn't
> use global element declarations (much), so examples that use them end up
> specifying structures that differ in important ways (from UBL ones). 
>
> The particular flavor of the differences plays heck with e.g. our whole
> container debate. The main issue is that there is no way using element
> declarations to support reuse of an element in two different content models
> without incurring an extra level of container. 

  Indeed you can do this kind of modeling using entities. Here's a DTD
that will allow both RejectedOrderitem and AcceptedOrderItem with a
common content model and no surrounding container :

<?xml version="1.0"?>
<!DOCTYPE ubl [
   <!ENTITY % order.basic.content "(item, quantity)">
   <!ELEMENT ubl (RejectedOrderItem*|AcceptedOrderItem*)>
   <!ELEMENT item     (#PCDATA)>
   <!ELEMENT quantity (#PCDATA)>
   <!ELEMENT order  %order.basic.content;>
   <!ELEMENT RejectedOrderItem (%order.basic.content;, error)>
   <!ELEMENT error (#PCDATA)>
   <!ELEMENT AcceptedOrderItem (%order.basic.content;, status)>
   <!ELEMENT status (#PCDATA)>
]>

This document is then valid :
<?xml version="1.0"?>
<!DOCTYPE ubl SYSTEM "ubl.dtd">
<ubl>
   <RejectedOrderItem>
     <item>..</item>
     <quantity>...</quantity>
     <error>...</error>
   </RejectedOrderItem>
   <AcceptedOrderItem>
     <item>..</item>
     <quantity>...</quantity>
     <status>...</status>
   </AcceptedOrderItem>
</ubl>

  Thus you can see that by using massively entity declaration (even for
PCDATA content) you can control your global elements with a DTD.
Note that however I'm not advocating the use of DTDs for UBL ;-)

        Fabrice
--
Fabrice Desré - FT.BD/FTR&D/DTL/TAL
Tél: (33) 2 96 05 31 43
Fax: (33) 2 96 05 39 45



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


Powered by eList eXpress LLC