Output £ string using XSLT

T

thomas

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>
 
T

Tjerk Wolterink

thomas said:
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??
 
R

Richard Tobin

thomas said:
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
 
P

Peter Flynn

thomas said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top