<?xml version="1.0" encoding="iso-8859-1"?>

<!-- last updated: Nov-8 10:27am -->
<questions project="2" version="8.0" author="Fernando Paulo">
	<question id="3">
		<answer id="i">
				<code>/descendant-or-self::node()[starts-with(name/last,'B')]</code>
		</answer>
		<answer id="ii">
				<code>/students/student[starts-with(name/last,'B') and GPA>=3.7]</code>
		</answer>
	</question>
	<question id="4">
		<answer id="i">
			2 nodes
		</answer>
		<answer id="ii">
			5 nodes
		</answer>
		<answer id="iii">
				<code>/students/student[@id='55']/name/preceding::*[4]</code>
		</answer>
		<answer id="iv">
			<code>following::*</code> will return 1 node.
			<code>following::node()</code> will return 5 nodes.
			The difference is that <code>*</code> matches any node of the principal node type, which must be an element when the axis is neither an attribute nor a namespace.
			On the other hand, <code>node()</code> matches any node of any type, which includes text nodes. In this case I'm assuming whitespaces are NOT being ignored (if they were, the number of nodes returned would be 2).
		</answer>
		<answer id="v">
				<code>/students//name[last='Bond']/../@id</code>
		</answer>
	</question>
</questions>
