The attribute separator can be also used when xsl:value-of is calculated based on its content.
|
XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/aaa"> <xsl:value-of separator="-"> <ooo>1</ooo> <xsl:value-of select="2"/> <zzz>3</zzz> </xsl:value-of> </xsl:template> </xsl:stylesheet> |
|
|
XML
<aaa/> |
Output
1-2-3
|
| Previous chapter: | Sequence Combinations |
| Next chapter: | Modes |
| Previous page: | Alternative to select attribute for xsl:value-of |
| Next page: | Separators from source document |