I think it would be better if you referred to the normative text, which in this case is section 16.1, rather than to the paragraph in the compatibility appendix which is only trying to summarize the situation, as a checklist of things that have changed.
There are a couple of weak points in Saxon's handling of fragment identifiers. The first is that it makes no attempt to use the media type of the resource (which is not something that's available from the JAXP URIResolver). It just assumes text/xml. The second is that it makes no attempt to check that the supplied fragment identifier is actually a valid ID, it just tries to find a node with that ID and if none is found, it returns an empty sequence.
Michael Kay

From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Alexander Shrago
Sent: 11 May 2004 14:11
To: saxon-help@lists.sourceforge.net
Cc: Alexander Makanin
Subject: [saxon] question

Hello Mr. Kay!
Please suggest  how to explain the result of my test with saxon 7 :

According to XSL Transformations (XSLT) Version 2.0 (W3C Working Draft 12 November 2003):

"The recovery action has changed for the error condition where the processor cannot handle the fragment identifier in a URI passed as an argument to the document function. XSLT 1.0 specified that the entire URI reference should be ignored. XSLT 2.0 specifies that the fragment identifier should be ignored."

I called function document with incorrect fragment identifier:


and expected that the fragment identifier will be ignored and I shall receive the link to the whole xml document. But function document() has ignored the URI and returned nothing.


Best regards!