Re: [xsl] Global XSL

Subject: Re: [xsl] Global XSL
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Tue, 23 Oct 2001 15:27:46 -0400
[Raj Reddy]

> I am a Front End web designer. We already finished a project using HTML
> Templates. Now I would like to create a Global XSL for all the pages as
they
> all look similar. They have common UI elements like Page Header, Sub
Header,
> Tables, Rows and Columns . Most of the pages are in the table format. is
it
> possible to create a Common XSL for all the pages. I have used Cascading
> Styel Sheets and some graphics elements.
>
> As I am beginner to XSL, I appreciate your help on how I go about this.
Are
> there any tutorials where I can go through some examples similar to my
> requirement ?
>

It's very possible and there is more than one way to go about it.  Typically
I use a master XML template, a master xslt stylesheet, and an xml file that
is customized for each page.  You run the stylesheet against the customized
file, and bring in the master template using the document() function (can be
done the other way around, too).

Depending on what you want to do, you may also want to create customized
stylesheets for each section of your website and have them import the master
stylesheet.  In any event, you want to try to use a driver xml file that
contains all your page-specific customizations, so that they are in just one
place.  It might, for example, contain the page and section titles,
background color, and so on.  It could also specifiy the contents of your
tables, or better, the name of separate XML files that contain that data.

If you can create your pages beforehand using a batch process, so much the
better.  Then you can use multiple passes with different stylesheets, all
run by the batch process.  This can make it easier to keep different aspects
of the specific pages separate from the common aspects.

Cheers,

Tom P


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


Current Thread