Workshop

Quiz

  1. Which of the following commands will select out all the nodes with a Height attribute?

    1. @Height==null

    2. @Height=null

    3. @Height

    4. @Height==“”

    5. @Height=“”

  2. Which of the following is a syntactically correct expression for testing the value of a node?

    1. select="Catalog/Book[@BestSeller="yes"]"

    2. select="Catalog/Book[@BestSeller=='yes']"

    3. select="Catalog/Book[@BestSeller='yes']"

    4. select="Catalog/Book[@BestSeller=="yes"]"

Answers

Exercises

  1. Create an XSL file that will select the data in listing12-1.xml and sort it based on descending order of the PublisherBookID.

  2. Reopen listing12-1.xml and add the attribute Type to all instances of the <Book> tag. ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.