demographics.xml

<?xml version="1.0" encoding="utf-8"?>

<?xml-stylesheet href="demoGraphics.xsl" type="text/xsl"?>

 

<root>

      <wishes>   

      <text>Happy Birthday!</text>

      <text>Have a good life!</text>

      <text>Dreams come true!</text>

      <text>Live Long!!</text>

      </wishes>

</root>

The style for the XML document is taken from the XSLT demoGraphics.xsl.

demographics.xsl

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"

            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

            xmlns="http://www.w3.org/2000/svg"

  >

  <xsl:output

      method="xml"

      indent="yes"

      standalone="no"

      doctype-public="-//W3C//DTD SVG 1.1//EN"

      doctype-system="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"

      media-type="image/svg" />

       

      <xsl:template match="/">

        <xsl:apply-templates/>

    </xsl:template>

 

  <xsl:template match="wishes">

    <svg height="700" width="700" xmlns="http://www.w3.org/2000/svg">

            <defs>

                  <filter id="mySQ" x="0" y="0">

                        <feGaussianBlur in="SourceGraphic" stdDeviation="15" />

                  </filter>

            </defs>

            <rect width="600" height="600" stroke="blue" stroke-width="10" fill="grey"  filter="url(#mySQ)" />

            <xsl:for-each select="/root/wishes">

                  <text font-size="20" fill="black" x="40" y="80" transform="rotate(30 60, 30)">           

                        <xsl:value-of select="."/>      

                  </text>

            </xsl:for-each>

    </svg>

  </xsl:template>

</xsl:stylesheet>