[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] relative and base URIs when using document() function
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|