Isn't XSLT only meant to access one document at a time?
- The source tree data model extends the XPath model to allow multiple root elements, text, etc. at the top-level. One approach
could be to logically concatenate in some order all the documents in the XML repository into this one tree. Then, for example,
/foo would access every root element whose name is "foo".
- Some problems with this approach:
- Retaining document identity is important for the
id() function, among other things.
- For example, you may wish to return the entire document, including processing instructions and comments, even though you don't
know the document's name (and thus can't access it via the
- Ultimately, this is also (at least currently) a problem for XQuery, which in one place states, "A query can also contain a
path expression beginning with '/' or '//' which represents an implicit root node, determined by the environment in which
the query is executed." Yet, in another place, it says, "In XQuery, '/' denotes the root of the document of the current node."
It can't be both, so which is it?