RE: [xsl] How to filter element values...

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

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"/>

I hope this fills it in for you --


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 and 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:

Current Thread