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

Re: How to use mode

Subject: Re: How to use mode
From: Goetz Bock <bock@xxxxxxxxxxx>
Date: Tue, 26 Jun 2001 11:31:55 +0200
bock 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
Description: PGP signature

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.