A strange XSLT thing is bugging me...

In XPathScript because it's not XML I can create unbalanced component pieces, so I can basically have:

1. TOP BIT
2. CUSTOM Per-Page BIT
3. content
4. CUSTOM Per-Page BIT
5. BOTTOM BIT

I can't do that in XSLT because everything has to be balanced (xml tag wise). So I was wondering what people use to create this effect? The way I was thinking was a named template call in a standard template implementing 1 and 5, and calling a named template for 2,3,4. The named template is in the XSLT that includes the "/" template.

So something like this:

global.xsl:
<xsl:template match="/">
<html>
<head>...</head>
<body>
<div something>
<xsl:call-template name="main-content"/>
</div>
</body>
</html>
</xsl:template>

foo.xsl:
<xsl:include href="global.xsl"/>
<xsl:template name="main-content">
<!-- custom header here -->
<xsl:apply-templates/>
<!-- custom footer here -->
</xsl:template>

So the question is - does this work?

Matt.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to