W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2004

Re: [XQuery] Sample query is wrong

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Tue, 14 Sep 2004 12:37:09 -0400
To: Alberto Massari <amassari@progress.com>
Cc: public-qt-comments@w3.org
Message-ID: <OF24432A35.80527B2E-ON88256F0F.005B2768-88256F0F.005B3D9F@us.ibm.com>
Hello Alberto,
Yes, you are right. This is embarrassing. I will fix this example in the 
next version of the document.
Thanks for your helpful comment!
--Don Chamberlin

Alberto Massari <amassari@progress.com> 
Sent by: public-qt-comments-request@w3.org
09/14/2004 08:38 AM


[XQuery] Sample query is wrong

In the computed element constructor section, there is this sample query

"Here is an example entry:

<entry word="address">
    <variant lang="German">Adresse</variant>
    <variant lang="Italian">indirizzo</variant>


     {$e/@*, $e/*}

The XPath expression should have "@word" and "@lang" instead of "word" and 

Also, the expression $e/* will not select the text fragment, as it is 
(according to the abbreviated form for $e/child::* and so it will 

return only element nodes.

The right query would be

     {$e/@*, $e/node()}

Received on Tuesday, 14 September 2004 16:37:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:59 UTC