Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

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

  1. True or False: The ancestor-or-self axis includes the context node.

  2. True or False: A predicate can contain a location path.

  3. Given Listing 3.1, what would be the output of <xsl:value-of select="/menu/entrees/dish" />?

  4. Given Listing 3.1, what would be the output of <xsl:value-of select="//dish[10]/parent::*/@title" />?

  5. Given Listing 3.1, what would be the output of <xsl:value-of select="(//dish)[10]/parent::*/@title" />?

Exercise

  1. Create a stylesheet that displays Listing 3.1 nicely as a menu with sections, using the title attribute as a header for each section.

  • + Share This
  • 🔖 Save To Your Account