xsl-list
[Top] [All Lists]

RE: doc paths

2004-11-20 01:48:53
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(_at_)myrealbox(_dot_)com] 
Sent: 20 November 2004 03:34
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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


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



<Prev in Thread] Current Thread [Next in Thread>