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

Re: Template Problem!!

Subject: Re: Template Problem!!
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Sun, 13 Feb 2005 03:38:40 -0800 (PST)
xsl template problem
Hello Adam,
  You must change the 2nd template like this(Please do
xsl:apply-templates) -

<xsl:template match="tree_node">
  <xsl:value-of select="@value"/>
  <xsl:apply-templates/> 	  
</xsl:template>

I don't see // as neccessary in match pattern..

Regards,
Mukul

--- Adam J Knight <adam@xxxxxxxxxxxxxxxxx> wrote:

> Related to my previous post. I have found a with a
> template.
> 
> Using the following XML Structure:
> 
> <?xml version="1.0"?>
> <tree>
>   <tree_node id="7" value="Test">
>     <tree_node id="8" value="Test Sub"/>
>       <tree_node id="9" value="Test Sub One">
>       <tree_node id="10" value="Test Sub Two">
>         <tree_node id= 11  value= Test Sub Three />
>       </tree_node>
>     </tree_node>
>   </tree_node>
> </tree>
> 
> And these XSL Templates: 
>  
> <xsl:template match="/">
>     <table class="{$css}">
>       <xsl:apply-templates/>
>     </table>
>   </xsl:template>
>   
>   <xsl:template match="//tree_node">
>       
>       <xsl:value-of select="@value"/>
> 	  
>   </xsl:template>
> 
>   I am wanting to display all tree_node values.
> However, 
> when I execute my stylesheet containg the above
> templates. Only 
> the top most tree node element appears to be
> matched.
> 
> How can I rectify this?
> 
> Cheers, 
> Adam 
>  
> NB: "Pray as if everything depended upon God and
> work as if everything
> depended upon man."



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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.