SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XSLT and funny special characters

    I am having some trouble with the following peice of code in an XSLT file:

    Code:
     <td>
    <a>
    <xsl:attribute name="href">
     <xsl:text>StyleSheetManager?action=review&id=</xsl:text>
     <xsl:value-of select="id"/></xsl:attribute>
    <img src="/icons/view16.gif" width="16" height="16" />
     </a></td>
    I am getting the following error: The reference to entity "id" must end with the ';' delimiter.

    I though that putting it between the <xsl:text> tags would be ok. Though it would appear not!

    any ideas how I can do this

  2. #2
    SitePoint Enthusiast hellsgate's Avatar
    Join Date
    Jun 2004
    Location
    Greenock
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's possible to put the whole href into the <a> tag eg:

    <td>
    <a href="StyleSheetManager?action=review&amp;id={id}">
    <img src="/icons/view16.gif" width="16" height="16" />
    </a>
    </td>

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hellsgate's solution is correct, but his other changes obscure the real cause of the problem, which was that you hadn't escaped the "&" in your querystring to "&amp;" as Hellsgate has done.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •