You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Brian Silberbauer <br...@magmatec.co.za> on 2000/05/25 11:56:48 UTC

import tag, setSystemId and Linux

Hi

I have an xsl file with an import in it. I do the following:  in my code
I first read the document base of all my xsl files from a property file,
then create a XSLTInputSource with the xsl file and finally set the
SystemId to the xsl document base. This works under NT, but when I move
over to Linux, it tries to find the import files from a directory above
the document base?!?

ie: docbase = /home/poi/arb/xsl and import = template.xsl
It returns an error for the file /home/poi/arb/template.xsl

What happened to the xsl directory?

I get around this problem by copying my xsl files into the directory
above the xsl document base and everything is peachy, but am I missing
something here? Why does it work under NT?

brian


<code>
 File fFile = new File(sDocbase, sFilename);
 FileInputStream fIn = new FileInputStream(fFile);
 XSLTInputSource xsltIn = new XSLTInputSource(fIn);
 xsltIn.setSystemId(sDocbase);
</code>

<from the xsl file>
 <xsl:import href="template.xsl"/>
</from the xsl file>



Re: import tag, setSystemId and Linux

Posted by Brian Silberbauer <br...@magmatec.co.za>.

Peter Donald wrote:

> Hi,
>
> At 11:56  25/5/00 +0200, you wrote:
> >ie: docbase = /home/poi/arb/xsl and import = template.xsl
> >It returns an error for the file /home/poi/arb/template.xsl
>
> This sounds like a similar problem I had on some win32 vms. Try to use
> docbase = /home/poi/arb/xsl/
>

I have tried that and it does work with sun's jsdk1.2.2 and 1.3; on the
linux box I have sun's jsdk1.2.2 for linux.

I will debug through the Xalan/Xerces libraries today and get more
information.

brian

>
> Cheers,
>
> Pete
>
> *------------------------------------------------------*
> | "Nearly all men can stand adversity, but if you want |
> | to test a man's character, give him power."          |
> |       -Abraham Lincoln                               |
> *------------------------------------------------------*
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org


Re: import tag, setSystemId and Linux

Posted by Peter Donald <do...@mad.scientist.com>.
Hi,

At 11:56  25/5/00 +0200, you wrote:
>ie: docbase = /home/poi/arb/xsl and import = template.xsl
>It returns an error for the file /home/poi/arb/template.xsl

This sounds like a similar problem I had on some win32 vms. Try to use
docbase = /home/poi/arb/xsl/

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*