.q3d: Difference between revisions

From Software Product Documentation
Jump to navigation Jump to search
(New. Included description, format and formal DTD.)
 
(Redirect to Q3D Query File.)
Tag: New redirect
 
Line 1: Line 1:
{{Languages}}
#REDIRECT [[Q3D Query File]]
 
{| align="right"
| __TOC__
|}
 
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 [[Inspect3D 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 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, <<i>elementname</i>>, and end tag, <<i>/elementname</i>>, and all of the characters in between. Alternatively, an element can be defined by a single tag, <<i>elementname /</i>>.
 
Tags can also contain attributes in the <i>name="value"</i> format, further describing the associated element.
 
1. The top-level element in a .q3d file is <i>queries</i>. It contains an arbitrary (1-n) number of <i>query</i> elements.
 
2. The second-level element in a .q3d file is <i>query</i>. A <i>query</i> element has a <i>name</i> attribute (the corresponding group's name) and contains an arbitrary (1-n) number of <i>Definition</i> elements.
 
3. The bottom-level element in a .q3d file is <i>Definition</i>. A <i>Definition</i> 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):
 
<pre>
<!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
  >
]>
</pre>

Latest revision as of 19:41, 10 November 2022

Redirect to:

Retrieved from ""