STx 3.9 Documentation

Shell Item

SET FILE

XML Doctype

The S_TOOLS-STx XML implementation supports an element type definition which is not directly compatible with the standard XML definition methods like DTD or XML Schema. If necessary we will program an interface to a standard in the future. The XML element definitions are created with the command "SET xmlfile DOCTYPE …" as documented below. All definition commands should be applied before the XML content is accessed. The sequence of definition commands must be finished with the command SET xmlfile DOCTYPE CLOSE to verify and initialize the element types. The element type definitions are not required and are applied during XML access only if available.

The following notes apply to the commands below:

  1. If an element is derived from a parent element, it inherits all children, all attributes and the base and not-base element. All inherited definitions can be overridden in the derived element.
  2. If a base element is defined, elements of type tag can only be added to a position below (inside) the base element or an element derived from the base element.
  3. If a none-base element is defined, elements of type tag can not be added to a position below (inside) the none-base element or an element derived from the none-base element.
  4. If an undefined element tag is used as argument (e.g. parent, base or in the child command) an element type tag is created automatically (and should be selected and configured later).
  5. If children are set to invisible, all element below/inside the element are hidden
  6. The default attribute visibility is used for undefined attributes and for attributes without visibility setting.
  7. A valid definition sequence (= all DOCTYPE commands before DOCTYPE CLOSE) must consist of at least one element definition and the root and name assignment.

The application S_TOOLS-STx has a predefined DOCTYPE (defined in the stxconfig.xml file), which guarantees data integrity.

// A very basic doctype example

$#xml doctype name 'testdoctype'

$#xml doctype element root * * * * yes yes yes

$#xml doctype root root

$#xml doctype element elem * * * * yes yes yes

$#xml doctype attribute type yes all default string no yes

$#xml doctype close

In This Section

DOCTYPE ELEMENT

DOCTYPE CHILD

DOCTYPE ROOT

DOCTYPE NAME

DOCTYPE CLOSE

VALIDATE

© 2009 The Austrian Academy of Sciences Acoustics Research Institute