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...

Adapt the central server algorithm for mutual exclusion to handle the crash failure of any client (in any state), assuming that the server is correct and given a reliable failure detector. Comment on whether the resultant system is fault tolerant. What would happen if a client that possesses the token is wrongly suspected to have failed?

What will be an ideal response?

Computer Science & Information Technology

Which of the following is a metric that predicts the equipment runtime before a failure requires the equipment to be replaced?

a. MTTF b. MTBF c. MTTR d. All of the above are correct. e. None of the above is correct.

Computer Science & Information Technology

After you have located a program name from the Start menu, in order to create a shortcut on the desktop,:

A) right-click, drag the program name to the desktop, and click Create shortcuts here. B) left-click and choose Create shortcuts here. C) right-click and drag the program name to the desktop. D) double-click the program name and click Create shortcuts here.

Computer Science & Information Technology

To make long documents easier to organize, expand or collapse ________

Fill in the blank(s) with correct word

Computer Science & Information Technology