[xsl] how to extrac some child nodes and show. please help me. thanks

Subject: [xsl] how to extrac some child nodes and show. please help me. thanks
From: "Dionisio Ruiz de Zarate" <dionisio@xxxxxxxxxxxxx>
Date: Mon, 8 Sep 2003 00:59:00 +0200
Hello i have the bello xml file and i have one great problem (for me). I am
working with this problem during 2 weeks and i dont solve it.
this is one resourcefull problem.
In the below xml i have some nodes and into each node can be one or x child
nodes.
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

<?xml version="1.0" encoding="ISO-8859-1"?>
<registros>
 <padre>
  <id_cliente>id 1.1</id_cliente>
  <id_padre>padre 1.1</id_padre>
  <nombre_cliente>nombre 1.1</nombre_cliente>
  <apellido_cliente>apellido 1.1</apellido_cliente>
   </padre>
   <padre>
     <id_cliente>id 2.1</id_cliente>
     <id_padre>padre 2.1</id_padre>
     <nombre_cliente>nombre 2.1</nombre_cliente>
     <apellido_cliente>apellido 2.1</apellido_cliente>
         <hijo>
         <id_cliente>id 2.1.1</id_cliente>
         <id_padre>padre 2.1.1</id_padre>
         <nombre_cliente>nombre 2.1.1</nombre_cliente>
         <apellido_cliente>apellido 2.1.1</apellido_cliente>
            <hijo>
               <id_cliente>id 2.1.1.1</id_cliente>
               <id_padre>padre 2.1.1.1</id_padre>
               <nombre_cliente>jnombre 2.1.1.1</nombre_cliente>
               <apellido_cliente>apellido 2.1.1.1</apellido_cliente>
           </hijo>
         </hijo>
         <hijo>
         <id_cliente>id 2.2</id_cliente>
         <id_padre>padre 2.2</id_padre>
         <nombre_cliente>nombre 2.2</nombre_cliente>
         <apellido_cliente>apellido 2.2</apellido_cliente>
        </hijo>
    </padre>
</registros>


the are some padre nodes and inside of these nodes can be some (x) hijo
nodes and inside od these nodes x hijo nodes.

Can you help me please for solving this problem?
i am trying for solving whith this XSL file but it doesn't show well.:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">

<xsl:for-each select="//padre">
<xsl:value-of select="id_cliente"
disable-output-escaping="yes"/>&#xa0;<xsl:value-of select="nombre_cliente"
disable-output-escaping="yes"/><xsl:value-of select="apellido_cliente"
disable-output-escaping="yes"/></td>
<xsl:apply-templates select="HIJOS"/>
</xsl:for-each>
</xsl:template>

<xsl:template match="//hijo" name="HIJOS">
-&#xa0;<xsl:value-of select="id_cliente"
disable-output-escaping="yes"/>&#xa0;<xsl:value-of select="nombre_cliente"
disable-output-escaping="yes"/><xsl:value-of select="apellido_cliente"
disable-output-escaping="yes"/></
<xsl:apply-templates select="HIJOS" >
</xsl:apply-templates>

</xsl:template>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread