One of the functions of XPath is to translate the hierarchical structure of an XML document into an expression called a location path that references a specific node or node set from the source document. The location path can be written in either absolute or relative terms.
?
Provide a description of both absolute and relative paths, and provide an example of the general form of each.

What will be an ideal response?

An absolute path is a path that always starts from the root node and descends down through the node tree to a particular node or node set. The root node is identified by an initial forward slash (/), and then each level down the tree is marked by additional forward slashes. An absolute path that extends down the node tree from the root node has the following general form:
/child1/child2/child3/...
wherechild1,child2,child3, and so forth are the descendants of the root node.

Absolute paths can be long and cumbersome for large and complicated node trees. Therefore, most locations are written using relative paths in which the location path starts from a particular node (not necessarily the root node) called the context node. Rather than working through a path that navigates through the entire node tree, the XSLT processor needs only to work with a fragment of the tree.

For example, if the stock element is the context node and this element contains an element namedsName, the relative path to thesNameelement is: stock/sName??.

Computer Science & Information Technology

You might also like to view...

Because they are empty when they are created, each new layer is automatically a(n) ____________________ layer because it has no artwork in it.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

In a binary tree, the maximum outdegree for a node is _____.

A. zero B. one C. two D. three

Computer Science & Information Technology