xsl:import not working when using relative path on AIX 5.2

A

atlantis

Hi,


I have a very strange problem with xsl:import when usig RELATIVE path
on AIX 5.2 server.

I have two XSL files in the same directory: "ists_xslt3.xsl" and
"ists_xslt3_layout.xsl". This is what the beginning of "ists_xslt3.xsl"
looks like:

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="ists_xslt3_layout.xsl"/>
--------------------------------------------------------

I'm using these stylesheets to transform XML files into PDF and its a
Java based application running on IBM WebSphere 5. When the
transformation is executed I get this error:

--------------------------------------------------------
; SystemID:
file:////usr/WebSphere/AppServer/installedApps/scube11Network/ISTS_v20010.ear/ists.war/ists/templatesCR/ists_xslt3.xsl;
Line#: 4; Column#: 43
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R ; SystemID:
file:////usr/WebSphere/AppServer/installedApps/scube11Network/ISTS_v20010.ear/ists.war/ists/templatesCR/ists_xslt3.xsl;
Line#: 4; Column#: 43
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R
javax.xml.transform.TransformerException: Had IO Exception with
stylesheet file: ists_xslt3_layout.xsl
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:884)
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:927)
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:277)
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:146)
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1125)
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:795)
--------------------------------------------------------


And now the fun part:

This application was first running on AS/400 server and the XSL
transformation worked fine. The transformation works fine when I run
the application on my local Win2000 machine. But on AIX 5.2 it only
works when I use ABSOLUTE path to import the XSL file:

--------------------------------------------------------
<xsl:import
href="file:/usr/WebSphere/AppServer/installedApps/scube11Network/ISTS_v20010.ear/ists.war/ists/templatesCR/ists_xslt3_layout.xsl"
/>
--------------------------------------------------------


I've seen a few posts describing similar problem, but none of the
advices worked for me (a very common one was to change the current
working directory to the location of XSL files but I used
System.getProperty("user.dir") and it returns path to the directory
whare my stylesheets are located).

Thanks for any help!


Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top