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

RE: doc paths

Subject: RE: doc paths
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 20 Nov 2004 08:48:53 -0000
resolve uri
You could either (a) use the document function rather than doc - document()
resolves URIs relative the base URI of the node that they come from, in the
case where they come from a node, or (b) resolve the URI yourself using the
resolve-uri() function in XPath 2.0.

document($nodes) is more-or-less equivalent to

for each $n in $nodes return
  doc(resolve-uri(string($n), base-uri($n)))

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

> -----Original Message-----
> From: Bruce D'Arcus [mailto:bdarcus@xxxxxxxxxxxxx] 
> Sent: 20 November 2004 03:34
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  doc paths
> 
> I decided to try to implement my idea to use XSLT 2.o temporary trees 
> to resolve xincludes, but am stuck on how to deal with the paths 
> properly.  How do I modify the below to look for the path relative to 
> the document, rather than the stylesheets?
> 
>    <xsl:template match="xi:include" mode="resolve-linked-docs">
>      <xsl:copy-of select="doc(@href)" />
>    </xsl:template>
> 
> Bruce

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.