規則集 DTD:
<?xml version="1.0" encoding="UTF-8"?> <!-- The following constraints are not represented in DTD, but taken care of programmatically 1. In a Rule, All Mandatory attributes cannot be "*". 2. Only one instance of the below elements is allowed, but in any order. 1)HTMLRules 2)JSRules 3)XMLRules 3. ID should always be in lower case. --> <!ENTITY % eURL ’URL’> <!ENTITY % eEXPRESSION ’EXPRESSION’> <!ENTITY % eDHTML ’DHTML’> <!ENTITY % eDJS ’DJS’> <!ENTITY % eSYSTEM ’SYSTEM’> <!ENTITY % ruleSetElements ’(HTMLRules | JSRules | XMLRules)?’> <!ENTITY % htmlElements ’(Form | Applet | Attribute)*’> <!ENTITY % jsElements ’(Variable | Function)*’> <!ENTITY % xmlElements ’(Attribute | TagText)*’> <!ELEMENT RuleSet (%ruleSetElements;,%ruleSetElements;,%ruleSetElements;)> <!ATTLIST RuleSet id ID #REQUIRED extends CDATA "none" > <!-- Rules for identifying rules in HTML content --> <!ELEMENT HTMLRules (%htmlElements;)> <!ELEMENT Form EMPTY> <!ATTLIST Form name CDATA #REQUIRED field CDATA #REQUIRED valuePatterns CDATA "" source CDATA "*" > <!ELEMENT Applet EMPTY> <!ATTLIST Applet code CDATA #REQUIRED param CDATA "*" valuePatterns CDATA "" source CDATA "*" > <!-- Rules for identifying rules in JS content --> <!ELEMENT JSRules (%jsElements;)> <!ELEMENT Variable EMPTY> <!ATTLIST Variable name CDATA #REQUIRED type (%eURL; | %eEXPRESSION; | %eDHTML; | %eDJS; | %eSYSTEM;) "EXPRESSION" source CDATA "*" > <!ELEMENT Function EMPTY> <!ATTLIST Function name CDATA #REQUIRED paramPatterns CDATA #REQUIRED type (%eURL; | %eEXPRESSION; | %eDHTML; | %eDJS;) "EXPRESSION" source CDATA "*" > <!-- Rules for identifying rules in XML content --> <!ELEMENT XMLRules (%xmlElements;)> <!ELEMENT TagText EMPTY> <!ATTLIST TagText tag CDATA #REQUIRED attributePatterns CDATA "" source CDATA "*" > <!ELEMENT Attribute EMPTY> <!ATTLIST Attribute name CDATA #REQUIRED tag CDATA "*" valuePatterns CDATA "" type (%eURL; | %eDHTML; | %eDJS; ) "URL" source CDATA "*" >
除必要的屬性值不能只有 * 之外,您可使用 * 做為規則值的一部分。會忽略這類規則,但是訊息會記錄在 RuleSetInfo 記錄檔中。如需此記錄檔的資訊,請參閱除錯檔案名稱。