Re: [basex-talk] XSLT import with relative path fails

2012-10-04 Thread Michael Seiferle
Hi Alexandros,

thanks for your mail, I will have a look at this. IIRC there is no URI 
resolution on BaseX’ behalf, but maybe the current working directory for Saxon 
is not set to what Saxon expects. 
Out of curiosity, does it work if you use absolute paths in the first place? I 
guess you are calling sth. like xslt:transform($doc, "path/to/tei/...")

I'll try to have a look at it this afternoon, I guess this issue might as well 
affect other users. 
If you could provide me with a SSCE that can be run easily that would be great 
but not a necessity.

Cheers
Michael

Am 02.10.2012 um 16:50 schrieb Charles Kowalski :

> Hi,
> 
> I am trying to use TEI-to-xhtml stylesheet* provided by the tei consortium 
> using the saxon HE transformer.
> The importing of xsl dependencies fails with this error:
> XTSE0165: I/O error reported by XML parser processing file:/../xhtml2/tei.xsl:
>   /../xhtml2/tei.xsl (No such file or directory)
> The specific file i try to run is 
> The actual href in the xsl:import is  href="../../../xhtml2/tei.xsl"/>
> 
> From the error message it looks as if the relative path: 
> "../../../xhtml2/tei.xsl"
> is converted to the (non-existent) absolute path: "/../xhtml2/tei.xsl 
> 
> The same transformation works fine if called from the cli with
> java -jar path/to/saxon9he.jar some-tei.xml 
> path/to/tei-stylesheets/xml/tei/stylesheet/profiles/tei/html/to.xsl
> Is there some sort of url resolution happening on behalf of basex before the 
> xsl is passed to saxon?
> 
> I will try to reproduce with a set of less complex xsl files but it seems 
> like the issue lies with relative path resolution.
> 
> Thanks, 
> Alexandros
> 
> *You can download the latest stylesheets from sourceforge at: 
> http://sourceforge.net/projects/tei/files/Stylesheets/tei-xsl-6.14.zip/download
> ___
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] XSLT import with relative path fails

2012-10-02 Thread Charles Kowalski

Hi,

I am trying to use TEI-to-xhtml stylesheet* provided by the tei 
consortium using the saxon HE transformer.

The importing of xsl dependencies fails with this error:

   XTSE0165: I/O error reported by XML parser processing
   file:/../xhtml2/tei.xsl:
  /../xhtml2/tei.xsl (No such file or directory)

The specific file i try to run is
The actual href in the xsl:import is href="../../../xhtml2/tei.xsl"/>


From the error message it looks as if the relative path: 
"../../../xhtml2/tei.xsl"

is converted to the (non-existent) absolute path: "/../xhtml2/tei.xsl

The same transformation works fine if called from the cli with

   java -jar path/to/saxon9he.jar some-tei.xml
   path/to/tei-stylesheets/xml/tei/stylesheet/profiles/tei/html/to.xsl

Is there some sort of url resolution happening on behalf of basex before 
the xsl is passed to saxon?


I will try to reproduce with a set of less complex xsl files but it 
seems like the issue lies with relative path resolution.


Thanks,
Alexandros

*You can download the latest stylesheets from sourceforge at: 
http://sourceforge.net/projects/tei/files/Stylesheets/tei-xsl-6.14.zip/download
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk