David Carlisle schrieb:
, however a system is allowed to reject any URI at all and if it
chooses to reject all uri with fragids passed to doc() or document()
it can do that, but it should raise [err:FODC0005].
which is false. It's true for doc() (which was what I was reading)
but for document() the spec explictly says that the fragment
identifier should be stripped off and used after retrieval.
is the same as
or an error, depending on various factors....
The latter syntax is XSLT 2.0, but the former is very useful syntactic
sugar for 1.0, because it allows to pull a node-set from a secondary
document based on an ID type attribute without creating a result tree
I couldn't find that nice behaviour prescribed by the spec for XSLT 1.0,
but Saxon 6.5 and LibXSLT 1.1.24 implement it. (Xalan 2.7.1 doesn't, and
MSXML 4.0 and 6.0 don't seem to. And AltovaXML Version 2008 rel. 2 sp2
throws an error, which caused this thread.) The spec for 1.0 says:
If the URI reference does not contain a fragment identifier, then a
node-set containing just the root node of the document is returned. If
the URI reference does contain a fragment identifier, the function
returns a node-set containing the nodes in the tree identified by the
fragment identifier of the URI reference. The semantics of the
fragment identifier is dependent on the media type of the result of
retrieving the URI.
"The nodes in the tree identified by the fragment identifier of the URI
reference." Okay, it makes sense to take this to mean a call to the id()
If this nice behaviour is mandatory in 2.0, could you provide a pointer
to the part of the spec saying so? (I couldn't find it.)
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>