xsl-list
[Top] [All Lists]

Re: [xsl] Passing xml nodes to a function

2006-08-09 08:15:09
"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:if>

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

  Regards,

--drkm






















        

        
                
___________________________________________________________________________ 
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet 
! 
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos 
expériences. 
http://fr.answers.yahoo.com 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--