Click to return to the XML (Extensible Markup Language) home page    
Set Operations     XSL Pattern Methods     XSL Pattern Syntax    
Web Workshop  |  XML (Extensible Markup Language)

Context Changing Operators and Methods


Each XSL Pattern query is evaluated relative to a single node or context for the query. XSL Patterns also define operators and methods that can change the context as a prelude to performing the query.

Context Changing Operators and Methods

.. Change the context of the query or filter to the node that is the parent of the current context.
/ Change the context of the query or filter to the root node of the document.
// Change the context of the query or filter to the root node of the document; selection of children is by recursive descent.
ancestor Change the context of the query or filter to the node that is the nearest ancestor of the current context that matches the pattern.
context Retrieve nodes relative to the node at which the query starts.
id Change the context of the query or filter to the node that has the requested ID.

Remarks

The context changing operators and methods above must appear to the left of any / or // operators, or as the first term in a filter pattern.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.