Search Path Examples

The following table contains examples of search paths and their descriptions.

Table 1. Search path descriptions

Search path

Description

~

Selects the account object associated with the current user.

~~

Selects the session object associated with the current user.

/

Selects the root.

/*

Selects the child objects of the root.

The asterisk (*) is a wildcard character.

//folder

Selects all folder objects in the content store.

When a path starts with two slashes (//), all objects in the content store that fulfill the specified criteria are selected. In this case, the selected objects must be instances of the class folder.

//folder | //report

Selects all folder objects and all report objects in the content store. The vertical bar (|) specifies that the results of two search paths will be combined.

//*

Selects all objects in the content store.

The asterisk (*) is a wildcard character.

/configuration//*

Selects the configuration object and all its descendants.

The two slashes specify all descendant objects of the current object (configuration), and the current object itself. The text between the slashes is called a location step.

The asterisk (*) is a wildcard character.

For more information, see Location Steps

/content//folder/report/ parent::folder

Selects every descendant of the content object that is a folder object and that has at least one child report object. In the parent::folder expression, parent is an axis and folder is a node test.

For more information, see Axes and Node Tests

/content/package/folder [@name='Documentation Report Samples']/*

Selects all child objects in the Documentation Report Samples folder. Expressions enclosed in square brackets are predicates used to filter a set of objects.

The at sign (@) specifies a property name.

The asterisk (*) is a wildcard character.

For more information, see Predicates

/content/package/folder/ report[contains(@name, 'Product List')]

Selects all report objects in the path /content/package/folder with names that contain the string Product List. The predicate contains a call to the function contains.

The at sign (@) specifies a property name.

For more information, see Functions

storeID("1e08b01ef26b496a ac06a14f5ae9a572")//report

Selects all report objects that are descendants of the object that has the storeID with the value "1e08b01ef26b496aac06a14f5ae9a572".

For more information, see storeID(storeID)

CAMID(":")/*[@routingHints]

Selects all objects in the Cognos namespace where the routingHints property is not nil. Expressions enclosed in square brackets are predicates used to filter a set of objects.

CAMID(":") specifies the Cognos namespace.

The at sign (@) specifies a property name.

The asterisk (*) is a wildcard character.

For more information, see Predicates

CAMID(":")/*[not(@routingHints)]

Selects all objects in the Cognos namespace where the routingHints property is nil. Expressions enclosed in square brackets are predicates used to filter a set of objects.

CAMID(":") specifies the Cognos namespace.

The at sign (@) specifies a property name.

The asterisk (*) is a wildcard character.

For more information, see Predicates