This file contains a short description of the DTD used for saving/loading Value Constarints in ClarkSystem. There is one example XML document which represents the serialization of one Value Constraint from the system.

<!DOCTYPE CLaRK_value_constraints [

<!ELEMENT CLaRK_value_constraints (comment?,constraint+)>

    The file contains a collection of value constraints. There can be a preceding comment element which is not precessed by the system.

<!ELEMENT comment (#PCDATA)>

    Free text comment before the constraints descriptions.

<!ELEMENT constraint (name, descr?, targetTag, targetAttr?, targetRestr?, filter?, tokenizer?, source, externalDoc?, helpDoc?, templates?, counter?)>

    This represents the serialized form of one Value Constraint. Here is the description of each of its sub-elements:

<!ATTLIST constraint
   active (y|n) #IMPLIED

   type (parent|some_children|all_children|some_attribute) #REQUIRED
   showBefore (y|n) #REQUIRED
   showAfter (y|n) #REQUIRED
   skipICheck (y|n) #REQUIRED
>

    Attributes description:

<!ELEMENT name (#PCDATA)>

<!ELEMENT descr (#PCDATA)>

<!ELEMENT targetTag (#PCDATA)>

<!ELEMENT targetAttr (#PCDATA)>

<!ELEMENT targetRestr (#PCDATA)>

<!ELEMENT filter (#PCDATA)>

<!ELEMENT tokenizer (#PCDATA)>

<!ELEMENT source (#PCDATA)>

<!ATTLIST source
type (local_ doc|external_doc|xml_data) #REQUIRED>

   This is the type of the source which the constraint will use. The only allowed values are: local_doc, external_doc, xml_data;

<!ELEMENT externalDoc (#PCDATA)>

<!ELEMENT helpDoc (#PCDATA)>

<!ELEMENT templates (item)+>

<!ELEMENT item (#PCDATA)>

<!ELEMENT counter (EMPTY)>

<!ATTLIST counter
    number CDATA #REQUIRED>
]>

Example XML serialization of 2 Value Constraints:

<CLaRK_value_constraints>
     <constraint active="y" showBefore="y" showAfter="n" type="some_attributes">
          <name>my constraint name</name>
          <descr>my free text description</descr>
          <targetTag>constraint</targetTag>
          <targetAttr>type</targetAttr>
          <targetRestr>not(child::*)</targetRestr>
          <tokenizer>MixedWord</tokenizer>
          <source type="external_doc">/book/isbn</source>
          <externalDoc>Xtest2.XML</externalDoc>
          <helpDoc>helpFile.xml</helpDoc>
     </constraint>
     <constraint showBefore="n" showAfter="n" type="parent">
          <name>my parent constraint name</name>
          <descr>my free text description(optional)</descr>
          <targetTag>filter</targetTag>
          <targetRestr>not(parent::constraint)</targetRestr>
          <source type="xml_data">&lt;constraint/&gt;&lt;comment/&gt;</source>
     </constraint>
</CLaRK_value_constraints>

Image1.gif (23822 bytes)

Image2.gif (24763 bytes)