26.01.2019 Views

XML Simplified

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Module 7<br />

More on XSLT<br />

Knowledge Check 1<br />

1. Which of these statements about XPath are true and which of these are false?<br />

(A) XPath provides multiple syntax that can be used for queries, addressing and patterns.<br />

(B) XPath can be thought of as a query language like SQL.<br />

(C) In XPath, the structure of an <strong>XML</strong> document is viewed conceptually as a pyramid.<br />

(D) XPath provides a common syntax for features shared by XSLT and XQuery.<br />

(E) XPath is used to navigate through elements and attributes in an <strong>XML</strong> document.<br />

Concepts<br />

2. Can you match the XPath nodes against their corresponding description?<br />

Description<br />

XPath Node<br />

(A) Has a parent node and it may be the child node too (1) Element<br />

(B) Contains all other nodes in the tree (2) Attribute<br />

(C) Is not considered a child of its parent node because they are not (3) Text<br />

contained in a parent node<br />

(D) May have a unique identifier associated with them, which is useful (4) Namespace<br />

when referencing the node with XPath<br />

(E) Has a parent node that is either an element or root node (5) Root<br />

3. Can you match the different types of matching against their corresponding description?<br />

Description<br />

Types of Matching<br />

(A) <br />

(1) Matching by name<br />

...<br />

<br />

(B) (2) Matching by ancestry<br />

(C) (3) Matching the element<br />

names<br />

(D) <br />

(4) Matching the root<br />

<br />

<br />

(E) <br />

<br />

<br />

(5) Matching by attribute<br />

<strong>XML</strong> <strong>Simplified</strong><br />

Version 1.0 © Aptech Limited

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!