|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to use mode
On Tue, Jun 26 '01 at 11:18, Griebel, Peer wrote:
> 1. Is a mode preserved? More precisely: If I call
> <xsl:apply-templates mode="some-mode"/>
> And some called templated itself calls apply-templates, is it still in mode
> some-mode?
No, but that is not a problem, if you do:
<xsl:apply-templates select="foo" mode="bar">
the template:
<xsl:template match="foo" />
will not be called, only
<xsl:template match="foo" mode="bar"/>
and there you can simply do:
<xsl:template match="foo" mode="bar">
<!-- do something -->
<xsl:apply-templates mode="bar"/>
</xsl:template>
to keep your mode.
> 2. How do I switch back to default mode? Templates specified without a mode
> are in default mode. But how can I call a template without a mode
> specification?
what about <xsl:apply-templates />
> 3. How can I combine modes?
You can't, but
<xsl:apply-templates mode="some-mode"/>
<xsl:apply-templates mode="some-other-mode"/>
should have the desired effect. But are you sure you realy need modes.
Goetz.
Attachment:
pgp00013.pgp
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








