Subject: Re: [xsl] xsl 2.0 recursive functions and return value From: Joern Nettingsmeier <nettings@xxxxxxxxxxxxxxxxxxxxxx> Date: Sun, 26 Feb 2006 19:09:06 +0100 |
hi everyone!<snip>
i'm trying to write a branching recursive function, but i have a problem with the "xsl:sequence" being non-terminating.
how can i get the following to work:
<xsl:function name="r2c:__hasTextContent" as="xs:boolean?"> <xsl:param name="node"/> <xsl:for-each select="$node/*"> <xsl:choose> <xsl:when test="r2c:isOutputNode(.)"/> <xsl:when test="r2c:isLeafNode(.)"> <xsl:sequence select="true()"/> </xsl:when> <xsl:otherwise> <xsl:sequence select="r2c:hasTextContent(.)"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:function>
<xsl:function name="r2c:hasTextContent" as="xs:boolean"> <xsl:param name="node"/> <xsl:choose> <xsl:when test="r2c:__hasTextContent($node)"> <xsl:sequence select="true()"/> </xsl:when> <xsl:otherwise> <xsl:sequence select="false()"/> </xsl:otherwise> <xsl:choose> </xsl:function>
-- jC6rn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/ http://spunk.dnsalias.org phone://+49/201/491621
if you are a free (as in "free speech") software developer and you happen to be travelling near my home, drop me a line and come round for a free (as in "free beer") beer. :-D
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl 2.0 recursive functions a, Joern Nettingsmeier | Thread | RE: [xsl] xsl 2.0 recursive functio, Michael Kay |
[xsl] xsl 2.0 recursive functions a, Joern Nettingsmeier | Date | RE: [xsl] xsl 2.0 recursive functio, Michael Kay |
Month |