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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-transport message

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


Subject: Inneficient XML cross post


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



[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