Re: [xsl] XSL manipulating two XMLs

Subject: Re: [xsl] XSL manipulating two XMLs
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Thu, 02 May 2002 00:50:48 +0200
Najmi, Jamal wrote:
I am using xalan for transformation in tomcat servlet engine. I copy the
two XML files and the XSL to a directory created on the fly, import one XML
file into XSL and pass the other one via the Xalan API. Every thing shoud
work except that XSL transformer starts looking for the imported XML file
not in the currtent directory but in the TOMCAT_HOME/bin directory!!! I
tried putting ./ infront of the imported file name but no use.


Hoe can I make the transformer look into the current directory for the
included file:

It seems it actually looked into the current working directory for the process.

Here is how I am importing the XML document:

<xsl:variable name = "contentXml" select ="document('content.xml')"/>

I'm unsure what you situation you acutally have. If both the XML file passed to the transformer object and the file referenced by the document() function are in the same directory, try: <xsl:variable name = "contentXml" select ="document('content.xml',/)"/> ^^ No quotes arount the slash, it denotes the root node of the XML document you passed to the transformer object.


BTW you are supposed to trim unnecessary "original messages" from time to time.

J.Pietschmann



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


Current Thread