User Tools

Site Tools


other:inspect3d:documentation:files:q3d_query_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
other:inspect3d:documentation:files:q3d_query_file [2024/07/17 15:43] – removed sgrangerother:inspect3d:documentation:files:q3d_query_file [2024/12/18 14:39] (current) wikisysop
Line 1: Line 1:
 +====== Q3D Query File ======
 +
 +The .q3d file format is an method of storing query definitions as XML, ensuring that they are both human- and machine-readable. Inspect3D allows users to save query definitions from the {{:I3DGroups.png?20}} **[[Other:Inspect3D:Documentation:Dialogs:Advanced_Query_Section|Group Definition]]** dialog. Previously-saved query definitions can be loaded and applied to the CMO library to populate groups in the Group Definition dialog or from the Group Definitions drop-down menu's {{:I3DOpenGroupDef.png?20}} **Load Group Def & Compute Groups** option.
 +
 +==== Format ====
 +
 +As an XML document, a .q3d file is made up of hierarchical elements that are demarcated by tags, indicated by the < and > characters. An element consists of a start tag, <//elementname//>, and end tag, <///elementname//>, and all of the characters in between. Alternatively, an element can be defined by a single tag, <//elementname ///>.
 +
 +Tags can also contain attributes in the //name="value"// format, further describing the associated element.
 +
 +1. The top-level element in a .q3d file is //queries//. It contains an arbitrary (1-n) number of //query// elements.
 +
 +2. The second-level element in a .q3d file is //query//. A //query// element has a //name// attribute (the corresponding group's name) and contains an arbitrary (1-n) number of //Definition// elements.
 +
 +3. The bottom-level element in a .q3d file is //Definition//. A //Definition// element consists of a single tag and encodes a single sub-group via a number of attributes.
 +
 +==== DTD ====
 +
 +Formally, a .q3d file respects the Document Type Definition (DTD):
 +
 +<code>
 +<!DOCTYPE queries [
 +  <!ELEMENT queries query+>
 +  <!ENTITY query Definition+>
 +  <!ATTLIST query
 +    name CDATA #REQUIRED
 +  >
 +  <!ENTITY Definition>
 +  <!ATTLIST Definition
 +    condition CDATA #REQUIRED
 +    query CDATA #REQUIRED
 +    workspace CDATA #REQUIRED
 +    type CDATA #REQUIRED
 +    folder CDATA #REQUIRED
 +    name CDATA #REQUIRED
 +    component CDATA #REQUIRED
 +    max_elements CDATA #REQUIRED
 +    negate_result CDATA #REQUIRED
 +    events CDATA #REQUIRED
 +    exclude_events CDATA #REQUIRED
 +    has_tag_ref CDATA #REQUIRED
 +    tag_logic CDATA #REQUIRED
 +    tag CDATA #REQUIRED
 +    has_subject_ref CDATA #REQUIRED
 +    subject CDATA #REQUIRED
 +    normalize_info CDATA #REQUIRED
 +  >
 +]>
 +</code>
 +
 +
  
other/inspect3d/documentation/files/q3d_query_file.1721230988.txt.gz · Last modified: 2024/07/17 15:43 by sgranger