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

Re: Can't filter the data correctly

Subject: Re: Can't filter the data correctly
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 19 Sep 2003 19:49:06 +0100
filters data matching

  <xsl:template match="sites/site[@name='company_name']/tasks">

a template only does anything idif you apply templates to teh matching
node. In this case that is a tasks node

However you do not apply templates to taks node:

  <xsl:apply-templates select="sites/site/tasks/task"/>  

You stepped right past the tasks nodes and just apply templates
to the task node.

Without seeing your input have to gues, but I guess

<xsl:template match="sites/site[@name='company_name']/tasks/task">
  <xsl:value-of select="."/><br/>
</xsl:template>

although that only applies that template to company_name taks and will
do the default template on the others. You could zap them with
<xsl:template match="task"/>

but simpler is probably just to select the tasks you want, as you had
originally

<xsl:template match="/">
  <xsl:apply-templates select="/sites/site[@name='company_name']/tasks/task"/>
</xsl:template>


David

 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.