469,946 Members | 1,908 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

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

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.startE lement(ProcessorInclude.java:146)
[9/19/05 15:30:07:063 CEST] 3749da83 SystemErr R at
org.apache.xalan.processor.StylesheetHandler.start Element(StylesheetHandler.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.AbstractSAXParser.startE lement(AbstractSAXParser.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.AbstractXMLDocumentParse r.emptyElement(AbstractXMLDocumentParser.java(Comp iled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.sc anStartElement(XMLNSDocumentScannerImpl.java(Compi led
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(XMLDocument FragmentScannerImpl.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(XMLDocumentFragmentScannerImpl.ja va(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.DTDConfiguration.parse(D TDConfiguration.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.DTDConfiguration.parse(D TDConfiguration.java(Compiled
Code))
[9/19/05 15:30:07:064 CEST] 3749da83 SystemErr R at
org.apache.xerces.parsers.XMLParser.parse(XMLParse r.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

Sep 22 '05 #1
0 1986

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Rupa | last post: by
5 posts views Thread by Shiju Rajan | last post: by
2 posts views Thread by gimme_this_gimme_that | last post: by
4 posts views Thread by renderman | last post: by
2 posts views Thread by Kniffel | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.