Output currency sings (pounds,yen,euros) with xslt? help!
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Fri Jun 29, 2007 7:10 pm
Output currency sings (pounds,yen,euros) with xslt? help!
i can not figure out how to output currency signs with xslt. i mainly want to output the pound currency sign.
The user types in the currency sign they want to use and then all prices should be displayed with that currency sign next to it.
First off, how should the user enter the pound sign? do they need to enter the encoded version or can the enter the character itself.
Im trying to access this currency value like this
Can anyone help me figure out how to get this working?
The user types in the currency sign they want to use and then all prices should be displayed with that currency sign next to it.
First off, how should the user enter the pound sign? do they need to enter the encoded version or can the enter the character itself.
Im trying to access this currency value like this
Code: Select all
<xsl:value-of select="$currencysign" disable-output-escaping="yes"/>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
If you want to output the currency characters euro, pound, etc the output encoding of the XSLT stylesheet should contain them. For example the UTF-8 encoding contains them and if your stylesheet declares UTF-8 as output encoding you can just insert currency characters in the output:
Regards,
Sorin
If you want to output the currency characters euro, pound, etc the output encoding of the XSLT stylesheet should contain them. For example the UTF-8 encoding contains them and if your stylesheet declares UTF-8 as output encoding you can just insert currency characters in the output:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="UTF-8"/>
<xsl:template match="/">
<xsl:variable name="euro">€</xsl:variable>
<xsl:variable name="pound">£</xsl:variable>
<xsl:value-of select="$euro"/>
<xsl:value-of select="$pound"/>
</xsl:template>
</xsl:stylesheet>
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service