Subject: [xsl] templates as functions that return a context? From: Joern Nettingsmeier <nettings@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 24 Feb 2006 17:15:09 +0100 |
<grammar> <start> <element name="phone"> <optional> <element name="countryprefix"> <text/> </element> </optional> <element name="areacode"> <text/> </element> <element name="localnumber"> </text> </element> </element> </start> </grammar>
<xsl:template name="getOutputNode"> <!-- is this already an output node? --> <xsl:choose> <xsl:when test="self::rng:element|self::rng:attribute"> <xsl:value-of select="self::node()"/> </xsl:when> <xsl:otherwise> <xsl:for-each select="parent::node()"> <xsl:call-template name="getOutputNode"/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:template>
-- 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 -> |
---|---|---|
RE: [xsl] Complex expression, cknell | Thread | Re: [xsl] templates as functions th, David Carlisle |
RE: [xsl] Add in extra level to XML, Florent Georges | Date | Re: [xsl] templates as functions th, David Carlisle |
Month |