[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XQuery (was Designs for XSLT functions)

Subject: Re: XQuery (was Designs for XSLT functions)
From: Kimbro Staken <kstaken@xxxxxxxxxxxxxx>
Date: Wed, 21 Feb 2001 11:48:06 -0700
document xslt function
Michael Kay wrote:
> 
> > Forgive my ignorance, but does XQuery provide queries across
> > a set of XML
> > documents? In other words you have a 'database' of XML
> > documents and it
> > returns all the documents or part of all the documents matching some
> > criteria.
> 
> If I understand the thinking correctly, it is that a database would be
> represented by a virtual document containing a list of the instance
> documents, identified by URL; and then yes, you should be able to search
> this entire collection. Of course XSLT has that capability too (in theory):
> the real challenge is designing optimizers that can take advantage of
> persistent indexes, etc.
> 

Most of the examples in XQuery use the document function to apply the
query to a particular document and it isn't really obvious that document
collection functionality exists.

In XQuery any query that begins with / or // represents an implicit root
node determined by the environment in which the query is invoked. So if
you have a query like //some/xpath it is up to the executing process to
determine how that query is applied. For instance dbXML is an XML
database and stores XML documents in collections. We can provide a
collection level query mechanism that takes an XQuery expression and
returns a list of nodes coming from all documents in the collection. The
result can then be formatted in the RETURN clause. 

I do agree though, that other then this specific case when you step back
and look at the functionality provided by XSLT and XQuery there is an
awful lot of overlap. Even in the collection case you could certainly
write an XSLT engine that evaluates all XPaths in a collection context
rather then a document context and would solve the same problem. That
wouldn't really be standard XSLT but would be standard XQuery. The key
really is if you can map XSLT back to the XQuery algebra, if you can do
that then XSLT is a perfectly valid XQuery language. Of course to do
that you have to understand the algebra first...


> Mike Kay
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
Kimbro Staken
Chief Technology Officer
dbXML Group L.L.C
http://www.dbxmlgroup.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.