<xsl:import href... why won't relative path work?

Here should go questions about transforming XML with XSLT and FOP.
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

<xsl:import href... why won't relative path work?

Post by jbzech »

Hi,

I'm still fairly new to XSLT & Oxygen, but I'm not sure what I'm doing wrong here.

I'm writing a customization layer for the DocBook XSL stylesheets. In my layer I import the standard style sheets with this:

Code: Select all

    <xsl:import href="docbook-xsl-ns-1.76.1/html/docbook.xsl"/>
The full directory of stylesheets exists in the same folder at the same level as my customization layer. The HREF should be valid.

But I keep getting an error that the file can't be found and the address it is looking for is an old address.

Code: Select all

E [Saxon6.5.5] Failure reading file:/C:/Users/zech/Desktop/SVN_WorkingCopies/XML%20Tools/XXXX_ShortTitle/xml_XXXX_ShortTitle/frameworks/docbook/xsl/html/docbook.xsl - C:\Users\zech\Desktop\SVN_WorkingCopies\XML Tools\XXXX_ShortTitle\xml_XXXX_ShortTitle\frameworks\docbook\xsl\html\docbook.xsl (The system cannot find the path specified)
The relative path to the resource is fine, and the file is there. Why is Oxygen insisting on searching for the resource in an old location that doesn't exist anymore? How do I redirect it?

Thanks!
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: <xsl:import href... why won't relative path work?

Post by adrian »

Hello,

Look in the transformation scenario that you are using to transform the DocBook document(Document -> Transformation -> Configure Transformation Scenario). What stylesheet is used there(XSL URL)?

Also, make sure that there are no additional(cascaded) XSLT stylesheets in the scenario. Press the Additional XSLT stylesheets button and remove all stylesheets found there.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

Re: <xsl:import href... why won't relative path work?

Post by jbzech »

That's not the issue. I did double check, and the XSL URL is referring to the stylesheet I want. But that stylesheet has an import, and it is the import that is failing. The problem is that the relative path to the import file is fine:

<xsl:import href="docbook-xsl-ns-1.76.1/html/docbook.xsl"/>

In the same directory I have the docbook style sheet folder.

But the error message I get indicates that the HREF is trying to find a version of the stylesheets in another folder that doesn't even exist anymore. Why isn't it using the relative path? Why is it trying to go somewhere else?

Error message shows where it is trying to go.

SystemID: C:\Users\zech\Desktop\SVN_WorkingCopies\3613_ChargedWithGrandeur\xml_3613_ChargedWithGrandeur\LP_customHTML_XSL.xsl
Engine name: Saxon6.5.5
Severity: warning
Description: Failure reading file:/C:/Users/zech/Desktop/SVN_WorkingCopies/XML%20Tools/XXXX_ShortTitle/xml_XXXX_ShortTitle/frameworks/docbook/xsl/html/docbook.xsl - C:\Users\zech\Desktop\SVN_WorkingCopies\XML Tools\XXXX_ShortTitle\xml_XXXX_ShortTitle\frameworks\docbook\xsl\html\docbook.xsl (The system cannot find the path specified)
Start location: 10:0
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

Re: <xsl:import href... why won't relative path work?

Post by jbzech »

Also, there are no additional stylesheets associated with this.
jbzech
Posts: 37
Joined: Fri May 20, 2011 6:07 pm

Re: <xsl:import href... why won't relative path work?

Post by jbzech »

Ah! I think I found the problem, and of course it was of my own doing. I was experimenting with catalog files (still don't quite get them). I'd created my own and added it to the list of catalog files. This thing, I believe, pointed to the old location. Once I deleted it, the transformed worked just fine.

Thanks!
Post Reply