- From: Jim Fuller <jim.fuller@ruminate.co.uk>
- Date: Tue, 27 Jan 2004 23:37:07 -0000
- To: "'Kay, Michael'" <Michael.Kay@softwareag.com>, "'Liam Quin'" <liam@w3.org>, "'Mark Baker'" <distobj@acm.org>
- Cc: <public-qt-comments@w3.org>
> From: public-qt-comments-request@w3.org
> [mailto:public-qt-comments-request@w3.org] On Behalf Of Kay, Michael
> Sent: 27 January 2004 11:56
> To: Liam Quin; Mark Baker
> Cc: public-qt-comments@w3.org
> Subject: RE: XQuery and URIs
> The Query WG has set out to define a language, and not an API or
> protocol for transmitting that language between clients and servers. I
> think that embedding XQuery in a URI is one example of such a
> protocol,
> and goes beyond the WG's charter.
And putting devils advocate hat on....
Perhaps we could see something like this in the future
doc("auction.xml")//music:record[music:remark/@xml:lang = "de"]
borrowing xpointer syntax and escaping conventions to something like;
http://www.example.org/auction.xml#xquery({//music:record[music:remark/@
xml:lang=de]})
Though the xquery syntax quickly comes into problems, such as;
for $hr in doc("auction.xml")//@xlink:href
return <ns>{ $hr }</ns>
Would be difficult to logically get on a URI...though not impossible
http://www.example.org/auction.xml#xquery(<n>{//@xlink:href}</n>)
And so on....
{
for $b in doc("http://bstore1.example.com/bib.xml")/bib/book
return
<result>
{ $b/title }
{ $b/author }
</result>
}
Could be
http://bstore1.example.com/bib.xml#xquery(<result>{/bib/book/title}{bib/
book/author}</result>)
Admittedly a bit awkward,...lets try a more difficult one;
{
let $doc := doc("prices.xml")
for $t in distinct-values($doc//book/title)
let $p := $doc//book[title = $t]/price
return
<minprice title="{ $t }">
<price>{ min($p) }</price>
</minprice>
}
Hmmmmmm, the curly brackets seem useful
http://wwww.example.com/prices.xml#xquery(<minprice><price>min(//book[ti
tle={distinct-values(//book/title)}]/price])</price></minprice>)
just a bit of random RESTful thinking.
Cheers, Jim Fuller
Received on Tuesday, 27 January 2004 18:37:10 UTC