NodePath Terminology

The following is from the up-coming specification revision:

A NodePath is evaluated in a particular context which is determined by the structure of the stylesheet and may be either node-context or arc-context.

A node-matching NodePath has a NodePattern as its first pattern and is evaluated in a node-context. It is an error for this type of NodePath to be evaluated when the context is an arc.

An arc-matching NodePath has an ArcPattern as its first pattern and is evaluated in an arc-context. It is an error for this type of NodePath to be evaluated when the context is an arc.

NodePaths can change the context in which they are evaluated by the use of scope specifiers. A scope specifier overrides the current context by selecting a list of nodes or arcs from a graph. The NodePath is evaluated against each node or arc in the list as though it were the context node or arc.

A global scope specifier selects all nodes from the input graph. This scope specifier can only be used with a node-matching NodePath.

A source scope specifier selects all nodes from the source graph. This scope specifier can only be used with a node-matching NodePath.

NodePaths can select either nodes or arcs.

A node-selecting NodePath has a NodePattern as a terminating pattern and selects a list of nodes from the graph.

An arc-selecting NodePath has an ArcPattern as a terminating pattern and selects arcs from the graph.

Comments

No comments yet.

Leave a comment

Sorry, the comment form is closed at this time.