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

RE: need to get value of required nodes only

Subject: RE: need to get value of required nodes only
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 8 Mar 2004 09:15:08 +0200
html get value
Hi,

>     i need small help in xsl, i m a beginner to XSL.
>     i m getting  a xml like this now i want to get the value 
> of test2 and
> test 4 Main Nodes. and all sub links of these two main nodes.
> and just want two print like this

You could have given it a go, you know…

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns="http://www.w3.org/1999/xhtml"
                version="1.0">
  <xsl:template match="menu-options">
    <html>
      <head>
        <title/>
      </head>
      <body>
        <xsl:for-each select="menu-heads[@menunumber mod 2 = 1]">
          <h2>
            <xsl:value-of select="@name"/>
          </h2>
          <ul>
            <xsl:for-each select="sublinks">
              <li>
                <a href="{@href}">
                  <xsl:value-of select="."/>
                </a>
              </li>
            </xsl:for-each>
          </ul>
        </xsl:for-each>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

Cheers,

Jarno

 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.