Sandra is working with an XML file containing product orders with the structure shown in the accompanying figure. She was just introduced to step patterns, and would like to incorporate them into the style sheet she is developing to display the orders data. She comes to you for help in developing expressions incorporating step patterns.
-Sandra would like to write an expression that moves up the node tree from the context node, selecting all of the elements that are order elements for the customer with the ID jbrown2738. Which of the following do you tell her is the correct expression?
A) ancestor::order[custID="jbrown2738"]
B) preceding::order[custID="jbrown2738"]
C) parent::order[custID="jbrown2738"]
D) descendant::order[custID="jbrown2738"]
Correct Answer:
Verified