In XSLT 2.0 select is not mandatory on xsl:value-of element. If it is not given the xsl:value-of element must not be empty and its contents is used to calculate the output.
|
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> <ooo>1</ooo> <xsl:value-of select="2"/> <zzz>3</zzz> </xsl:value-of> </xsl:template> </xsl:stylesheet> |
|
|
XML
<aaa/> |
Output
123
|
| Previous chapter: | Sequence Combinations |
| Next chapter: | Modes |
| Previous page: | Numbers and separators |
| Next page: | Separators |