[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] processing code embedded inside a stylesheet


Subject: [xsl] processing code embedded inside a stylesheet
From: "Jeffrey Moss" <jeff@xxxxxxxxxxxx>
Date: Tue, 13 Apr 2004 16:49:39 -0600

I have a number of templates that are all recursed using a simple
<xsl:apply-templates /> within all the templates, its for processing XHTML.

I want to put some nodes to match inside another template, for example:

<xsl:template match="template:header">
 <head>
  <title><xsl:value-of select="@title" /></title>
 </head>
</xsl:template>

<xsl:template match="template:body">
 <body>
  <xsl:apply-templates />
 </body>
</xsl:template>

now I want to do:

<xsl:template match="template:defaultpage">
<html>
 <template:header title="Hello World" />
 <template:body>
  <xsl:apply-templates />
 </template:body>
</html>
</xsl:template>


Is there a way to tell xsltproc to process these nodes as if they were part
of the source file?

-Jeff


Current Thread