Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony Candaele 1197 posts 2049 karma points
    Jun 19, 2011 @ 12:13
    Anthony Candaele
    1

    referencing ↑ in Xslt

    Hi,

    I need to use the ↑ character in an Xslt file, but I get an error :

    Reference to undeclared entity 'uarr'.

    Is there a way to reference the character ↑ in Xslt?

    Thanks for your help,

    Anthony Candaele
    Belgium

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 19, 2011 @ 12:33
    Sebastiaan Janssen
    4

    Have you tried ↑ instead?

  • Rich Green 2246 posts 4008 karma points
    Jun 19, 2011 @ 12:48
    Rich Green
    3

    Hey Anthony,

    Sebastiaans solution works perfect for me.

    This should also work, though a little long winded

    <xsl:variable name="arrow">&amp;uarr;</xsl:variable>
    <xsl:value-of select="$arrow"  disable-output-escaping="yes"/>

    Rich

  • Anthony Candaele 1197 posts 2049 karma points
    Jun 19, 2011 @ 12:58
    Anthony Candaele
    0

    @Sebastiaan: Thanks Sebastiaan, this solution works perfect!

    @Rich: Thanks for the alternative solution.

    Have a great sunday,

    Anthony

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Jun 19, 2011 @ 15:07
    Chriztian Steinmeier
    0

    Hi all,

    If you really want to use the name instead of the character reference, you can do it like this:

    <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE xsl:stylesheet [
        <!ENTITY uarr "&#8593;"><!-- Define character to use for "uarr" entity -->
    ]>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:etc="...all the other namespaces..."
    >
    
        <xsl:template match="/">
            I would like to point upwards here... &uarr; </xsl:text>
        </xsl:template>
    
    </xsl:stylesheet>

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft