This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Streamline xslt


> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Geoff
> Sent: Wednesday, September 25, 2002 12:26 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] Streamline xslt
>
>
> I love using XSLT because I can expose my web pages as xml
> and use xslt to transform the xml into html or something else
> like wml. The presentation is cleanly separated from content.
>
> The problem I see is if I need to change the presentation. I'm sure
> someday at some point someone will say let's give the Website a new
> look. Each "page" has a php script that either points to an
> xml file or creates xml on the fly, then points to an xsl file
> and passes this to the Sablotron processor. To change the site
> design I have to update each xsl file in the site...

<snip>

We have taken a slightly different approach.

All the "pages" are stored as XML data files, no style info, just data
types, i.e.: paragraph, title, subhead, etc.

Depending on the presentation needed (we have 3 different ones) different
XSLT files are used, all based upon context. Each XSLT has INCLUDED each of
these "data" types styles are defined in CSS files.

A central XML MAP file defines which XSLT is used in which context, and each
XML is tied to XSLT in general.

So, welcome.xml is tied to welcome.xsl. The XML MAP file looks at the
context (which site design to use based on other info) and translate
welcome.xsl to any defined welcome.xsl for each context.

This gives us...
 - a single data file
 - a single XSLT file per context
 - a matching CCS per context

Change the content in a single XML file, this appears in all contexts.
Change the design in a single context, it does not disturb the data or the
other contexts.

Very straight forward.

Just my 2 cents.

walter


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]