XML - Managing Data Exchange/XPath/Answers

XPath Chapter => XPath

XPath Exercises => Exercises

XML

Exercises
In this exercise, you will modify the xsl-tree.xsl file we saw in chapter 8 XPath to...


 * 1) Print the name attribute of every bigBranch element with thickness set as ‘thick’.
 * 2) Print the name of the parent of each bigBranch.
 * 3) Print the color of all leaves with a color attribute.

1. Print the name attribute of every bigBranch element with thickness set as ‘thick’
xsl-tree1.xsl

Output

2. Print the name of the parent of each bigBranch
xsl-tree2.xsl

Output

3. Print the color of all leaves with a color attribute
xsl-tree3.xsl

Output

XPath Chapter => XPath

XPath Exercises => Exercises