xsl-list
[Top] [All Lists]

RE: [xsl] The collection() function

2007-05-14 03:25:22
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--