Skip to content

Commit

Permalink
updated options for including svg images to fix paths used for includ…
Browse files Browse the repository at this point in the history
…ing images inline (the old way) and via data uris (one of the two new options).

the paths used to read in the svg xml files needed the base "image/" parent directory.

this suppots issue #23
  • Loading branch information
mattcoarr committed Mar 18, 2014
1 parent 13f0a82 commit 97b2107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions icons.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
-->
<xsl:choose>
<xsl:when test="$iconReferenceStyleVariable = 'inlineLiteralXml'">
<xsl:copy-of select="doc(concat($baseFilename, '.svg'))" />
<xsl:copy-of select="doc(concat('images/', $baseFilename, '.svg'))" />
</xsl:when>

<xsl:when test="$iconReferenceStyleVariable = 'dataUri'">
<xsl:variable name="base64Data" select="unparsed-text(concat($baseFilename, '.svg.base64'))" />
<xsl:variable name="base64Data" select="unparsed-text(concat('images/', $baseFilename, '.svg.base64'))" />
<img><xsl:attribute name="src" select="concat('data:image/svg+xml;base64,', $base64Data)" /></img>
</xsl:when>

Expand Down

0 comments on commit 97b2107

Please sign in to comment.