Provided that the primary input document has a URI, it should be possible to
obtain it using either document-uri() or base-uri().
In the case of Saxon, I think that if you use a user-written URIResolver it
is possible for these to be different (document-uri() is the URI given as
input to the URIResolver, base-uri() is the SystemID property of the Source
object returned by the URIResolver), but in most cases they will give you
the same answer.
It is possible to supply a primary input document with no URI, for example
in the form of a DOMSource or a StreamSource whose SystemID property has not
been set - but it's not recommended and is a common source of trouble.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Merico Raffaele [mailto:raffaele(_dot_)merico(_at_)less(_dot_)ch]
Sent: 10 March 2009 09:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] URI of the passed Source-Document
Dear List
I looked around but I did not found a reliable way in XSLT 2
to get the URI of the source document passed to the XSLT processor.
I know that there is a way to get URI of a document accessed
by document(), but that is not what I'm looking for.
I'm working with SaxonB 9.x.
For your support many thanks in advance.
Raffaele
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--