XSLT and HTML images



So I am creating a webpage from an XML file that I created. It is a list of all cards and their attributes from Hearthstone.


When it comes to images can someone explain why my xsl transformation is adding character data to the begging and end of my img content output? It does this even when I use a local image. I am using jEdit.


XML:



<Image_URL>
<regular>
http://ift.tt/1saw93I
</regular>

<gold>
http://ift.tt/1wQm4jl
</gold>
</Image_URL>


XSL:



<xsl:template match="regular">
<p>
<img src="{.}"/>
</p>
</xsl:template>


Output:



<img src="%0A%09%09%09http://hydra-media.cursecdn.com/hearthstone.gamepedia.com/thumb/3/37/Abomination%28597%29.png/184px-Abomination%28597%29.png?version=9e47af5b792479ac6617cb30bf7da8a4%0A%09%09%09"></p>

No comments:

Post a Comment