Get all the text of the current node only

sm8273

New Member
Here is my XML: \[code\]<section> <para>part1 <breakline/> part2 <list> <para>list1 </para> <para>list2 </para> </list> </para><para>before_line_break <breakline/> after</para><para>para3</para></section>\[/code\]Expected output:\[code\]part1 part2before_line_break afterpara3\[/code\]I want "part2" but not "list1" and "list2"An equivalent HTML file would be:\[code\]<html> <body> part1 <br/> part2 <br/> before_line_break <br/> after <br/> para3 <br/> </body></html>\[/code\]I have tried many things in my xsl file. Here is just an example (that doesn't work of course):\[code\]<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html> <body> <xsl:for-each select="section/para"> <xsl:value-of select="."/> <br/> </xsl:for-each> </body></html></xsl:template></xsl:stylesheet>\[/code\]How should I change my XSL file to get the expected output?Thanks in advance for your help.
 
Back
Top