Re: [xsl] Passing xml nodes to a function

Subject: Re: [xsl] Passing xml nodes to a function
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Wed, 9 Aug 2006 17:14:53 +0200 (CEST)
"Bansal, Rabinder" wrote:

>           teleNumbers 
>               telList
>                   numbers
> 		teleType	H
> 		teleNumber	0145454545

  I didn't fully understand your requirement, but you seem to want the
name of all elements, indentend, with their own text nodes if any (it
is just a guess):

    <xsl:template match="*">
      <xsl:param name="indent" select="''"/>

      <xsl:value-of select="$indent"/>
      <xsl:value-of select="name()"/>

      <xsl:if test="text()">
        <xsl:text>: </xsl:text>
        <xsl:value-of select="text()"/>

      <xsl:apply-templates select="*">
        <xsl:with-param name="indent"
                        select="concat($indent, '  ')"/>




Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. 

Current Thread