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] Early Draft Review: XQuery for Java (JSR 225)

[ Lists Home | Date Index | Thread Index ]

 
> In Pizza (or Haskell or ocaml or Scala) one would do like this:
> 
> Var b = Var();
> Var authors = Var();
> FLOWR(
>    For( b, Doc("books.xml").descOrSelf("bib:book"), 
>          /* for $b in doc("books.xml") // bib:book */
>    Let( authors, b.descOrSelf("bib:author") ),
>          /* let $authors = b // bib:author */
>    _,
>    _,
>    Return(
>        element("result"),
>        Sequence( b.child("bib:title"), authors )
>     )  /* return <result>{ $b/bib:title, $authors }</result> */
> )
> 

But that's not exactly XQuery, is it? It's a new query language of your own
invention. This approach requires a new query language to be designed for
each host language. You haven't started to address the problems, which range
from incompatible syntax for identifiers between the programming language
and the database, to incompatible semantics for operators like "=".

I think this example absolutely demonstrates the difficulties that arise
with database sublanguages, and the reason they became unpopular.

Michael Kay





 

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

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