Previous | Next | Indexes
Zvon > Tutorials > XSLT 2.0 Tutorial > Value-of (1/6) >

Implicit inclusion of space character

In XSLT 2.0 a single space is inserted between individual text nodes created by value-of element which matches several nodes.

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="/">
                  <xsl:value-of  select="/aaa/bbb"/>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa>
            <bbb>How</bbb>
            <bbb>do</bbb>
            <bbb>you</bbb>
            <bbb>do?</bbb>
      </aaa>
Output
How do you do?


Previous chapter: Sequence Combinations
Next chapter: Modes
Previous page: - - -
Next page: Separators between text nodes generated by value-of