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

Re: Getting the name the input data document

Subject: Re: Getting the name the input data document
From: "Mark Wilson" <mark@xxxxxxxxxxxx>
Date: Fri, 21 Aug 2009 01:21:07 -0700
Re:  Getting the name the input data document
Thanks. Michael.
By the way, I looked up XProc (you suggested using it rather than a batch file). However, I am very unclear as to where it is supported. I use Oxygen [which uses saxon].


Thanks Michael, for your help and willingness to share your knowledge.
Mark

--------------------------------------------------
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Sent: Friday, August 21, 2009 1:07 AM
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE:  Getting the name the input data document



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

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-2013 All Rights Reserved.