Added the src attribute to the svg tag
[xmldoc.git] / html.xsl
index 43841a8..155db6a 100644 (file)
--- a/html.xsl
+++ b/html.xsl
 </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>