This is an old revision of the document!
Table of Contents
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 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
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):
<!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 > ]>