translating function not working!
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Mon Dec 22, 2008 6:58 pm
translating function not working!
I have an XML document where the user has new line characters denoted like this:
•	
Im trying to use the translate function to get rid of them but it does not work?
i.e translate(@text,'
•	','')
No errors occur when viewing in browser it simply just does not do what it is supposed to do.
Im trying to use the translate function to get rid of them but it does not work?
i.e translate(@text,'
•	','')
No errors occur when viewing in browser it simply just does not do what it is supposed to do.
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: translating function not working!
Please post a small XML and XSL sample showing the problem.
Trying with:
and the stylesheet:
I get:
Which is correct.
Trying with:
Code: Select all
<root text="some
•	text"/>
Code: Select all
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/root">
<out>
<xsl:value-of select="translate(@text,'
•	',' ')"/>
</out>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><out>some
text</out>
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