Specification of Consumer RuleML 1.02

From RuleML Wiki
Jump to: navigation, search

Authors: Harold Boley, Tara Athan, Adrian Paschke, Adrian Giurca, Nick Bassiliades, Guido Governatori, Monica Palmirani, Adam Wyner, Gen Zou

Quick links:

RuleML Families : Specification of RuleML 1.02

Prerequisites: None, Level: Semi-formal

Consumer RuleML : Specification of Consumer RuleML

Prerequisites: None, Level: Semi-formal

Primer : Tutorial on RuleML

Prerequisites: None, Level: Informative

Relax NG Schemas : Machine-readable grammar in the Relax NG language

Prerequisites: Relax NG, Level: Formal

XSD Schemas : Machine-readable schemas in XSD

Prerequisites: XSD, Level: Formal

Normalizer : Stylesheet for transforming into the normal-form serialization

Prerequisites: XSLT, Level: Formal

Compactifier : Stylesheet for transforming into the compact serialization

Prerequisites: XSLT, Level: Formal

Examples : Illustrative Instances of the Version 1.02 Language

Prerequisites: Primer, Level: Informative

Glossary : Definitions of Elements and Attributes

Prerequisites: Primer, Level: Semi-formal

Content Models : Simplified XML Element and Attribute Definitions

Prerequisites: Primer, Level: Semi-formal

Schema Docs : Diagrammatic Presentation of Content Models

Prerequisites: Primer, Level: Semi-formal

Implementations : Implemented RuleML tools

Prerequisites: None, Level: Informative

This version: consumer.ruleml.org/1.02

Latest version: consumer.ruleml.org/spec



Version history:
Date Version
2015-10-12 -

Version 1.02 Wiki


