XPath PredicatePredicate specifies XPath expressions written in square bracket. It is used to restrict the selected nodes in a node set for some conditions. See the use of predicate in the "employee" example. Employee.xml
XPath Predicate ExampleLet's take an example to create a table of <employee> element with their details, by iterating over each employee. This example uses predicate to calculate the position of the employee node and then print the employee details. Employee.xml Employee.xsl Output: Note:In the above example, you can see that all four queries are fetched. Next Topic# |