#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    XSL Stylesheet Image in HREF


    I have the following section in my xslt file that provides a link for each version node in my xml file. If there are more than one, I am getting a blank space after the img tag and before the /a tag which is causing an extra space with an underline to be shown between images.


    Code:
    <xsl:template match="version">
    <a>
    <xsl:attribute name="href">
    <xsl:text>http://www.mysite.com/videos/
    </xsl:text>
    <xsl:value-of select="filesystemname"/>
    <img>
    <xsl:attribute name="src">
    <xsl:text>/mylocation/wmv.jpg</xsl:text>
    </xsl:attribute>
    </img>
    </a>		
    </xsl:template>
    The code renders as this:
    <a href="xxxx"><img ... /> </a>

    The space between "/> </a>" is showing an underline with a link when I view the page and does not look good when I have multiple links to be shown.

    The last link appears as <a href="xxxx"><img ... /></a>

    Google docs of an example of what is happening:

    https://docs.google.com/open?id=0B-Mp8y3uwePLaVI3NVFQeGxSTldmeWhlbkRYLWlpZw

    Any help would be appreciated.

    Kosmo
    Last edited by Kosmo007; March 5th, 2012 at 01:58 PM. Reason: Added link for image

IMN logo majestic logo threadwatch logo seochat tools logo