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

Nested predicate question

Subject: Nested predicate question
From: "Tom Heiber-Cobb" <Tom.Heiber-Cobb@xxxxxxxxxxxx>
Date: Mon, 28 Jul 2008 15:35:15 -0500
 Nested predicate question
In the example below I expect that I'm applying a template
rule for the <list> element and using a nested predicate
in which I'm saying "only apply this rule if a child of
<list> is <xyz> which has a child of <PPP>".
But in my example I've inadvertently set up the template
to match on <xyz>.
Nevertheless, the template with a mode named "test" gets
invoked.
Why is this the case?
Apologies if there's not enough here. I wanted to try and
get to the crux of my issue without having a lot extra junk.
xalan 2.3.1 by the way.
 
<ABC>
 <def>
  <list>
   <xyz>
    <QQQ></QQQ>
   </xyz>
   <xyz>
    <QQQ></QQQ>
    <PPP></PPP>
   </xyz>
  </list>
 </def>
</ABC>
 
<xsl:template match="def">
 <xsl:apply-templates select="list[xyz[PPP]]" mode="test" />
</xsl:template>
 
<xsl:template match="xyz" mode="test">
 <xsl:message><xsl:value-of select="name()" /></xsl:message>
 ...
</xsl:template>

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.