Output £ string using XSLT

Discussion in 'XML' started by thomas, Oct 12, 2005.

  1. thomas

    thomas Guest

    Hi folks,

    I was wandering how I can output a £ symbol in front of the price of
    something, at the moment, it only outputs the number.

    Heres the line from the xsl page i'm using:-

    <td><xsl:apply-templates select="./price" /></td>


    and heres the xml file:-

    <cat>
    <data>
    <item>hat</item>
    <colour>black</colour>
    <price>45</price>
    </data>
    </cat>
     
    thomas, Oct 12, 2005
    #1
    1. Advertising

  2. Re: Output =?ISO-8859-1?Q?=A3_string_using_XSLT?=

    thomas wrote:
    > Hi folks,
    >
    > I was wandering how I can output a £ symbol in front of the price of
    > something, at the moment, it only outputs the number.
    >
    > Heres the line from the xsl page i'm using:-
    >
    > <td><xsl:apply-templates select="./price" /></td>
    >
    >
    > and heres the xml file:-
    >
    > <cat>
    > <data>
    > <item>hat</item>
    > <colour>black</colour>
    > <price>45</price>
    > </data>
    > </cat>
    >
    >


    Use unicode or some entities??
    I think there is a html entity for the symbol you want.

    Doesnt that solve your problem??
     
    Tjerk Wolterink, Oct 12, 2005
    #2
    1. Advertising

  3. In article <J6c3f.53$>,
    thomas <> wrote:

    >I was wandering how I can output a [pound] symbol in front of the price of
    >something, at the moment, it only outputs the number.
    >
    >Heres the line from the xsl page i'm using:-
    >
    ><td><xsl:apply-templates select="./price" /></td>


    <td>£<xsl:apply-templates select="./price" /></td>

    -- Richard
     
    Richard Tobin, Oct 12, 2005
    #3
  4. thomas

    Peter Flynn Guest

    Re: Output =?UTF-8?B?ow==?= string using XSLT

    thomas wrote:

    > Hi folks,
    >
    > I was wandering how I can output a £ symbol in front of the price of
    > something, at the moment, it only outputs the number.
    >
    > Heres the line from the xsl page i'm using:-
    >
    > <td><xsl:apply-templates select="./price" /></td>


    <td><xsl:text>£</xsl:text><xsl:apply-templates select="price"/></td>

    ///Peter
     
    Peter Flynn, Oct 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    682
    Stylus Studio
    Aug 3, 2004
  2. Michael Ahlers
    Replies:
    3
    Views:
    557
    David Carlisle
    Jul 15, 2004
  3. Replies:
    2
    Views:
    724
    Henry S. Thompson
    Oct 19, 2005
  4. Replies:
    1
    Views:
    491
    Joseph Kesselman
    Nov 5, 2007
  5. John Larson
    Replies:
    6
    Views:
    690
    Hermann Peifer
    Sep 28, 2008
Loading...

Share This Page