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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-requirements message

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


Subject: Re: Inneficient XML cross post


Duane,

Thanks, but  I'm a bit confused.   May we please clarify some terminology?

Maybe I'm unfamiliar with how folks in the XML world view recursiveness, but I
don't see this example as being recursive in a classic computer science sense.
It definitely has to do with creating a shallower and more compact parse tree,
and therefore one that is more efficiently processed.  However, recursive?
Recursive, to me, would be something like

<Address>
            <Name xml:lang="en">Cisco Corporation</Name>
            <PostalAddress name="foo">
                <Street>123 Anystreet</Street>
                <City>Sunnyvale</City>
                <State>CA</State>
                <PostalCode>94089</PostalCode>
                <Country>US</Country>
            </PostalAddress>

             more stuff ..

             <Address>
                another address subtree
              </Address>

</Address>

Is this even allowed in well-formed XML documents?  Recursive might also be
attempting to define an element in a DTD in terms of itself.  Is that not
disallowed as well?

Cheers,

Mike

Duane Nickull wrote:

> ebXMLers:
>
> I have received numerous replies and question about recursiveness and XML
> efficiency.  In the interest of asking and replying only once,  will
> everyone please send the messages to the list serves if they are relevant to
> the thread.  Private posts do not get seen by everyone.
>
> I was looking at what others have done and came accross a snippet of XML
> which I believe demonstrates my points.
>
> [NOTE:  This XML is taken out of context therefore my comments do not
> reflect an overall opinion as to the effectiveness of cXML]
>
> Read this XML:
>
> <OrderRequestHeader orderID="DO1234" orderDate="1999-03-12"
> requestedDeliveryDate="1999-03-24">
>     <Total>
>         <Money currency="USD">12.34</Money>
>     </Total>
>     <ShipTo>
>         <Address>
>             <Name xml:lang="en">Cisco Corporation</Name>
>             <PostalAddress name="foo">
>                 <DeliverTo>Joe Smith</DeliverTo>
>                 <DeliverTo>Mailstop M-543</DeliverTo>
>                 <Street>123 Anystreet</Street>
>                 <City>Sunnyvale</City>
>                 <State>CA</State>
>                 <PostalCode>94089</PostalCode>
>                 <Country>US</Country>
>             </PostalAddress>
>         </Address>
>     </ShipTo>
>     <BillTo>
>         <Address>
>             <Name xml:lang="en">Cisco Corporation</Name>
>             <PostalAddress name="foo">
>                 <Street>123 Anystreet</Street>
>                 <City>Sunnyvale</City>
>                 <State>CA</State>
>                 <PostalCode>94089</PostalCode>
>                 <Country>US</Country>
>             </PostalAddress>
>         </Address>
>      </BillTo>
>
> The the use of the element "<Address>" seems to be totally unnecessary
> beucase it is encapsulated by its' parent tag "<ShipTo>" or "<BillTo>" and
> has a child element of "<PostalAddress>".  The latter tags adequately give
> machines and Humans a metric for the child nodes context.  The first branch
> could also be made more efficient by doing  this:
>
> <TotalMoney currency="USD">12.34</Money>
>
> Please keep in mind that these opinions are being given without knowledge of
> the reasoning behind the structure.  There may actually be a really good
> reason for the authors actions.
>
> More "foo" for thought
>
> Duane Nickull

--
Michael C. Rawlins, Rawlins EDI Consulting
http://www.metronet.com/~rawlins/




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

Search: Match: Sort by:
Words: | Help


Powered by eList eXpress LLC