xsl-list
[Top] [All Lists]

RE: [xsl] Getting the name the input data document

2009-08-21 04:08:26
 

I just remembered that isn't the only way ... you can also 
use base-uri():


document-uri() and base-uri() for a document node will usually be the same,
but not necessarily.

document-uri() should be used if you want a URI that can be used to fetch
the document.

base-uri() should be used if you want to resolve relative URIs contained in
the document.

An example where they are different is for a temporary tree constructed
within the stylesheet. This will generally have a base URI but no document
URI. They can also potentially be different for a document read using the
doc() function: document-uri() will typically be the URI that was passed to
the doc() function, while base-uri() will be the URI of the document that
was returned: they may be different for example if a URIResolver is used, or
even if URI redirection takes place.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  


--~------------------------------------------------------------------
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>
--~--