Workshop
This workshop tests whether you understand all the concepts you learned today. It is helpful to know and understand the answers before starting tomorrow's lesson. You can find the answers to the quiz questions and exercises in Appendix A.
Quiz
True or False: The ancestor-or-self axis includes the context node.
True or False: A predicate can contain a location path.
Given Listing 3.1, what would be the output of <xsl:value-of select="/menu/entrees/dish" />?
Given Listing 3.1, what would be the output of <xsl:value-of select="//dish[10]/parent::*/@title" />?
Given Listing 3.1, what would be the output of <xsl:value-of select="(//dish)[10]/parent::*/@title" />?
Exercise
Create a stylesheet that displays Listing 3.1 nicely as a menu with sections, using the title attribute as a header for each section.