File: Data.xml
Chapter 1
This is a comment
And this is some text
Chapter 2
This is some text as well
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
TOC
TEXT
[
]
Output:
TOC
Chapter 1
[
This is a comment
]
Chapter 2
TEXT
Chapter 1
This is a commentAnd this is some textChapter 2
This is some text as well