[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: Crazy idea: loopback namespace
Subject: Re: Crazy idea: loopback namespace From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 25 Feb 2000 17:46:02 GMT |
so you want to use def if foo is either not set or is set to empty string? <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:call-template name="A"/> <xsl:call-template name="A"> <xsl:with-param name="foo" select="'aa'"/> </xsl:call-template> </xsl:template> <xsl:template name="A"> <xsl:param name="foo"/> <xsl:call-template name="B"> <xsl:with-param name="foo" select="$foo"/> </xsl:call-template> </xsl:template> <xsl:template name="B"> <xsl:param name="foo" /> <xsl:variable name="foo2"> <xsl:choose> <xsl:when test="$foo"><xsl:copy-of select="$foo"/></xsl:when> <xsl:otherwise>def</xsl:otherwise> </xsl:choose> </xsl:variable> [<xsl:value-of select="$foo2"/>] </xsl:template> </xsl:stylesheet> bash-2.01$ xt js.xsl js.xsl <?xml version="1.0" encoding="utf-8"?> [def] [aa] XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Crazy idea: loopback namespace, Jon Smirl | Thread | RE: Crazy idea: loopback namespace, Julian Reschke |
Re: Crazy idea: loopback namespace, David Carlisle | Date | The Lazy Syntax for XSLT, or TLSX, Jeff Lansing |
Month |