Copyright © RuleML Inc. 2014 - 2016 -- Licensed under the RuleML Specification License 1.0 (http://ruleml.org/licensing/RSL1.0-RuleML)


This specification defines Version 1.02 of Consumer RuleML as a language family of RuleML, a knowledge representation architecture designed for the uniform interchange of the major kinds of Web rules across various rule logics and platforms. RuleML has broad coverage as a system of families of languages for Web rules, also including the Deliberation RuleML and Reaction RuleML families.

RuleML's modular schemas permit rule interchange with high precision. In Consumer RuleML languages, instance documents, valid w.r.t. such schemas, combine (some of) the features, listed in the Features section, of Deliberation and Reaction RuleML. The Consumer RuleML specification also provides an entry point to the Deliberation and Reaction RuleML specifications, where some of the features are explained in greater detail. Further, the Consumer RuleML specification refers to relevant RuleML semantics specifications listed in the Predefined Semantic Styles section.

Consumer RuleML is designed to be embedded into other languages. The use of attributes in Consumer RuleML to link to external definitions of syntactic constraints (@type), semantic styles (@style) and extended quantifications (@closure) means Consumer RuleML is a "consumer", for syntactic and semantic specifications, of these external resources. The external resources may be, e.g., mathematical language definitions or formal specifications in Reaction RuleML. Further, the absence of containers (<Rulebase>) and performatives (<Assert>, <Query>) means Consumer RuleML is a "consumer", for structure and pragmatics, of containers and performatives from other languages, e.g. from FIPA, SOAP, or domain-specific XML languages such as LegalRuleML.

The scope of this specification covers:

  • (Normative) Glossary of the language components[1];
  • Schemas, including
    • (Normative) Relax NG schemas [2];
    • (Informative) XSD anchor schemas[3], generated using Trang[4] from the Relax NG schemas;
    • (Informative) NVDL schemas [5];
  • (Informative) Schema docs[6];
  • (Normative) Formatters, including normalizer and compactifier transformations from the "relaxed" serialization of Consumer RuleML 1.02 into normalized and compact, resp., serializations, as specified by XSLT stylesheets in the XSLT directory[7].

The scope of this specification does not cover DTDs. While the Consumer RuleML specification itself does not cover semantics, it makes use of the family-independent Predefined Semantic Styles of RuleML 1.02. Also excluded from the scope are tools that make use of RuleML languages, such as editors or engines. For a listing of tools for working with RuleML, see the Implementations page.

The intended audience of the Consumer RuleML specification is quite open-ended, including users who want to perform any of the following tasks:

  • Author new Consumer RuleML instance documents
  • Validate such documents
  • Transform such documents
  • Implement reasoning engines that accept such documents

Readers who are already familiar with either Deliberation or Reaction RuleML may want to refer to the Changes section. The RuleML 1.02 architecture as a whole is described in RuleML 1.02: Deliberation, Reaction and Consumer Families[8].

1 Overview

1.1 Consumer RuleML Features

The Consumer RuleML family includes the following features:

  • First-order logic expressivity extended with polyadic functions and relations, optionally with punning between functions, relations and individuals
  • Optional frame syntax instead of or in addition to relational syntax (see <oid>, <slot>)
  • IRI symbol names with CURIE abbreviations
  • Optional distributed representation of all expressions (see Key-Keyref)
  • Weak negation (see <Naf>)
  • Generic negation (see <Negation>)
  • Equality <Equal>
  • (Un)certainty degree (see <degree>)
  • Generic modal operators (see <Operation>)
  • Generic temporal, spatial and interval representation and algebra (see <Time>, <Spatial>, <Interval>)
  • Reference to externally defined extended quantification (see @closure), signatures (see @type) and semantic styles (see @style, Predefined Semantic Styles, Attribute Inheritance)

1.2 Relationship to Other RuleML Languages

An introduction to RuleML is given in the Primer. Also, the Overarching paper discusses the upper layer of the RuleML hierarchy of rules. The Consumer RuleML family presented here overlaps with the main RuleML families:

  • Deliberation rules, in particular, First-Order Logic (FOL) with equality and negation-as-failure (weak negation).
  • Reaction rules, in particular, the specialized expressions and (atomic) formulas for denoting temporal and spatial entities, as introduced in the Reaction RuleML 1.0 syntax paper. Reaction RuleML provides syntax and the underlying mechanisms, as described in the Reaction RuleML 1.0 semantics paper[9], for defining the syntactic signatures and semantic styles that are referenced through Consumer RuleML @type and @style attributes.

1.3 Other Consumer RuleML 1.02 Specification Components

A comprehensive Glossary accompanies this specification, providing informal definitions of the XML components of Consumer RuleML 1.02.

The grammar of Consumer RuleML 1.02 is approximated by the normative lenient Consumer RuleML grammar (Relax NG Schemas), with the exception of some restrictions that cannot easily be captured in a Relax NG schema. That is, all instances of a Consumer RuleML language validate against the Relax NG schema of that language (and its superlanguages); however, there may be XML documents or fragments that validate against a Consumer RuleML Relax NG schema, but are not valid instances of the corresponding Consumer RuleML language due to violation of the additional restrictions.

2 Examples

A number of sample Consumer RuleML documents have been prepared for maintenance in the Consumer RuleML directory. Some exemplify features of Consumer RuleML and are useful didactically[10] while others are mostly for testing purposes[11]. The following didactic examples are new:

  • The FIPA-based example directory[12] contains examples illustrating Consumer RuleML messages embedded in FIPA XML[13].
    • The FIPA-based dbpedia example[14] shows a rule for converting a dbpedia[15] triple about the typical temperature at some location in the month of January into a more detailed polyadic relational form with temporal modality, suitable for querying in regard to, say, the months when the mean temperature is greater than a given threshold in a given location.
  • The SOAP-based example directory[16] contains examples illustrating Consumer RuleML messages embedded in SOAP[17].

Examples from previous versions of RuleML are also maintained: see Specification of RuleML.

3 XSLT-Based Formatters

A RuleML formatting transformation is an abstract-syntax (metamodel-)preserving mapping from one RuleML language to another RuleML language, both belonging to the same version. A RuleML processor, or a specification for such a processor such as an XSLT stylesheet, that implements a RuleML formatting transformation is called a RuleML formatter.

A conforming RuleML formatter must accept as input any valid document of the input language of the formatting transformation, and generate from such input only valid documents in the output language. The abstract-syntax parse tree for the output must be the same as that of the input, provided the input belongs to the specified input language. The formatter may be applicable to other XML documents. This specification addresses formatters whose output is in distinguished restricted forms of serialization.

Each RuleML language has at least two distinguished restricted forms of serialization: the normalized format and the compact format. For Consumer RuleML, these serializations are defined by the RNC and XSD schemas, as well as the additional constraints described in the Additional Restrictions Section. This specification provides XSLT transformations as reference specifications of formatters into these serializations.

3.1 XSLT-Based Normalizer

The normalizer XSLT specifies normalizing formatters into the normalized serialization and provides a reference implementation. The normalized serialization of RuleML 1.02 languages explicitly includes all skippable elements, and also has child elements sorted into a canonical order. Non-exhaustive requirements for a normalizing formatter are the following:

  • If the input is valid against the RNC schema for the supremum (i.e. least restricted) Consumer RuleML language, consumer-relaxed, then the output must be valid against the RNC schema for the normalized Consumer RuleML language, consumer-normal, as well as the supremum XSD schema for the normalized serialization, consumer-normal.xsd.
  • If the input is valid against the RNC schema for the normalized Consumer RuleML language, consumer-normal, then the output has the same XML infoset as the input.

3.2 XSLT-Based Compactifiers

The compactifier XSLTs specify formatters into the compact serialization, which has fewer elements (i.e. is more compact) than the normalized serialization. Two variations of this formatter specification are provided due to some limitations of XSD schemas.

  1. The full compactifier specifies the removal of all skippable RuleML stripes, after first applying the normalizer to sort the child nodesets into the canonical order. If the input is valid against the RNC schema for the supremum Consumer RuleML language, consumer-relaxed, then the output must be valid against the RNC schema for the compact Consumer RuleML language, consumer-compact, as well as the supremum XSD schema for the compact serialization, consumer-compact.xsd.
  2. The ifthen compactifier specifies the removal of all skippable RuleML stripes except the <if> and <then> edges within <Rule> and <Implies>, after first applying the normalizer to sort the child nodesets into the canonical order. If the input is valid against the RNC schema for the supremum Consumer RuleML language, consumer-relaxed, then the output must be valid against the RNC schema for the partially-compact Consumer RuleML language consumer-compact-ifthen as well as the corresponding XSD schema, consumer-compact-ifthen.xsd. Such compactifers are required for RuleML languages and extensions that have elements of the same name with different content models in the premises and conclusion of rules and implications - for this syntax to be expressible in XSD, the if and then edges cannot be skipped

4 Glossary

The Glossary for Version 1.02 contains descriptions for every element in Version 1.02.

5 Semantic Variant Attributes

Certain (syntactic) attributes are classified as semantic variant attributes. The most general content models for these attributes accept CURIE or IRI values, and in some cases a fixed set of enumerated values. A (propositional) example is

<Implies material="no">
  <if><Atom><Rel>it rains</Rel></Atom></if>
  <then><Atom><Rel>the match will be cancelled</Rel></then>
</Implies>
<Neg><Atom><Rel>it rains</Rel></Atom></Neg>

The @material attribute with value no is intended to indicate nonmaterial implication, e.g., where the assertion of an implication whose premise is known to be false carries the meaning that the conclusion would be true if the premise were true. Material implication is indicated with value yes.

In Consumer RuleML 1.02, the only semantic variant attribute is

6 Predefined Semantic Styles

All semantic styles that are predefined in RuleML 1.02 are listed on the page Predefined Semantic Styles of RuleML 1.02. The predefined semantic styles that are relevant for Consumer RuleML 1.02 are the following:


7 Attribute Inheritance

Unlike other RuleML attributes, the @style attribute is inherited by its descendants. That is, the presence of @style on an element may affect the semantic style of all of its descendants. In particular, elements that do not have a @style attribute inherit their semantic style from their parent. Further, child elements with a @style attribute have a semantic style that is the combination of the style named by their @style attribute together with the semantic style of their parent.

In the following examples we assume the CURIE prefixes "rp" and "re" have been set to "http://ruleml.org/1.02/profiles/" and "http://ruleml.org/1.02/entailments/", respectively. Consider the following rule from Appendix 1, shown here in skeleton form:

  <ruleml:Rule closure="universal" style="rp:HornPSOA-Tarski">
      <ruleml:if>
        <ruleml:Atom>
          ...
        </ruleml:Atom>
      </ruleml:if>
      <ruleml:then>
        <ruleml:Operation 
          type="aggregation:WindowedRecurring"
          style="aggregation:profile"> ...
          <ruleml:Atom>
            ...          
          </ruleml:Atom>
            ...          
        </ruleml:Operation>
      </ruleml:then>
    </ruleml:Rule>

This rule has the following semantics.

  • For the rule as a whole, the semantic style is specified to be "rp:HornPSOA-Tarski".
  • For the operation formula in the rule consequent, the style attribute with user-defined value "aggregation:profile" supplements the "rp:HornPSOA-Tarski" semantic style, which has no specification of the semantics of generic operations.
  • The atomic formula in the body of the operation has no additional style attributes, so the multi-structured style of "rp:HornPSOA-Tarski" together with "aggregation:profile" is inherited from the <Operation> ancestor.
  • For the atomic formula in the rule antecedent, the style attribute is also absent, so the reasoning semantic style "rp:HornPSOA-Tarski" from its Rule ancestor is used.

When the language includes one or more semantic variant attributes, there is a choice of approaches for modifying the semantics (i.e. through @style or through a semantic variant attribute). Syntactically, it is allowed to have @style as well as semantic variant attributes on the same Node element. To clarify the effect in such cases, a conflict resolution strategy is here defined.

An explicit semantic variant attribute on an element always takes precedence over a @style attribute on that element. For example, in

  <Rule closure="universal" material="no" style="re:reasoning">
     ...
  </Rule>

the explicit semantic attributes specifying that the rule is not material takes precedence over the style attribute, whose effect is that when the explicit @material attribute is absent, then material implication is assumed.

The principle difference between semantic variant attributes and the style attribute is that the values of semantic variant attributes are not inherited. For example

<Rulebase  style="re:reasoning">
  <Rule closure="universal" material="no">
    <if>...</if>
    <then><Implies> ...</Implies></then>
  </Rule>
</Rulebase>

In this example, the semantic style is set by @style to be "re:reasoning", which includes material implication. There is an explicit semantic override for the Rule, where the @material attribute has value "no". This semantic override is not inherited, so the implication in the head of the rule reverts to material implication, as specified by the @style="re:reasoning" attribute on its Rulebase ancestor.

The same precedence applies to every semantic variant attribute. The closure attribute is not a semantic variant attribute, but is syntactic sugar for an explicit quantification, where the style attribute is lifted to the quantifier, and all other attributes are applied to the quantified formula.

   <Equivalent>
       <Implies closure="universal" material="no" style="re:reasoning">
           ...some premise and conclusion with free <Var>X</Var>...
       </Implies>
       <Forall style="re:reasoning">
         <Var>X</Var>
         <Implies material="no">
           ...some premise and conclusion with free <Var>X</Var>...
         </Implies>
       </Forall>
   </Equivalent>

The glossary entry for each attribute specifies whether it is a semantic variant attribute.

8 Key-Keyref

RuleML 1.02 takes an approach similar to the XML schema key-keyref elements approach to define local (webized) unique key identifiers (@key) and key reference (@keyref) attributes on RuleML knowledge elements. As introduced in Reaction RuleML 1.0, these @key-@keyref pairs can act as primary and foreign keys used to syntactically distribute or reuse - possibly across multiple documents - constructs in a RuleML knowledge base, e.g. to separate a knowledge interface from its knowledge implementation or to compactly represent a set of rules having the same premise. Different syntactic and semantic composition operations for key-keyref can be referenced by the @style attribute. The intention is that different parts of the syntax are joined together through the key-keyref resolution mechanism by the XML parser, prior to execution by a rule engine. For additional details and examples see the Glossary entry for @key and @keyref.

As an example, consider the (2-element) set of rules that would be obtained from a semantics-preserving transformation to remove the (binary) conjunctive conclusion of the rule "if P, Q, and R, then S and T" (while the transformation would copy the premise, @key can label one premise occurrence and @keyref just refer to it from the other occurrence):

    <Implies>
      <if>
        <And key=":premise">
          <Atom><Rel>P</Rel></Atom>
          <Atom><Rel>Q</Rel></Atom>
          <Atom><Rel>R</Rel></Atom>
        </And>
      </if>
      <then>
        <Atom><Rel>S</Rel></Atom>
      </then>
    </Implies>
    <Implies>
      <if>
        <And keyref=":premise"/>
      </if>
      <then>
        <Atom><Rel>T</Rel></Atom>
      </then>
    </Implies>

As can be seen in this example, syntactically RuleML's @key attribute is similar to XML's @xml:id attribute. Note, however, that the datatype of @key is CURIE or IRI (or @@@term@@@ in Reaction RuleML) while the datatype of @xml:id is xs:ID. There is no direct XML counterpart to RuleML's @keyref attribute, although prominent XML applications such as HTML have used @href for referring to an @xml:id.


9 Modularization

The Consumer RuleML Relax NG schemas use a modularization approach based on syntactic lattices, utilizing a RuleML-specific subset of Relax NG that guarantees monotonicity. I.e., adding a module defined in this Relax NG subset to a schema always generates a syntax that is a superset of the original. The details are given in the publication about the re-engineering of RuleML in Relax NG and the RuleML MYNG Wiki page.

Consumer RuleML drivers, such as those served in the drivers directory typically contain no explicit definitions, but instead include a mixture of mature Deliberation RuleML RNC modules together with new RNC modules that are served in the Consumer 1.02 modules directory.

The driver for Consumer RuleML's compact serialization is exceptional, as it is the only driver that includes a special-purpose module that redefines other modules, in order to contract the syntax.


10 Additional Restrictions

The normative schemas in the Modularization Section are lenient due to limitations in the expressivity of the schema languages. Syntactic restrictions expressed in neither Relax NG nor XSD schemas will be specified in mathematical English as follows:

  • IRIs occurring as attribute values, whether originally expressed as an IRI or a CURIE, are required to be fully conformant to RFC 3987[18]. In the case of CURIEs, this restriction applies after expansion to an IRI according to the prefix.
  • Ordered edges (arg, act, content and formula within And and Or) have a required @index attribute with value of some positive integer. It is not possible to specify in XSD or Relax NG schemas that the attribute values for a particular child nodeset (in XPath/XSLT terminology) must be a permutation of the values from 1 to the number of nodes. In the normalized and compact serializations, a nodeset of ordered edges must have sequential values of @index, starting with 1 and increasing incrementally.

Addtional optional consideration:

  • Edges that are skipped when compactifying should not have attributes when they appear in the normalized or relaxed serialization, except in the case of an ordered edge, which must have (only) an @index attribute. However, it is not always clear what edges should be considered skippable. For example, the if and then stripes of implications are considered skippable for Datalog expressivity but not for Datalog-plus, due to difficulties in expressing within XSD schemas the different content models of formulas that are allowed in the head and body of the implications. In the provided schemas, such possibly-skippable edges are optionally allowed to have attributes other than @index; implementers should take into account the target expressivity and the compactification approach when determining whether these attributes should be used.


11 Acknowledgements

We wish to acknowledge the contributions of: Asaf Adi, Sadnan Al-Manir, Yevgen Biletskiy, Alexander Cameron, Carlos Damasio, Mike Dean, Tshering Dema, Doan Dai Duong, Andreas Eberhart, Benjamin Grosof, David Hirtle, Michael Kifer, Alex Kozlenkov, Jae Kyu Lee, François Lévy, Monika Machunik, Frank Olken, Jeff Z. Pan, Steve Ross-Talbot, Omair Shafiq, Michael Sintek, Bruce Spencer, Giorgos Stamou, Suzette Stoutenburg, Said Tabet, Le Thi Thu Thuy, and Gerd Wagner.

12 Appendices

12.1 Appendix 1: Example in Consumer RuleML 1.02

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model 
    href="http://consumer.ruleml.org/1.02/nvdl/fipa-consumer-ruleml.nvdl"
    type="application/xml" 
    schematypens="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"?>
<!-- This is an illustrative example of the embedding of Consumer RuleML rule inside a 
     FIPA-ACL envelope, not an actual message from RuleML.-->
<fipa-message act="inform">
  <sender>
    <agent-identifier>
      <name id="RuleML"/>
    </agent-identifier>
  </sender>
  <receiver>
    <agent-identifier>
      <name id="Tara-Athan"/>
    </agent-identifier>
  </receiver>
  <content xmlns:ruleml="http://ruleml.org/spec" 
    xmlns:rp="http://ruleml.org/1.02/profiles/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dbp="http://dbpedia.org/"
    xmlns:clim="http://example.org/climate/vocab#"
    xmlns:aggregation="http://example.org/aggregation/">
    <!-- The Consumer RuleML content starts here.-->
    <ruleml:Rule closure="universal" style="rp:/HornPSOA-Tarski">
      <ruleml:if>
        <ruleml:Atom>
          <!-- An assertion of January climate data using the http://dbpedia.org vocabulary
             for some location "location" with a temperature value of "temperature".-->
          <ruleml:oid><ruleml:Var>location</ruleml:Var></ruleml:oid>
          <ruleml:Rel iri="dbp:ontology/Place"/>
          <ruleml:slot>
            <ruleml:Ind iri="dbp:property/janMeanC"/>
            <ruleml:Var>temperature</ruleml:Var>
          </ruleml:slot>
          <ruleml:slot>
            <ruleml:Ind iri="dbp:ontology/country"/>
            <ruleml:Ind iri="dbp:resource/Germany"/>
          </ruleml:slot>
        </ruleml:Atom>
      </ruleml:if>
      <ruleml:then>
        <ruleml:Operation 
          type="aggregation:WindowedRecurring"
          style="aggregation:profile">
          <!-- An assertion of January climate data using some "clim" climate vocabulary
             for some location "location" with a value of "temperature", 
             bringing in the additional knowledge that the homogenization period 
             for German climate data is 1981-2010.
             This knowledge is not directly available from dbpedia, but is from the Deutscher Wetterdienst, 
             which is the provenance of most Wikipedia climate data for Germany.
             An assumption is made that the dbpedia information is in agreement with the most recent 
             climate data from this source. This rule has validity until around 2020, when the 
             next climatological dataset shouldbecome available.
          -->
          <ruleml:Atom>
            <ruleml:Rel iri="clim:meanSurfaceAirTemperatureCelsius"/>
            <ruleml:Var>location</ruleml:Var>
            <ruleml:Var>temperature</ruleml:Var>            
          </ruleml:Atom>
          <ruleml:Interval>
            <ruleml:Data xsi:type="xs:gYear">1981</ruleml:Data>
            <ruleml:Data xsi:type="xs:gYear">2010</ruleml:Data>
          </ruleml:Interval>
          <ruleml:Time>
            <ruleml:Data xsi:type="xs:gMonth">--01</ruleml:Data>
          </ruleml:Time>
        </ruleml:Operation>
      </ruleml:then>
    </ruleml:Rule>
  </content>
</fipa-message>

12.2 Appendix 2: Simplified Relax NG for Consumer RuleML

The simplified (mostly w.r.t. modularization) Relax NG schema[19] displayed below is derived, using Jing[20], from a driver schema[21] that includes Relax NG modules to create a pivot schema corresponding to an expressive Consumer RuleML language that includes most of the available features, including first-order expressivity, serialized using the canonical-ordering with optional stripe-skipping. The only feature not included in the simplified schema from the supremum of Consumer RuleML is explicit datatyping[22], due to the complexity of the implementation as well as its full coverage in the Specification of Deliberation RuleML 1.02. The simplified schema is derived solely for the purpose of informative display in this specification, and is not intended for use in validation; the source modules[23] and drivers[24] are normative. For the details of the simplification procedure, see the Consumer RuleML Github repository.[25]

default namespace ns1 = "http://ruleml.org/spec"
namespace ns2 = "http://www.w3.org/2001/XMLSchema-instance"

start =
  Atom
  | Rel
  | And
  | Or
  | Implies
  | Forall
  | Exists
  | Expr
  | Fun
  | Neg
  | Naf
  | Equivalent
  | Equal
  | Data
  | Skolem
  | Ind
  | Var
  | Plex
  | Interval
  | Interval_2
  | Negation
  | Operation
  | Rule
  | Spatial
  | Spatial_2
  | After
  | Before
  | Every
  | Any
  | Timer
  | During
  | Overlaps
  | Starts
  | Precedes
  | Succeeds
  | Meets
  | Finishes
  | Time
  | Time_2
  | op
  | formula
  | formula_2
  | then
  | if
  | declare
  | formula_3
  | formula_4
  | op_2
  | degree
  | strong
  | weak
  | torso
  | oid
  | slot
  | left
  | right
  | arg
  | resl
  | repo
  | content
  | content_2
  | content_3
  | arg_2
  | arg_3
  | formula_5
  | formula_6
  | if_2
  | then_2
  | arg_4
  | arg_5
Atom =
  element Atom {
    (attribute closure {
       "universal"
       | "existential"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    oid?,
    degree?,
    (((op | Rel),
      (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex
       | arg)*,
      repo?,
      slot*,
      resl?)
     | ((Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg)*,
        repo?,
        slot*,
        resl?))
  }
Rel =
  element Rel {
    (attribute iri {
       xsd:string {
         pattern =
           "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
         minLength = "1"
       }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    xsd:token
  }
And =
  element And {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (formula
     | Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Naf
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation)*
  }
Or =
  element Or {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (formula_2
     | Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Naf
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation)*
  }
Implies =
  element Implies {
    (attribute material {
       "yes"
       | "no"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    ((if, then)
     | ((Atom
         | Interval
         | Spatial_2
         | During
         | Overlaps
         | Starts
         | Precedes
         | Succeeds
         | Meets
         | Finishes
         | Time
         | Equal
         | And
         | Or
         | Neg
         | Negation
         | Naf
         | Implies
         | Equivalent
         | Forall
         | Exists
         | Operation),
        (Atom
         | Interval
         | Spatial_2
         | During
         | Overlaps
         | Starts
         | Precedes
         | Succeeds
         | Meets
         | Finishes
         | Time
         | Equal
         | And
         | Or
         | Neg
         | Negation
         | Implies
         | Equivalent
         | Forall
         | Exists
         | Operation)))
  }
Forall =
  element Forall {
    (attribute closure {
       "universal"
       | "existential"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (declare | Var)+,
    (formula_3
     | Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation)
  }
Exists =
  element Exists {
    (attribute closure {
       "universal"
       | "existential"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (declare | Var)+,
    (formula_4
     | Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation)
  }
Expr =
  element Expr {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (((op_2 | Fun),
      (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex
       | arg)*,
      repo?,
      slot*,
      resl?)
     | ((Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg)*,
        repo?,
        slot*,
        resl?))
  }
Fun =
  element Fun {
    (attribute iri {
       xsd:string {
         pattern =
           "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
         minLength = "1"
       }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    xsd:token
  }
Neg =
  element Neg {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation
     | strong)
  }
Naf =
  element Naf {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation
     | weak)
  }
Equivalent =
  element Equivalent {
    (attribute closure {
       "universal"
       | "existential"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation
     | torso),
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation
     | torso)
  }
Equal =
  element Equal {
    (attribute closure {
       "universal"
       | "existential"
       | xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    degree?,
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex
     | left),
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex
     | right)
  }
Data =
  element Data {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & text
    & _1*
  }
Skolem =
  element Skolem {
    (attribute type {
       xsd:string {
         pattern =
           "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
         minLength = "1"
       }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    xsd:token
  }
Ind =
  element Ind {
    (attribute iri {
       xsd:string {
         pattern =
           "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
         minLength = "1"
       }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    xsd:token
  }
Var =
  element Var {
    (attribute type {
       xsd:string {
         pattern =
           "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
         minLength = "1"
       }
       | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
     }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    xsd:token
  }
Plex =
  element Plex {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex
     | arg)*,
    repo?,
    slot*,
    resl?
  }
Interval =
  element Interval {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (oid?,
       degree?,
       ((Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg_2),
        (Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg_2)?)?)
  }
Interval_2 =
  element Interval {
    attribute type {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3)?)?
  }
Negation =
  element Negation {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation
       | formula_5)
  }
Operation =
  element Operation {
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Naf
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation
     | formula_6)*,
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute closure {
         "universal"
         | "existential"
         | xsd:string {
             pattern =
               "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
             minLength = "1"
           }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?)
  }
Rule =
  element Rule {
    attribute material {
      "yes"
      | "no"
      | xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (degree?,
       ((if_2, then_2)
        | ((Atom
            | Interval
            | Spatial_2
            | During
            | Overlaps
            | Starts
            | Precedes
            | Succeeds
            | Meets
            | Finishes
            | Time
            | Equal
            | And
            | Or
            | Neg
            | Negation
            | Naf
            | Implies
            | Equivalent
            | Forall
            | Exists
            | Operation),
           (Atom
            | Interval
            | Spatial_2
            | During
            | Overlaps
            | Starts
            | Precedes
            | Succeeds
            | Meets
            | Finishes
            | Time
            | Equal
            | And
            | Or
            | Neg
            | Negation
            | Implies
            | Equivalent
            | Forall
            | Exists
            | Operation)))?)
  }
Spatial =
  element Spatial {
    attribute type {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (((Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg_4)*,
        repo?,
        slot*,
        resl?)
       | content_2*)
  }
Spatial_2 =
  element Spatial {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (oid?,
       degree?,
       (((Skolem
          | Ind
          | Data
          | Interval_2
          | Spatial
          | Time_2
          | Var
          | Expr
          | After
          | Before
          | Every
          | Any
          | Timer
          | Plex
          | arg_4)*,
         repo?,
         slot*,
         resl?)
        | content_2*))
  }
After =
  element After {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3)?)?
  }
Before =
  element Before {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3)?)?
  }
Every =
  element Every {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex
       | arg_3)?
  }
Any =
  element Any {
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex
     | arg_3)*,
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute type {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?)
  }
Timer =
  element Timer {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3)?)?
  }
During =
  element During {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Overlaps =
  element Overlaps {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Starts =
  element Starts {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Precedes =
  element Precedes {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Succeeds =
  element Succeeds {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Meets =
  element Meets {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Finishes =
  element Finishes {
    attribute style {
      xsd:string {
        pattern =
          "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
        minLength = "1"
      }
      | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
    }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & ((Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3),
       (Skolem
        | Ind
        | Data
        | Interval_2
        | Spatial
        | Time_2
        | Var
        | Expr
        | After
        | Before
        | Every
        | Any
        | Timer
        | Plex
        | arg_3))
  }
Time =
  element Time {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute style {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute closure {
        "universal"
        | "existential"
        | xsd:string {
            pattern =
              "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
            minLength = "1"
          }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (oid?,
       degree?,
       (((Skolem
          | Ind
          | Data
          | Interval_2
          | Spatial
          | Time_2
          | Var
          | Expr
          | After
          | Before
          | Every
          | Any
          | Timer
          | Plex
          | arg_5)*,
         repo?,
         slot*,
         resl?)
        | content*))
  }
Time_2 =
  element Time {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute type {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (((Skolem
         | Ind
         | Data
         | Interval_2
         | Spatial
         | Time_2
         | Var
         | Expr
         | After
         | Before
         | Every
         | Any
         | Timer
         | Plex
         | arg_5)*,
        repo?,
        slot*,
        resl?)
       | content*)
  }
op =
  element op {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & Rel
  }
formula =
  element formula {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Naf
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
formula_2 =
  element formula {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Naf
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
then =
  element then {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
if =
  element if {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Naf
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
declare =
  element declare {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & Var
  }
formula_3 =
  element formula {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
formula_4 =
  element formula {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
op_2 =
  element op {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & Fun
  }
degree =
  element degree {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & Data
  }
strong =
  element strong {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
weak =
  element weak {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
torso =
  element torso {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
oid =
  element oid {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
slot =
  element slot {
    (attribute card { xsd:nonNegativeInteger }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex),
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex)
  }
left =
  element left {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
right =
  element right {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
arg =
  element arg {
    (attribute index { xsd:positiveInteger }
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex)
  }
resl =
  element resl {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Var | Plex_2)
  }
repo =
  element repo {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Var | Plex_3)
  }
content =
  element content {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute index { xsd:positiveInteger }
    & ((text & _2*)
       | Atom
       | Rel
       | And
       | Or
       | Implies
       | Forall
       | Exists
       | Expr
       | Fun
       | Neg
       | Naf
       | Equivalent
       | Equal
       | Data
       | Skolem
       | Ind
       | Var
       | Plex
       | Interval
       | Interval_2
       | Negation
       | Operation
       | Rule
       | Spatial
       | Spatial_2
       | After
       | Before
       | Every
       | Any
       | Timer
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Time_2
       | op
       | formula
       | formula_2
       | then
       | if
       | declare
       | formula_3
       | formula_4
       | op_2
       | degree
       | strong
       | weak
       | torso
       | oid
       | slot
       | left
       | right
       | arg
       | resl
       | repo
       | content
       | content_2
       | content_3
       | arg_2
       | arg_3
       | formula_5
       | formula_6
       | if_2
       | then_2
       | arg_4
       | arg_5)
  }
content_2 =
  element content {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute index { xsd:positiveInteger }
    & ((text & _2*)
       | Atom
       | Rel
       | And
       | Or
       | Implies
       | Forall
       | Exists
       | Expr
       | Fun
       | Neg
       | Naf
       | Equivalent
       | Equal
       | Data
       | Skolem
       | Ind
       | Var
       | Plex
       | Interval
       | Interval_2
       | Negation
       | Operation
       | Rule
       | Spatial
       | Spatial_2
       | After
       | Before
       | Every
       | Any
       | Timer
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Time_2
       | op
       | formula
       | formula_2
       | then
       | if
       | declare
       | formula_3
       | formula_4
       | op_2
       | degree
       | strong
       | weak
       | torso
       | oid
       | slot
       | left
       | right
       | arg
       | resl
       | repo
       | content
       | content_2
       | content_3
       | arg_2
       | arg_3
       | formula_5
       | formula_6
       | if_2
       | then_2
       | arg_4
       | arg_5)
  }
content_3 =
  element content {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute index { xsd:positiveInteger }
    & ((text & _2*)
       | Atom
       | Rel
       | And
       | Or
       | Implies
       | Forall
       | Exists
       | Expr
       | Fun
       | Neg
       | Naf
       | Equivalent
       | Equal
       | Data
       | Skolem
       | Ind
       | Var
       | Plex
       | Interval
       | Interval_2
       | Negation
       | Operation
       | Rule
       | Spatial
       | Spatial_2
       | After
       | Before
       | Every
       | Any
       | Timer
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Time_2
       | op
       | formula
       | formula_2
       | then
       | if
       | declare
       | formula_3
       | formula_4
       | op_2
       | degree
       | strong
       | weak
       | torso
       | oid
       | slot
       | left
       | right
       | arg
       | resl
       | repo
       | content
       | content_2
       | content_3
       | arg_2
       | arg_3
       | formula_5
       | formula_6
       | if_2
       | then_2
       | arg_4
       | arg_5)
  }
arg_2 =
  element arg {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
arg_3 =
  element arg {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
formula_5 =
  element formula {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
formula_6 =
  element formula {
    (attribute index { xsd:positiveInteger }?
     & attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (Atom
     | Interval
     | Spatial_2
     | During
     | Overlaps
     | Starts
     | Precedes
     | Succeeds
     | Meets
     | Finishes
     | Time
     | Equal
     | And
     | Or
     | Neg
     | Negation
     | Naf
     | Implies
     | Equivalent
     | Forall
     | Exists
     | Operation)
  }
if_2 =
  element if {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Naf
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
then_2 =
  element then {
    attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Atom
       | Interval
       | Spatial_2
       | During
       | Overlaps
       | Starts
       | Precedes
       | Succeeds
       | Meets
       | Finishes
       | Time
       | Equal
       | And
       | Or
       | Neg
       | Negation
       | Implies
       | Equivalent
       | Forall
       | Exists
       | Operation)
  }
arg_4 =
  element arg {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
arg_5 =
  element arg {
    attribute index { xsd:positiveInteger }?
    & attribute ns2:schemaLocation { text }?
    & attribute xml:base { xsd:anyURI }?
    & attribute xml:id { xsd:NCName }?
    & attribute key {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & attribute keyref {
        xsd:string {
          pattern =
            "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
          minLength = "1"
        }
        | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
      }?
    & (Skolem
       | Ind
       | Data
       | Interval_2
       | Spatial
       | Time_2
       | Var
       | Expr
       | After
       | Before
       | Every
       | Any
       | Timer
       | Plex)
  }
_1 =
  element * {
    attribute * { text }*,
    (text & _1*)
  }
Plex_2 =
  element Plex {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    slot*,
    resl?
  }
Plex_3 =
  element Plex {
    (attribute ns2:schemaLocation { text }?
     & attribute xml:base { xsd:anyURI }?
     & attribute xml:id { xsd:NCName }?
     & attribute key {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute keyref {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?
     & attribute style {
         xsd:string {
           pattern =
             "(([\i-[:]][\c-[:]]*)?:)(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)"
           minLength = "1"
         }
         | xsd:string { pattern = "[\i-[:]][\c-[:]]+:.+" }
       }?),
    (Skolem
     | Ind
     | Data
     | Interval_2
     | Spatial
     | Time_2
     | Var
     | Expr
     | After
     | Before
     | Every
     | Any
     | Timer
     | Plex
     | arg)*,
    repo?
  }
_2 =
  element * - ns1:* {
    (_3
     | attribute * { text }
     | text)+
  }
_3 =
  element * {
    (_3
     | attribute * { text }
     | text)+
  }


12.3 Appendix 3: Validating an Instance Against a Relax NG Schema

Validator.nu is an easy-to-use online tool for validating an XML instance against a Relax NG schema. A basic procedure for using this tool is as follows:

  1. Open the Validator.nu webpage in your browser.
  2. Choose how you want to enter the instance:
    • Address -- type or paste a URL into the adjacent text field;
    • File Upload -- use the browse dialog to locate the file on your local hard drive or network;
    • Text Field -- type or paste text directly into the text area.
  3. Leave the Encoding field at the default value, unless there is a discrepancy between the server/page setting and the actual content.
  4. Type or paste a URL to the schema you wish to validate against. Only schemas publically available from the Web can be used.
  5. Keep the Preset Field at "None".
  6. Select, in the Parser field, "XML; don't load external entities" if your instance document does not use external entities (the typical case), otherwise select "XML; load external entities"
  7. Skip the rest of the fields for now - these may become useful as you gain familiarity with the tool.
  8. Click Validate.
  9. The result will appear below.

An online demo of validation using the RuleML Relax NG schemas with Validator.nu, including more advanced options, is available at the Demo section of the MYNG Wiki. Other tools that may be used for validation against Relax NG schemas are described in the Tools section of the MYNG Wiki.

12.3.1 Testing of Relax NG Schemas

The RuleML documents used to test the Relax NG schemas are available in the /rnc-test-suites directory, while the Bash scripts for testing are in the /bash directory. The script used to validate the rnc-test-suite documents is batch_rnc-test-suite.sh . All the scripts for testing the Relax NG schemas are designed to run offline in a clone of the Github repository, using the Jing[20] engine to validate the test documents against local copies of the Relax NG schemas. The build_rnc.sh master script executes the rnc-test-suite tests as well as the following additional tests:

12.4 Appendix 4: Validating an Instance Against an NVDL Schema

Validator.nu is an easy-to-use online tool for validating an XML instance against an NVDL schema. A basic procedure for using this tool is as follows:

  1. Open the Validator.nu webpage in your browser.
  2. Choose how you want to enter the instance:
    • Address -- type or paste a URL into the adjacent text field;
    • File Upload -- use the browse dialog to locate the file on your local hard drive or network;
    • Text Field -- type or paste text directly into the text area.
  3. Skip the Encoding field
  4. Type or paste a URL to the schema you wish to validate against. Only schemas available from the internet can be used.
  5. Skip the rest of the fields, and click Validate.
  6. The result will appear below, followed by a copy of the instance source.


Note that Validator.nu depends on instances and schemas being served with the correct MIME type. In this case, the RuleML server is configured (using .htaccess) to serve files with extension .nvdl as application/xml.

An online demo of validation using the RuleML schemas with Validator.nu, including more advanced options, is available at the Demo section of the MYNG Wiki. Other tools that may be used for validation against NVDL schemas are described in the Tools section of the MYNG Wiki.

12.5 Appendix 5: Instructions on Validating a RuleML Instance Online with XSD

Validome is an easy-to-use online tool for validating an XML instance against an XSD schema. A basic procedure for using this tool is as follows:

  1. Direct your browser to http://www.validome.org/xml/validate/
  2. Enter the following:
    1. Source: a URL, or upload a local RuleML file, or paste the Sourcecode into the text area.
      • Note: the RuleML file must contain an xsi:schemaLocation attribute referencing a RuleML XSD schema
    2. Check the View Sourcecode checkbox.
    3. Click Validate.

12.5.1 Testing of XSD Schemas

The RuleML documents used to test the XSD schemas are available in the /rnc-test-suites directory. The script used to execute the rnc-test-suites validation test is batch_xsd-test-suite.sh. Again, all of the scripts for testing the XSD schemas are designed to run offline in a clone of the Github repository, using the JAXB[26] engine for validation of local copies of the generated XSD schemas, and using the xmllint[27] tool from the libxml2 library[28] to validate the test documents against the schemas. The build_xsd.sh master script executes the rnc-test-suites tests as well as the following additional tests:

12.6 Appendix 6: Formatting or Upgrading RuleML Files with XSLT

W3C XSLT Service is a convenient online tool for applying XSLT 2.0 transformations to XML. Both XSLT and XML must be available by URL. Select the "debug output" option to view the output XML. Otherwise, the default options are sufficient to apply the RuleML Upgraders or Formatters. See {{{Family}}} RuleML {{{version}}} {{{Transformer}}} Demo

12.7 Appendix 7: Changes

As a new family, namely the chronologically third one, Consumer RuleML has created a major change in the former two-family system of RuleML. As the first release of Consumer RuleML, this initial version (numbered "1.02" for synchronization with the other two families) cannot have changes w.r.t. a previous version, instead acting as a baseline for future versions. However, in the following section, the design requirements of this new family of RuleML are presented.

12.7.1 Design Requirements

The primary design objective of Consumer RuleML 1.02 is to define a declarative language contained (syntactically and semantically) in a combination of Deliberation RuleML 1.02 and Reaction RuleML 1.02 that is limited in scope, yet sufficiently expressive to meet a broad range of use cases for embedding rules and rule templates (incomplete rule constructs) into other languages.

The following requirements were developed to provide guidance to the design of the Consumer RuleML 1.02 family.

  • Consumer RuleML 1.02 features should be derived exclusively from Deliberation RuleML 1.02, Reaction RuleML 1.02, or both.
  • Syntax
    • The syntactic intersection of Consumer RuleML 1.02 and Reaction RuleML 1.02 should be a non-trivial language (called Consumer Reaction RuleML 1.02) which contains at least Horn logic extended with strong and weak negation, and equality.
    • The syntactic intersection of Consumer RuleML 1.02 and Deliberation RuleML 1.02 should be a non-trivial language (called Consumer Deliberation RuleML 1.02) which contains at least first-order predicate logic extended with weak negation and equality.
    • Consumer RuleML 1.02 should not allow the definition of
      • Signatures (e.g. constraints on function or relation arguments w.r.t. arity or sorts)
      • Profiles (e.g. model-theoretic or operational semantics)
      • Extra-logical entities (e.g. entities that are not constructs of a logical language, such as rulebases, entailments or performatives)
      • Qualifications or extra-logical annotations (qualifying metadata, e.g. priorities for conflict-resolution strategies, validity intervals, implementation restrictions, etc.)
      • Extended quantifications (e.g. numerical quantifiers)
    • However, Consumer RuleML 1.02 should have various attributes which allow references to external definitions of signatures, profiles, and extended quantifications, effectively making Consumer RuleML 1.02 knowledge bases a consumer of external definitions from Reaction RuleML 1.02 knowledge bases.
  • Serialization
    • Consumer Deliberation RuleML 1.02 should be internally normalizable relative to the Deliberation RuleML 1.02 normalized serialization:
      The normalizer transformation of Deliberation RuleML 1.02 should be applicable to instances of each Consumer Deliberation RuleML 1.02 language and the result should still be valid in that language.
    • Similarly, Consumer Reaction RuleML 1.02 should be internally normalizable relative to the Reaction RuleML 1.02 normalized serialization.
  • Semantics
    • The semantics (model-theoretic, proof-theoretic, operational, etc.) of any instance of the Consumer RuleML family should not differ when considered within Reaction RuleML or within Deliberation RuleML.

The above design requirements do not uniquely define the Consumer RuleML 1.02 language in terms of Deliberation and Reaction RuleML 1.02. Additional design decisions were made as follows, principally to keep the scope limited:

  • Consumer RuleML 1.02 is declarative; hence it does not contain the action feature of Reaction RuleML 1.02.
  • Consumer RuleML 1.02 does not include the SWSL syntax of Deliberation RuleML.
  • Consumer RuleML 1.02 does not include the event or situation syntax of Reaction RuleML 1.02.

12.7.2 Changelog

The commits to the Consumer RuleML Github repository during the development and review of Consumer RuleML 1.02 are summarized in the Github Changelog.

12.7.3 Editorial Changes

The Specification includes auxiliary wiki pages and artifacts in the Github repository. Technical changes are changes altering the functionality; all other changes are editorial. Technical changes to non-normative items and editorial changes may be made to this Specification after the release date without the need to increment the version number. The components of the Specification that are considered normative are listed in the lead section.

12.8 Appendix 8: Issues

See Category:Errata of Consumer RuleML 1.02 for a summary of reported errata of Consumer RuleML 1.02, including errata of Consumer RuleML 1.02, and errata of earlier versions of Consumer RuleML that have not been resolved as of Version 1.02.

See Category:Enhancements of Consumer RuleML 1.02 for a summary of requests for enhancement of Consumer RuleML, including enhancements of Consumer RuleML 1.02, and enhancements of earlier versions of Consumer RuleML that have not been resolved as of Version 1.02.

13 References

  1. Consumer RuleML Version 1.02 Glossary: http://consumer.ruleml.org/1.02/glossary/ Glossary
  2. Consumer RuleML Version 1.02 Relax NG Schemas: http://consumer.ruleml.org/1.02/relaxng/
  3. Consumer RuleML Version 1.02 XSD Schemas: http://consumer.ruleml.org/1.02/xsd/
  4. Trang: http://www.thaiopensource.com/relaxng/trang.html
  5. Consumer RuleML Version 1.02 NVDL Schemas: http://consumer.ruleml.org/1.02/nvdl/
  6. Schema docs http://consumer.ruleml.org/1.02/doc/
  7. Consumer RuleML Version 1.02 XSLT Directory: http://consumer.ruleml.org/1.02/xslt/
  8. RuleML 1.02: Deliberation, Reaction and Consumer Families http://ceur-ws.org/Vol-1417/paper6.pdf
  9. Reaction RuleML 1.0 semantics: http://dx.doi.org/10.1007/978-3-319-09870-8_1
  10. Consumer RuleML 1.02 Examples: http://consumer.ruleml.org/1.02/exa
  11. Consumer RuleML 1.02 Tests: http://consumer.ruleml.org/1.02/test
  12. FIPA-based example directory: http://consumer.ruleml.org/1.02/exa/fipa/
  13. FIPA ACL Message Representation in XML Specification http://www.fipa.org/specs/fipa00071/
  14. FIPA-based dbpedia example: http://consumer.ruleml.org/1.02/exa/fipa/fipa-acl-MeanSATemperatureCelsius.xml
  15. dbpedia: http://wiki.dbpedia.org/ dbpedia
  16. SOAP-based example directory: http://consumer.ruleml.org/1.02/exa/soap/
  17. SOAP Specification: http://www.w3.org/TR/soap/
  18. RFC 3987: https://www.ietf.org/rfc/rfc3987.txt
  19. http://consumer.ruleml.org/1.02/simplified/
  20. 20.0 20.1 Jing: http://www.thaiopensource.com/relaxng/jing.html
  21. http://consumer.ruleml.org/1.02/relaxng/drivers4simp/
  22. http://deliberation.ruleml.org/1.02/relaxng/modules/explicit_datatyping_expansion_module.rnc
  23. http://consumer.ruleml.org/1.02/relaxng/modules/
  24. http://consumer.ruleml.org/1.02/relaxng/drivers/
  25. https://github.com/RuleML/consumer-ruleml/blob/1.02/bash/batch_rnc2simp.sh
  26. JAXB: https://jaxb.java.net/
  27. xmllint: http://xmlsoft.org/xmllint.html
  28. libxml2: http://xmlsoft.org/


Site Contact: Tara Athan