I have this XSLT:
<xsl:copy-of select="document($file1)/employee/address/*"/>
I have this java which is setting the parameter for $file1
transformer.setParameter("file1",file.getAbsolutePath());
I printed out the value of $file1 in the XSLT style sheet using:
<xsl:message><xsl:value-of select="$file1"/></xsl:message>
The Path it prints out is the correct path, let say its c:\myfile\file1.xml
When it reaches the doument($file1) function, it seems that the path is getting changed.
To give you an example, if $file1 = "c:\myfile\file1.xml" and my XSLT file is located at c:\xsl\myXSl.xsl then the path that document() gets is:
c:\C:\xsl\myfile\file1.xml
This causes the following error to occur:
(The filename, directory name, or volume label syntax is incorrect)
Why is document() inserting the path where the XSL file which it is in into the path of the file I'm trying to open? I am using the Xalan API to transform this XML.
Have anyone seen anything like this before?
Thanks
Al