This includes SVG drawings from an external file.
</para>
</section>
+<section>
+<heading><label name='svg'/>Scalable Vector Graphics</heading>
+
+<para>
+Scalable vector graphics can be included in the document or
+from an external (SVG) file.
+With a <strong>src</strong> attribute, the <strong>svg</strong> element
+will load the SVG drawing from an external file:
+<example>
+ <svg src='filter.svg'/>
+</example>
+<svg src='filter.svg'/>
+</para>
+<para>
+When the <strong>src</strong> attribute is omitted, all available SVG
+elements can be used within the XML document:
+
+<example>
+ <svg>
+ <clipPath id="a">
+ <circle cy="90" cx="100" r="60"/>
+ </clipPath>
+ <circle fill="#AAAAAA" cy="90" cx="190"
+ r="60" style="clip-path:url(#a)"/>
+ <circle stroke="black" fill="none" cy="90" cx="100" r="60"/>
+ <circle stroke="blue" fill="none" cy="90" cx="190" r="60"/>
+ </svg>
+</example>
+<svg>
+ <clipPath id="a">
+ <circle cy="90" cx="100" r="60"/>
+ </clipPath>
+ <circle fill="#AAAAAA" cy="90" cx="190"
+ r="60" style="clip-path:url(#a)"/>
+ <circle stroke="black" fill="none" cy="90" cx="100" r="60"/>
+ <circle stroke="blue" fill="none" cy="90" cx="190" r="60"/>
+</svg>
+
+</para>
+
+</section>
+
<section>
<heading><label name='table'/>Tables</heading>
<para>
--- /dev/null
+<?xml version="1.0"?>
+<svg width="800" height="200" version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <radialGradient id="MyGradient" gradientUnits="userSpaceOnUse"
+ cx="200" cy="100" r="150" fx="200" fy="100">
+ <stop offset="0%" stop-color="red" />
+ <stop offset="50%" stop-color="blue" />
+ <stop offset="100%" stop-color="red" />
+ </radialGradient>
+ <filter id="GreyOut">
+ <feColorMatrix type="saturate" in="SourceGraphic" values="0.05"/>
+ </filter>
+ </defs>
+
+ <rect fill="url(#MyGradient)" stroke="black"
+ x="40" y="40" width="300" height="160"/>
+
+ <g transform="translate(380,0)" filter="url(#GreyOut)">
+ <rect fill="url(#MyGradient)" stroke="black"
+ x="40" y="40" width="300" height="160"/>
+ </g>
+
+</svg>
<sup>superscript</sup> text.
</item>
+ <item tag='svg'>
+ <ref to='svg'>Scalable vector graphics</ref>
+ </item>
+
<item tag='table'>
Creates <ref to='table'>tabular</ref> content.
</item>
<heading>Other XML applications</heading>
<section>
<heading>MathML</heading>
-</section>
<math>
<mrow>
<msup>
</msub>
</mrow>
</math>
-<section>
-<heading>SVG</heading>
-
-<svg>
- <clipPath id="a">
- <circle cy="90" cx="100" r="60"/>
- </clipPath>
- <circle fill="#AAAAAA" cy="90" cx="190"
- r="60" style="clip-path:url(#a)"/>
- <circle stroke="black" fill="none" cy="90" cx="100" r="60"/>
- <circle stroke="black" fill="none" cy="90" cx="190" r="60"/>
-</svg>
-
-
</section>
</chapter>
</xsl:template>
<xsl:template match="svg">
-<svg>
-<xsl:attribute name="xmlns">http://www.w3.org/2000/svg</xsl:attribute>
-<xsl:copy-of select='./*'/>
-</svg>
+<xsl:if test='@src'>
+ <xsl:copy-of select="document(@src)"/>
+</xsl:if>
+<xsl:if test='not(@src)'>
+ <svg>
+ <xsl:attribute name="xmlns">http://www.w3.org/2000/svg</xsl:attribute>
+ <xsl:copy-of select='./*'/>
+ </svg>
+</xsl:if>
</xsl:template>
-</xsl:stylesheet>
+
+</xsl:stylesheet>