Creation of   entity using an XSL stylesheet : entity « XSLT stylesheet « XML Tutorial






File: Data.xml
<?xml version="1.0" encoding="utf-8"?>
<data>
    <TEXT>Hello,</TEXT>
    <TEXT>world.</TEXT>
</data>

File: Transform.xslt

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" />
  <xsl:template match="/">
    <xsl:value-of select="//TEXT[1]" />
    &#160;&#160;&#160;&#160;&#160;
    <xsl:value-of select="//TEXT[2]" />
  </xsl:template>
</xsl:stylesheet>

Output:

Hello,
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    world.








5.51.entity
5.51.1.Creation of &nbsp; entity using an XSL stylesheet