[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: URI of the passed Source-Document

Subject: RE: URI of the passed Source-Document
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 10:51:25 -0000
RE:  URI of the passed Source-Document
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.merico@xxxxxxx] 
> Sent: 10 March 2009 09:35
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.