Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (31 sloc) 1.3 KB
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output
method="xml"
encoding="UTF-8"
indent="yes" />
<xsl:template match="/Objects">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox = "0 0 1000 600"
>
<xsl:apply-templates select="Package/LayoutInfo/GraphLayout/NodeLayout" />
</svg>
</xsl:template>
<xsl:template match="Package/LayoutInfo/GraphLayout/NodeLayout">
<g xmlns="http://www.w3.org/2000/svg">
<rect>
<xsl:attribute name="x"><xsl:value-of select="substring-before(@TopLeft, ',')"/></xsl:attribute>
<xsl:attribute name="y"><xsl:value-of select="substring-after(@TopLeft, ',')"/></xsl:attribute>
<xsl:attribute name="rx">10</xsl:attribute>
<xsl:attribute name="ry">10</xsl:attribute>
<xsl:attribute name="width"><xsl:value-of select="substring-before(@Size, ',')"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="substring-after(@Size, ',')"/></xsl:attribute>
<xsl:attribute name="fill">lightgray</xsl:attribute>
<xsl:attribute name="stroke">black</xsl:attribute>
<xsl:attribute name="stroke-width">1</xsl:attribute>
</rect>
</g>
</xsl:template>
</xsl:stylesheet>
You can’t perform that action at this time.