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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Adam Bosworth Article - what does "direct access" m ean?

[ Lists Home | Date Index | Thread Index ]

At 09:52 AM 1/16/2003 -0600, Bullard, Claude L (Len) wrote:
>It is.  Not new news. As the guy who talked long about
>loose coupling, he knows what the tradeoffs are in data
>driving with a syntax unification approach based on
>a hierarchical format.  Path identification should
>go away in the program but how else will we deal
>with selectors?  XML is not object-oriented.
>
>He's right that the code examples are real ugly.
>So the alternatives are?

In XQuery, you can remain loosely coupled while improving the figure/noise 
ratio of your code. The following computes the PE Ratio for IBM:

    let $stock := document("stocks.xml")/stock[@id="IBM"]
    return $stock/price / ($stock/revenues - $stock/expenses)

I do think this is more elegant than the equivalent SAX or DOM. It is no 
more tightly coupled.

Jonathan 





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS