Mega Code Archive
Categories
/
XML Tutorial
/
XSLT StyleSheet
Demonstrates the default behaviour of xsl
File: Data.xml
First Chapter
Second Chapter
Subchapter 1
Subchapter 2
Third Chapter
Subchapter A
Subchapter B
sub a
sub b
Subchapter C
File: Transform.xslt
Number
text
Output:
Number
text
1
First Chapter
2
Second Chapter
1
Subchapter 1
2
Subchapter 2
3
Third Chapter
1
Subchapter A
2
Subchapter B
1
sub a
2
sub b
3
Subchapter C