Skip to content

Query Language

Benedict Albrecht edited this page May 20, 2026 · 2 revisions

Query Language

Crodox provides a query language for filtering and selecting elements based on conditions and relationships.

Comparison Operators

Operator Description
=== Equals
!== Not equal
&& Multiple conditions (AND)
() Bracing for conditions

Collection Operators

Operator Description
{} Has any matching this condition
!{} As long as no one matches this condition

Selector Contexts

Selector Description
[parent_…] Applies condition to parent element. Number of _ defines number of grandparents
[dependencies] Applies condition to all elements that depend on this element
[descendent] Applies condition to all descendants of the element
[selection] Applies condition to all elements that are selected
[rely] Applies condition to all elements that rely on this element
[all] Applies condition to all elements

Property Access

[...].variable.index

Defines the variable used. Index must be included as each variable is a list of values.

Get Selectors

Selector Description
[parent_…] Get chain parent element (number of _ defines grandparents)
[up] Get direct parent
[dependencies] Applies to all elements that depend on this element

Output Syntax

Syntax Description
<~[...].variable.index~> Variable access in output
<~(...).variable.index~> Text condition in output
<~[] or ()~cutoffA~cutoffB~> Cuts off matching end (cuts off longest matching)
<§Input§§...<~...~>...§> Input template
<§Output§§...<~...~>...§> Output template

See also: Variables · Dependency Structure

Clone this wiki locally