XML technologies / XSLT / Introduction to XSLT 2.0 / XSLT and XPath – round two / Summary and exercises / Quiz
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 2.)
You should be able to answer these questions without much difficulty. One or more answers may be correct for each. Explanations and additional background information are available under Answers to the review questions.
Question 1: Which sequence does the path expression beispiel[test]?
a) All child nodes <test> of a <beispiel> element.
b) All elements <beispiel>, having a child node <test>.
c) All elements <beispiel> with an attribute test.
Question 2: What does the function fn:position() return?
a) The current node.
b) The current node’s position in the document.
c) The current node’s value as an integer.
d) The current node’s position in a sequence.
Question 3: Which XSLT instruction also copies an element node’s attributes to the result document?
a) The instruction xsl:copy.
b) The instruction xsl:copy-of.
c) The instruction xsl:attribute.
d) The instruction xsl:attribute-set.
Question 4: Which attribute of xsl:number determines the nodes to count?
a) The format attribute.
b) The value attribute.
c) The count attribute.
d) The level attribute.
Question 5: On which XPath axis is counting performed by xsl:number?
a) On the Preceding axis.
b) On the Preceding-Sibling axis.
c) On the Following-Sibling axis.
d) On the Following axis.
Question 6: Which of these functions creates its own sequence?
a) The function fn:count().
b) The function fn:last().
c) The function fn:sum().
d) The function fn:position().
Copyright © Galileo Press, Bonn 2008
You may print the online version for your private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn