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


Geoff,

The Right Way to do it is for your stable bits and less-stable bits to be separated, as you suggest, but to design your XSLT in such a way that this can be done cleanly, with complete stylesheet fragments (named templates and such can be a big help), and then use xsl:import and/or xsl:include. You shouldn't need to include bits that aren't well-formed.

(If they were well-formed except for lacking a document element, strictly speaking it'd be possible to use entities for this, though this generally wouldn't be recommended.)

If you can't see how to split your stylesheet into suitable fragments, show us the hard parts and someone can speak to it.

Cheers,
Wendell

At 01:26 PM 9/25/2002, you wrote:
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.The html is the same for each xsl stylesheet except
the part where the xsl code lives.So ideally I would divide the file
into header.inc, the xsl part and footer.inc.

The first thought I had was use includes. Php includes won't work
because the first thing the Sablotron processor sees is <?php //php code
?>. I assume the same problem occurs with Apache includes.
XSL includes must be well formed xml documents so that wouldn't work
either.

Any suggestions?

======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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]