Book a Demo
Prev Next

Set Extraction

These procedures extract sets from discrete vertical indices. There are three indices available, each with a specific extraction function. String literal parameters to these functions could be case sensitive.  Case sensitivity is defined by the language of the source code used to populate the database.  If the source language is case sensitive (as C++ is) all string literal parameters are case sensitive. If the source language is case insensitive (as SQL is) all string literal parameters are case insensitive.


type(value: string)

Extract a set based upon a node name. The exact name for a node is defined by the grammar used to parse the original source. In this example, all nodes with the name "OPERATION" are returned.



with(value: string)

Extract a set based upon attribute name. All nodes with one or more attributes of the specified name are returned. If a single node has two attributes of the same name, one instance of that node is returned. This example returns all nodes with one or more attributes named "NAMEPART".



find([+] value: string [+ value: string] [+])

Extract a set based upon an attribute value.  When extracting nodes by attribute value, the value of all attributes for the node are considered.  Wildcards allow for specifying a subset of attribute values for a node.

When a single value is provided, all nodes that have a single attribute with the value specified are returned. If a node has any other attributes, it is excluded. In this example, all nodes with exactly one attribute with the value of 'i' are returned.


More than one value can be specified by using a concatenation symbol.  When more than one value is specified, the resulting set will contain all nodes that have attributes with exactly the values specified, in the order specified.  Any node with extra leading or trailing attributes is excluded. This example retrieves a set of all nodes with a set of three attributes with the values “com”, “.” and “sun”, in that order.

     find("com" + "." + "sun")

Wildcards can be used at either the beginning or end of a value specification.  A leading concatenation symbol allows for any number of attributes preceding the first matched attribute.  A trailing concatenation symbol allows for arbitrary trailing attributes.  In both cases, if the node would match without wildcards, it will match with them – the wildcard specifies any number of leading/trailing attributes, including none.

In this example, we retrieve a set of nodes that have their last two attributes being “.” and “sun”.  The leading concatenation symbol specifies that any number of attributes (including none), with any value, can exist before the matched attributes, but none can follow.

     find(+ “.” + “sun”)

The next example has a trailing wildcard.  Any node with attributes “com”, “.” and “sun” as the first three attributes will be returned.  Any number of trailing attributes can exist.

     find(“com” + “.” + “sun” +)

Both wildcards can be used together. In this example, nodes with attributes named as the three values specified, in order, regardless of leading or trailing attributes, will be returned.

     find(+ “com” + “.” + “sun” +)

Learn More