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

Re: include css in xsl

Subject: Re: include css in xsl
From: Steve Rosenberry <Steve.Rosenberry@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Mar 2003 13:15:03 -0500
xslt include css
TP wrote:
> 
> Then I tried by replacing ../css/style.css with the absolute path and it
> worked. But obviously, writing the absolute path in the stylesheet would be
> murder in transferring this on say linux for example.
> 

Been there, done that!  Excellent opportunity to use one or more
variables for various path names (e.g. css path, cgi-bin path, image
path).  Depending upon how many you have and where they're used, these
can be placed in a separate XSLT path configuration file to be included
in the functional XSLT files.  Keep a configuration file locally for
offline development and another online for the server environment.  When
you change environments, you change the paths in a single file only.  

Bottom line rule: No paths, absolute or relative, hard-coded in the
XSLT.  (This is XSLT version of the C/C++ rule, use #define constants
instead of actual numbers.)

If you go this way, other little things you may find useful:

1) A batch file to rebuild all the HTML pages for when the path
configuration file changes -- and it will.

2) An XSLT named template to create complete path names from base
names.  In my application, the base name was in different XML elements,
and based upon the element, I would select the appropiate path name to
combine with the base name for a complete path.

-- 
Steve Rosenberry
Sr. Partner

Electronic Solutions Company -- For the Home of Integration
http://ElectronicSolutionsCo.com

(610) 670-1710

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.