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

RE: how to extrac some child nodes and show. please he

Subject: RE: how to extrac some child nodes and show. please help me. thanks
From: Jarno.Elovirta@xxxxxxxxx
Date: Mon, 8 Sep 2003 08:13:32 +0300
xsl child
Hi,
> i want to show the xml file in this method:
> id 1.1 nombre 1.1 apellido 1.1
> id 2.1 nombre 2,1 apellido 2.1
> - id 2.1.1 nombre 2.1.1 apellido 2.1.1
> --  id 2.1.1.1 nombre 2.1.1.1 apellido 2.1.1.1
> id 2.2 nombre 2.2 apellido 2.2

The last one should probably have a leading hyphen, right? Anyhow,

  <xsl:template match="padre | hijo">
    <xsl:for-each select="ancestor::*[self::hijo or self::padre]">-</xsl:for-each>
    <xsl:value-of select="id_cliente"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="nombre_cliente"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="apellido_cliente"/>
    <xsl:text>&#xA;</xsl:text>
    <xsl:apply-templates select="hijo"/>
  </xsl:template>

Cheers,

Jarno - The Dust of Basement: Inside

 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.