[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Is there a neat way to get style-sheet relative paths?

Subject: Is there a neat way to get style-sheet relative paths?
From: "Harald Brinkmann" <hbbst@xxxxxxx>
Date: Mon, 19 Jul 2004 13:33:17 +0200 (MEST)
stylesheet relative path
Hello everyone,

for display on an IE 6.0 I want to use this directory structure:

  somepath/data/DataFiles.xml

for xml files containing the data and

  somepath/style/StyleFiles.xsl

for the style info to be used.

The explorer knows about the stylesheet to be used by finding a

  <?xml-stylesheet type="xsl/text" href="../style/StyleFiles.xsl"?>

line in the xml data files. So far, so good. Unfortunately 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 stylesheet-path, so
that the href for the css and image includes look in the stylesheet
directory rather than the data directory? I have found a way to include
other xml files located in the style directory by doing

  <xsl:variable name="Lang" select="document( $fn, document(''))/Terms" />

but I couldn't figure out if there is way to use this for css and image
files as well.

Cheers

Harald Brinkmann

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.