SRML (Simple Rule Markup Language) DTD
<!-- SRML (Simple Rule Markup Language) DTD --> <?xml version="1.0" encoding="ISO-8859-1"?> <!ELEMENT ruleset (rule*)> <!ATTLIST ruleset name NMTOKEN #IMPLIED> <!ELEMENT rule ( priority?, conditionPart, actionPart ) > <!ATTLIST rule name NMTOKEN #REQUIRED> <!ELEMENT priority (%expression;)> <!ELEMENT conditionPart (%condition;)+> <!ELEMENT actionPart (%action;)* > <!ENTITY % condition "(simpleCondition | notCondition)"> <!ENTITY % action "(assignment | bind | assert | assertobj | modify | retract)"> <!ELEMENT simpleCondition (%expression;)*> <!ATTLIST simpleCondition className CDATA #REQUIRED objectVariable NMTOKEN #IMPLIED> <!ELEMENT notCondition (%expression;)*> <!ATTLIST notCondition className CDATA #REQUIRED> <!ELEMENT assert (assignment | bind)* > <!ATTLIST assert className CDATA #REQUIRED> <!ELEMENT assertobj (%expression;)> <!ELEMENT retract (variable)> <!ELEMENT modify (variable, (assignment | bind)+)> <!ENTITY % expression "(%assignable; | constant | unaryExp | binaryExp | naryExp)"> <!ELEMENT unaryExp (%expression;)> <!ATTLIST unaryExp operator (plus | minus | not) #REQUIRED> <!ELEMENT binaryExp (%expression;,%expression;)> <!ATTLIST binaryExp operator (eq | neq | lt | lte | gt | gte) #REQUIRED> <!ELEMENT naryExp (%expression;)+> <!ATTLIST naryExp operator (add | subtract | multiply | divide | remainder | and | or) #REQUIRED> <!ELEMENT assignment (%assignable;,%expression;)> <!ELEMENT bind (%expression;) > <!ATTLIST bind name NMTOKEN #REQUIRED> <!ELEMENT constant EMPTY> <!ATTLIST constant type (string | boolean | byte | short | char | long | int | float | double | null) #REQUIRED value CDATA #REQUIRED> <!ENTITY % assignable "(variable | field)"> <!ELEMENT variable EMPTY> <!ATTLIST variable name NMTOKEN #REQUIRED> <!ELEMENT field (%expression;)?> <!ATTLIST field name NMTOKEN #REQUIRED>
Prepared by Robin Cover for The XML Cover Pages archive. See also (1) the plain text format and (2) the main entry "Simple Rule Markup Language (SRML)."