Cover Pages Logo SEARCH
Advanced Search
ABOUT
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

NEWS
Cover Stories
Articles & Papers
Press Releases

CORE STANDARDS
XML
SGML
Schemas
XSL/XSLT/XPath
XLink
XML Query
CSS
SVG

TECHNOLOGY REPORTS
XML Applications
General Apps
Government Apps
Academic Apps

EVENTS
LIBRARY
Introductions
FAQs
Bibliography
Technology and Society
Semantics
Tech Topics
Software
Related Standards
Historic

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)."


Globe Image

Document URL: http://xml.coverpages.org/SRML-DTD20010517.html