Subject: Re: Singleton Tag Replacement From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Thu, 14 Sep 2000 19:05:40 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Singleton Tag Replacement, Chris Bayes | Thread | selecting text node where one of it, andrej koelewijn |
Re: My favourite XSLT enhancement r, Joe English | Date | Re: My favourite XSLT enhancement r, Lassi A. Tuura |
Month |