value-of without content of child elements
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Sun Jun 26, 2005 1:55 pm
value-of without content of child elements
Hi everybody!
With xslt:value-of I get the content of the actual element and the content of all its child elements. Is there a possibility to get only the content of the actual element without the children's content?
Thanks in advance,
ally
With xslt:value-of I get the content of the actual element and the content of all its child elements. Is there a possibility to get only the content of the actual element without the children's content?
Thanks in advance,
ally
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
In order to get all the text nodes inside an element you need to iterate through them, one possibility will be with something like below, assuming the current node is the desired element:
In order to get all the text nodes inside an element you need to iterate through them, one possibility will be with something like below, assuming the current node is the desired element:
Code: Select all
<xsl:for-each select="text()">
<xsl:value-of select="."/>
</xsl:for-each>
</code]
Best Regards,
George
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