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

relative and base URIs when using document() function

Subject: relative and base URIs when using document() function
From: Linda van den Brink <lvdbrink@xxxxxxx>
Date: Wed, 5 Apr 2000 15:19:18 +0200
xsl document function path
Hi all, 

I'm getting some behaviour I can't explain when I use the document()
function multiple times. Maybe I'm just staring at my code to hard... 

I've a source document that lists URLs, which I read with the document
function to go to a second source document, of which a code fragment is
included below. What I'm trying to do is go to yet another series of source
documents, of which the URL is in the second source document. The first time
this succeeds (when I read content/path), the second time it fails (when I
read modules/module/path). (I hope I'm making myself clear...)

Code fragment [of second source doc]: 

<?xml version="1.0"?>
<package_index>
<content>
	<path>../package_ts/content_ts.xml</path>
</content>
<modules>
	<module>
		<name>Configuration Control</name>
		<identification>cfg</identification>
		<path>..\package_ts\module_cfg\module_cfg.xml</path>
	</module>
</modules>

Stylesheet fragment: 

<xsl:template match="module">
<xsl:variable name="path" select="substring-after(path, concat($package,
'\'))"/>
	<xsl:message terminate="no"><xsl:value-of
select="$path"/></xsl:message>
	<xsl:for-each select="document($path, .)">
		<xsl:apply-templates/>
	</xsl:for-each>
</xsl:template>

Where the base URL is the URL of the source file, in this case
E:\homework\HTMLHelp\Conversion\online_help\en\package_ts\

I get the following messages: 
xt message output: module_cfg\module_cfg.xml
java.io.FileNotFoundException:
\E:\homework\HTMLHelp\Conversion\online_help\en\package_ts\module_cfg\packag
e_ts\module_cfg\content_cfg.xml

Where does the repeatal of 'package_ts\module_cfg\' come from??

I've tried lots of variants but to no avail. Who knows what's wrong? 

Linda vdB





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.