This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: More Multi-Document Mambo
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] More Multi-Document Mambo
- From: Laurence O Garfield <lgarfiel at students dot depaul dot edu>
- Date: Wed, 18 Jul 2001 20:25:26 -0500 (CDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
On Wed, 18 Jul 2001, David Carlisle wrote:
> well, either use two different modes, or make your default templates
> explictly use the document element
As suggested, I'm now using different modes for different parts of the
stylesheet. In particular, when I hit one of the triggers in the template
file, I am then using mode="sourceTree" from then on in all templates and
apply-templates. However, I'm still getting the same error.
<!-- This is the Identity transform -->
<xsl:template match="@*|node()|text()">
<xsl:param name="chapter"/>
<xsl:param name="chNum"/>
<xsl:copy>
<xsl:apply-templates select="@*|*|text()">
<xsl:with-param name="chapter" select="$chapter"/>
<xsl:with-param name="chNum" select="$chNum"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<!-- This SHOULD omit any element called with mode="sourceTree"
that doesn't have a specific template for it, shouldn't it? -->
<xsl:template match="*" mode="sourceTree"/>
However, when I run the stylesheet, the null template above catches ALL
elements called with mode="sourceTree" and omits them, despite the
presence of such templates as
<xsl:template match="para" mode="sourceTree">
<p>
<xsl:apply-templates mode="sourceTree"/>
</p>
</xsl:template>
... which should catch <para> elements called with mode="sourceTree"
before the default null rule does. Shouldn't it? What am I missing?
--Larry Garfield
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list