summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-02-01 09:39:36 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-02-01 09:39:36 +0000
commit9713893c50ec7dac48c90fd06f2dfcff0023f6c3 (patch)
tree55d219ddad1c0564c140b1ea1f8da1c172321937
parentAdditional fix for bug #167500 (diff)
downloadinkscape-9713893c50ec7dac48c90fd06f2dfcff0023f6c3.tar.gz
inkscape-9713893c50ec7dac48c90fd06f2dfcff0023f6c3.zip
try to preserve layers, strip top-level switch and foreignObject
(bzr r4631)
-rw-r--r--share/extensions/aisvg.xslt13
1 files changed, 12 insertions, 1 deletions
diff --git a/share/extensions/aisvg.xslt b/share/extensions/aisvg.xslt
index e2e7096ff..62a10ee93 100644
--- a/share/extensions/aisvg.xslt
+++ b/share/extensions/aisvg.xslt
@@ -7,11 +7,22 @@ xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:x="http://ns.adobe.com/Extensibility/1.0/"
xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/"
xmlns:graph="http://ns.adobe.com/Graphs/1.0/"
-xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" >
+xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+>
<xsl:output indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
+ <xsl:template match="svg:svg/svg:switch[count(*)=2][name(*[1])='foreignObject']">
+ <xsl:apply-templates select="*[not(name()='foreignObject')]/*"/>
+ </xsl:template>
+ <xsl:template match="svg:svg/svg:g | svg:g[@i:extraneous='self']/svg:g">
+ <xsl:copy>
+ <xsl:attribute name="inkscape:groupmode">layer</xsl:attribute>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="@*|node()|text"/>