AW: [xsl] Is there a neat way to get style-sheet relative paths?

Subject: AW: [xsl] Is there a neat way to get style-sheet relative paths?
From: <christof.hoeke@xxxxxxx>
Date: Mon, 19 Jul 2004 13:55:45 +0200
hi,

> Betreff: [xsl] Is there a neat way to get style-sheet relative paths?
>
> some info is
> contained in a css-file and there are image files to load as
> well, which are
> located in the style directory. (I did not want to use css,
> but I could not
> find another way to produce an output media dependent style,
> among other
> things, and I am open to suggestions!) This is how I
> reference the css:
>
> <xsl:template match="/">
>  <html>
>   <head>
>    ...
>    <link rel="stylesheet" type="text/css" href="ReportStyle.css" />
>   </head>
>
> Obviously this is referenced after the html is generated and therefore
> refers to the then current directory. I don't want to carry
> the relative
> path info into the xml-file, other than in the stylesheet
> reference above,
> unless I have to. So, is there a way to somehow use the


if you are accessing the resulting html files from a webserver afterwards the
best would be to use an absolute path to load css and images, something like
"/css/ReportStyle.css" or "/images/example.jpg". both have no real connection
with the xslt files as they are not used by them. I would not even put them in
the same directory with the xslt files unless you generate the HTML files
there as well. if so you could just use the simple href as in your example
above. i think you should distinguish between files that are needed for the
generation (XSLT and XML files) and files needed after generation (resulting
HTML files, css, images, Javascripts etc)

does this make sense or am i missing something?
chris

Current Thread