This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Singleton Tag Replacement
- To: "Chowdhury, Anisuzzaman" <Anisuzzaman dot Chowdhury at westgroup dot com>
- Subject: Re: Singleton Tag Replacement
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Thu, 14 Sep 2000 19:05:40 +0100
- Cc: "'XSL-List at mulberrytech dot com'" <XSL-List at mulberrytech dot com>
- Reply-To: xsl-list at mulberrytech dot com
Anis,
>Does anyone have the idea of how to replace a singleton tag(e.g. <eos/>)
>with another tag(e.g. <BR/>)?
These are called 'empty elements' in XML-speak.
><xsl:template match="eos">
>??? What should go here???
></xsl:template>
Well, when you come across an 'eos' element, you want to generate an empty
'BR' element, so:
<xsl:template match="eos">
<xsl:element name="BR" />
</xsl:template>
Or, shorter:
<xsl:template match="eos">
<BR />
</xsl:template>
I hope that this is what you were after,
Jeni
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list