[xslt1.0] Count the number of character
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
[xslt1.0] Count the number of character
Hi,
I would like to count the number of # in a string
example :
number of # = 4
exists a function to count character in string ?
Thank you
I would like to count the number of # in a string
example :
Code: Select all
<xx>1#2#3#4#</xx>
exists a function to count character in string ?
Thank you
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
Re: [xslt1.0] Count the number of character
i found a solution
Code: Select all
<xsl:variable name="nb_char" select="string-length(xx)-string-length(translate(xx,'#',''))"/>
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