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

RE: How to filter element values...

Subject: RE: How to filter element values...
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Sat, 07 Feb 2004 00:17:19 -0500
filter element
Josh,

There are defaults that apply to each mode, also, as described in the XSLT Rec, section 5.8:

There is also a built-in template rule for each mode, which allows recursive processing to continue in the same mode in the absence of a successful pattern match by an explicit template rule in the stylesheet. This template rule applies to both element nodes and the root node. The following shows the equivalent of the built-in template rule for mode m.

<xsl:template match="*|/" mode="m">
  <xsl:apply-templates mode="m"/>
</xsl:template>

I hope this fills it in for you --


Cheers,
Wendell

At 07:42 PM 2/6/2004, you wrote:
It looks like the <xsl:apply-templates mode="g"/> at the bottom of the Global template is causing the default template to get invoked.

Adding a new empty template

<xsl:template match="Global/text() | EVENT/text()" mode="g"/>

Will fixes the problem.

I'm not sure why the default template is being invoked in this case. I read both http://www.w3.org/TR/xslt#modes and http://www.w3.org/TR/xslt#built-in-rule and they seem to be saying that only templates with a matching mode will be invoked. The

Can anyone explain why this is happening?

___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau



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.