RuleSet DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms
of the Common Development and Distribution License
(the License). You may not use this file except in
compliance with the License.
You can obtain a copy of the License at
http://www.sun.com/cddl/cddl.html and legal/CDDLv1.0.txt
See the License for the specific language governing
permission and limitations under the License.
When distributing Covered Code, include this CDDL
Header Notice in each file and include the License file
at legal/CDDLv1.0.txt.
If applicable, add the following below the CDDL Header,
with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
Copyright 2008 Sun Microsystems Inc. All Rights Reserved
CDDL HEADER END
-->
<!--
The following constraints are not represented in DTD, but taken care
programatically
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 alway be in lower case.
-->
<!ENTITY % gtype 'GROUPED'>
<!ENTITY % stype 'SCATTERED'>
<!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 | JSToken)*'>
<!ENTITY % jsElements '(Variable | Function)*'>
<!ENTITY % xmlElements '(Attribute | TagText)*'>
<!ELEMENT RuleSet (%ruleSetElements;,%ruleSetElements;,%ruleSetElements;)>
<!ATTLIST RuleSet
type (%gtype; | %stype;) "GROUPED"
id ID #REQUIRED
extends CDATA "none"
>
<!ELEMENT HTMLRules (%htmlElements;)>
<!ATTLIST HTMLRules
type (%gtype; | %stype;) "GROUPED"
id CDATA "html_rules"
>
<!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 "*"
>
<!ELEMENT JSToken (#PCDATA)>
<!ELEMENT JSRules (%jsElements;)>
<!ATTLIST JSRules
type (%gtype; | %stype;) "GROUPED"
id CDATA "js_rules"
>
<!ELEMENT Variable (#PCDATA)>
<!ATTLIST Variable
name CDATA ""
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 "*"
>
<!ELEMENT XMLRules (%xmlElements;)>
<!ATTLIST XMLRules
type (%gtype; | %stype;) "GROUPED"
id CDATA "xml_rules"
>
<!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 "*"
>
You can use * as a part of rule value except that mandatory attribute values cannot be just *. Such rules are ignored, but the message is logged in the RuleSetInfo log file. For information on this log file, see Debug File Names.