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]

RE: multiple stylesheets in one


> that uses a stylesheet that includes this data plus three other
> (essentially) static 
> html files.
> 
> ie :-
> 
> header.xsl
> data.xsl - using the above xml file
> footer.xsl
> 
If header.xsl is completely fixed (ie.. it is really header.xhtml) then the
simplest thing to do to include it in the output is

<xsl:copy-of select="document('header.xhtml')"/>

An alternative is to wrap it up as an xsl variable:

<xsl:stylesheet ...>
<xsl:variable name="header">
   ... here goes your header HTML ...
</xsl:variable>
</xsl:stylesheet>

Then you can use the top-level element <xsl:include href="header.xsl"/> to
include this in your main stylesheet module, and the instruction
<xsl:copy-of select="$header"/> to copy the contents to the output file at
the place you want it. But it only really makes sense to do this if it's not
fixed, e.g. it can contain <xsl:value-of select="$xyz"/> to substitute a
global variable defined in the main stylesheet module.

Mike Kay

 


 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]