[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Process output from imported stylesheet?

Subject: RE: Process output from imported stylesheet?
From: "Magnus Teo" <magnusteo@xxxxxxx>
Date: Thu, 11 Mar 2004 16:33:08 +0800
magnus msn.com
I think you would find it worthwhile studying the FXSL technique pioneered by Dimitre Novatchev. This uses apply-templates rather than call-template for the dynamic call; you steer it dynamically to call a particular template by supply a node that matches that template only.

Michael Kay

- Hi Michael, thanks for the directions. I tried using xsl:choose with call-template and that proved illegal (at least in sablotron). Tried apply-templates with variables but that didn't work too, tried apply-templates using Qnames with xsl:choose but had a problem with selecting the correct block of nodes; the conditions are set in the main template (see below). Maybe I havta return to the drawing board.

<xsl:param name="param_DocID" />
<xsl:template match="/">
<xsl:choose>
<xsl:when test="not($param_DocID)">
<xsl:apply-templates select="*/*/base:Section" />
</xsl:when>
<xsl:when test="*/*/base:Section[//@ID=$param_DocID]">
<xsl:apply-templates select="*/*/base:Section[@ID=$param_DocID]" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="missingDoc" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="base:Section">
<xsl:call-template name="Title" />
<xsl:call-template name="DatePublished" />
<xsl:call-template name="Desc" />
<xsl:call-template name="DateModified" />
<xsl:call-template name="Author" />
</xsl:template>

<xsl:template name="Author">
<div class="cell_author">
<xsl:value-of select="base:Author" />
</div>
</xsl:template>

...

_________________________________________________________________
Find it on the web with MSN Search. http://search.msn.com.sg/


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.