This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Singleton Tag Replacement


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]