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

Re: XSL-T should naturally loop? not grabbing all the

Subject: Re: XSL-T should naturally loop? not grabbing all the children node-sets..
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 22 Apr 2008 16:48:37 +0100
Re:  XSL-T should naturally loop? not grabbing all the
> What do I need to do differently that I am not understanding?


 <xsl:template match="category">
  <xsl:choose>
   <xsl:when test="(@name=$paraCatagory)">

    <div class="cat_block">
     <div class="cat_module">
      <xsl:value-of select="category/@display_name"/>

here you have  match="category"> so the current node is a categoiry
element so the  select="category is selecting child nodes of category
that are also called category, You select all such children but (in 
xslt 1) value-of will just give you the string value of the first node
selected.

Noweher do yo iterate through the child catagories with
xsl:apply-templates or xsl:for-each, so it's not clear why you expect to
loop over these, probably you want to apply-templates to the child
elemsnts but not knowing what output you want I can't really suggest any
code changes.


As Michael said this will do nothing if the global parameter does not
match the name on the outer element,

David

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-2011 All Rights Reserved.