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

RE: The collection() function

Subject: RE: The collection() function
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 14 May 2007 11:25:03 +0100
RE:  The collection() function
> Why is the way in which a URI can be used to locate a 
> collection of documents in the collection() function entirely 
> implementation-defined?

Because the primary motivation for introducing the function was to allow
searching for documents within an XML database, and different XML databases
have different conventions for partitioning the set of documents held in the
database. Some, for example, have versioning mechanisms that allow you to
refer to the collection of documents at a particular version. The WGs didn't
feel that the concepts were ready for standardization.

There was of course a fair bit of debate about this. Why not just allow
collections to be referenced by vendor-defined extension functions? One of
the key differences is that even if the URIs aren't compatible across
products, you can write interoperable queries by using
collection($collection) where the actual value of $collection is passed as a
run-time parameter. That would be much more difficult if different products
used different function names. 
> 
> How can non-standardized standard functions be a good thing?
> 
Sometimes they allow consensus to form over time, or even secondary
standards. For example, a group of non-database products might decide by a
process of consensus to treat URIs of the form file://some/dir/ to refer to
all the files with file extension .xml contained in the directory/folder
identified by the URI. Or the SQL-XML standards group might define a URI
scheme permitting a URI of the form table:user/table/column to refer to the
collection of XML documents held in a particular column of a table in a
relational database.

Michael Kay
http://www.saxonica.com/

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-2007 All Rights Reserved.