attempt to cope with ID/IDREF(S) declared both in the DTD and in the

* valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S)
  declared both in the DTD and in the Schemas <grin/>
* relaxng.c: more debug, added a big optimization for <mixed>
* test/relaxng/testsuite.xml: augmented the testsuite
* test/relaxng/ result/relaxng: added the RelaxNG spec and a
  DocBook example to the regression tests
Daniel
diff --git a/ChangeLog b/ChangeLog
index 5f3086d..49e15a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Wed Mar 19 21:58:47 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+	* valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S)
+	  declared both in the DTD and in the Schemas <grin/>
+	* relaxng.c: more debug, added a big optimization for <mixed>
+	* test/relaxng/testsuite.xml: augmented the testsuite
+	* test/relaxng/ result/relaxng: added the RelaxNG spec and a 
+	  DocBook example to the regression tests
+
 Wed Mar 19 11:34:10 CET 2003 Daniel Veillard <daniel@veillard.com>
 
 	* check-xsddata-test-suite.py: cosmetic change for output
diff --git a/relaxng.c b/relaxng.c
index 4077903..beb11bb 100644
--- a/relaxng.c
+++ b/relaxng.c
@@ -6,7 +6,6 @@
  * Daniel Veillard <veillard@redhat.com>
  */
 
-#define FS
 /**
  * TODO:
  * - error reporting
@@ -131,6 +130,7 @@
 #define IS_NULLABLE		1
 #define IS_NOT_NULLABLE		2
 #define IS_INDETERMINIST	4
+#define IS_MIXED		8
 
 struct _xmlRelaxNGDefine {
     xmlRelaxNGType type;	/* the type of definition */
@@ -228,6 +228,7 @@
 
 #define FLAGS_IGNORABLE		1
 #define FLAGS_NEGATIVE		2
+#define FLAGS_MIXED_CONTENT	4
 
 /**
  * xmlRelaxNGInterleaveGroup:
@@ -795,7 +796,6 @@
 {
     xmlRelaxNGStatesPtr ret;
 
-#ifdef FS
     if ((ctxt != NULL) &&
 	(ctxt->freeState != NULL) && 
 	(ctxt->freeStatesNr > 0)) {
@@ -804,7 +804,6 @@
 	ret->nbState = 0;
 	return(ret);
     }
-#endif
     if (size < 16) size = 16;
 
     ret = (xmlRelaxNGStatesPtr) xmlMalloc(sizeof(xmlRelaxNGStates) +
@@ -922,7 +921,6 @@
 {
     if (states == NULL)
 	return;
-#ifdef FS
     if ((ctxt != NULL) && (ctxt->freeStates == NULL)) {
 	ctxt->freeStatesMax = 40;
 	ctxt->freeStatesNr = 0;
@@ -953,10 +951,6 @@
     } else {
 	ctxt->freeStates[ctxt->freeStatesNr++] = states;
     }
-#else
-	xmlFree(states->tabState);
-	xmlFree(states);
-#endif
 }
 
 /**
@@ -1555,7 +1549,7 @@
             return (0);
         }
     }
-    if ((ctxt->err != NULL) &&
+    if ((ctxt->err != NULL) && (ctxt->state != NULL) &&
 	(ctxt->err->node == ctxt->state->node) &&
 	(ctxt->err->err == err))
 	return(ctxt->errNr);
@@ -1601,9 +1595,11 @@
         ctxt->err = NULL;
     cur = &ctxt->errTab[ctxt->errNr];
     if (cur->flags & ERROR_IS_DUP) {
-	xmlFree((xmlChar *)cur->arg1);
+	if (cur->arg1 != NULL)
+	    xmlFree((xmlChar *)cur->arg1);
 	cur->arg1 = NULL;
-	xmlFree((xmlChar *)cur->arg2);
+	if (cur->arg2 != NULL)
+	    xmlFree((xmlChar *)cur->arg2);
 	cur->arg2 = NULL;
 	cur->flags = 0;
     }
@@ -2625,10 +2621,7 @@
 	      xmlRelaxNGDefinePtr define, xmlNodePtr elem);
 
 
-#define IS_BLANK_NODE(n)						\
-    ((((n)->type == XML_TEXT_NODE) ||					\
-      ((n)->type == XML_CDATA_SECTION_NODE)) &&				\
-     (xmlRelaxNGIsBlank((n)->content)))
+#define IS_BLANK_NODE(n) (xmlRelaxNGIsBlank((n)->content))
 
 /**
  * xmlRelaxNGIsNullable:
@@ -3455,6 +3448,7 @@
     int i,j,ret;
     int nbgroups = 0;
     int nbchild = 0;
+    int is_mixed = 0;
 
     /*
      * Don't run that check in case of error. Infinite recursion
@@ -3487,6 +3481,8 @@
 	    xmlMalloc(sizeof(xmlRelaxNGInterleaveGroup));
 	if (groups[nbgroups] == NULL)
 	    goto error;
+	if (cur->type == XML_RELAXNG_TEXT)
+	    is_mixed++;
 	groups[nbgroups]->rule = cur;
 	groups[nbgroups]->defs = xmlRelaxNGGetElements(ctxt, cur, 0);
 	groups[nbgroups]->attrs = xmlRelaxNGGetElements(ctxt, cur, 1);
@@ -3534,6 +3530,8 @@
      * and save the partition list back in the def
      */
     def->data = partitions;
+    if (is_mixed != 0)
+	def->flags |= IS_MIXED;
     return;
 
 error:
@@ -6836,7 +6834,8 @@
 	    (node->type == XML_PI_NODE) ||
 	    (((node->type == XML_TEXT_NODE) || 
 	      (node->type == XML_CDATA_SECTION_NODE)) &&
-	     (IS_BLANK_NODE(node))))) {
+	     ((ctxt->flags & FLAGS_MIXED_CONTENT) ||
+	     (IS_BLANK_NODE(node)))))) {
 	node = node->next;
     }
     return(node);
@@ -7529,6 +7528,7 @@
 	                     xmlRelaxNGDefinePtr define) {
     int ret = 0, i, nbgroups, left;
     int errNr = ctxt->errNr;
+    int oldflags;
 
     xmlRelaxNGValidStatePtr oldstate;
     xmlRelaxNGPartitionPtr partitions;
@@ -7544,6 +7544,34 @@
 	VALID_ERR(XML_RELAXNG_ERR_INTERNODATA);
 	return(-1);
     }
+    /*
+     * Optimizations for MIXED
+     */
+    oldflags = ctxt->flags;
+    if (define->flags & IS_MIXED) {
+	ctxt->flags |= FLAGS_MIXED_CONTENT;
+	if (nbgroups == 2) {
+	    /*
+	     * this is a pure <mixed> case
+	     */
+	    if (ctxt->state != NULL)
+		ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt,
+			                                 ctxt->state->seq);
+	    if (partitions->groups[0]->rule->type == XML_RELAXNG_TEXT)
+		ret = xmlRelaxNGValidateDefinition(ctxt, 
+			           partitions->groups[1]->rule);
+	    else
+		ret = xmlRelaxNGValidateDefinition(ctxt, 
+			           partitions->groups[0]->rule);
+	    if (ret == 0) {
+		if (ctxt->state != NULL)
+		    ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt,
+			                                 ctxt->state->seq);
+	    }
+	    ctxt->flags = oldflags;
+	    return(ret);
+	}
+    }
 
     /*
      * Build arrays to store the first and last node of the chain
@@ -7673,6 +7701,7 @@
     }
 
 done:
+    ctxt->flags = oldflags;
     /*
      * builds the next links chain from the prev one
      */
@@ -7942,6 +7971,14 @@
 	     */
 	    if (node->_private == define) {
 		ctxt->state->seq = xmlRelaxNGSkipIgnored(ctxt, node->next);
+		if (ctxt->errNr != 0) {
+		    while ((ctxt->err != NULL) &&
+			   (((ctxt->err->err == XML_RELAXNG_ERR_ELEMNAME) &&
+			     (xmlStrEqual(ctxt->err->arg2, node->name))) ||
+			    (ctxt->err->err == XML_RELAXNG_ERR_NOELEM) ||
+			    (ctxt->err->err == XML_RELAXNG_ERR_NOTELEM)))
+			xmlRelaxNGValidErrorPop(ctxt);
+		}
 		break;
 	    }
 
@@ -7963,6 +8000,10 @@
 	    }
 	    errNr = ctxt->errNr;
 	    
+	    oldflags = ctxt->flags;
+	    if (ctxt->flags & FLAGS_MIXED_CONTENT) {
+		ctxt->flags -= FLAGS_MIXED_CONTENT;
+	    }
 	    state = xmlRelaxNGNewValidState(ctxt, node);
 	    if (state == NULL) {
 		ret = -1;
@@ -7990,7 +8031,6 @@
 	    if (ctxt->states != NULL) {
 		tmp = -1;
 
-		oldflags = ctxt->flags;
 		ctxt->flags |= FLAGS_IGNORABLE;
 
 		for (i = 0;i < ctxt->states->nbState;i++) {
@@ -8012,6 +8052,7 @@
 		    ret = xmlRelaxNGValidateElementEnd(ctxt);
 		xmlRelaxNGFreeValidState(ctxt,state);
 	    }
+	    ctxt->flags = oldflags;
 	    ctxt->state = oldstate;
 	    if (oldstate != NULL)
 		oldstate->seq = xmlRelaxNGSkipIgnored(ctxt, node->next);
@@ -8695,14 +8736,12 @@
 	}
 	xmlRelaxNGFreeStates(NULL, ctxt->freeState);
     }
-#ifdef FS
     if (ctxt->freeStates != NULL) {
 	for (k = 0;k < ctxt->freeStatesNr;k++) {
 	    xmlRelaxNGFreeStates(NULL, ctxt->freeStates[k]);
 	}
 	xmlFree(ctxt->freeStates);
     }
-#endif
     if (ctxt->errTab != NULL)
 	xmlFree(ctxt->errTab);
     xmlFree(ctxt);
diff --git a/result/relaxng/docbook_0 b/result/relaxng/docbook_0
new file mode 100644
index 0000000..98d1971
--- /dev/null
+++ b/result/relaxng/docbook_0
@@ -0,0 +1 @@
+./test/relaxng/docbook_0.xml validates
diff --git a/result/relaxng/docbook_0.err b/result/relaxng/docbook_0.err
new file mode 100644
index 0000000..a934dec
--- /dev/null
+++ b/result/relaxng/docbook_0.err
@@ -0,0 +1,4 @@
+./test/relaxng/docbook_0.xml:1864: error: Entity 'copy' not defined
+             <sgmltag>&amp;copy;</sgmltag> &mdash; copyright sign (&copy;)
+                                                                         ^
+Unimplemented block at xmlschemastypes.c:1636
diff --git a/result/relaxng/docbook_err b/result/relaxng/docbook_err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/docbook_err
diff --git a/result/relaxng/docbook_valid b/result/relaxng/docbook_valid
new file mode 100644
index 0000000..8124012
--- /dev/null
+++ b/result/relaxng/docbook_valid
@@ -0,0 +1 @@
+./test/relaxng/docbook.rng validates
diff --git a/result/relaxng/spec_0 b/result/relaxng/spec_0
new file mode 100644
index 0000000..df30e8a
--- /dev/null
+++ b/result/relaxng/spec_0
@@ -0,0 +1 @@
+./test/relaxng/spec_0.xml validates
diff --git a/result/relaxng/spec_0.err b/result/relaxng/spec_0.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/spec_0.err
diff --git a/result/relaxng/spec_err b/result/relaxng/spec_err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/spec_err
diff --git a/result/relaxng/spec_valid b/result/relaxng/spec_valid
new file mode 100644
index 0000000..27336e1
--- /dev/null
+++ b/result/relaxng/spec_valid
@@ -0,0 +1 @@
+./test/relaxng/spec.rng validates
diff --git a/result/relaxng/tutor8_1_2 b/result/relaxng/tutor8_1_2
new file mode 100644
index 0000000..11c1611
--- /dev/null
+++ b/result/relaxng/tutor8_1_2
@@ -0,0 +1 @@
+./test/relaxng/tutor8_1_2.xml validates
diff --git a/result/relaxng/tutor8_1_2.err b/result/relaxng/tutor8_1_2.err
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/result/relaxng/tutor8_1_2.err
diff --git a/test/relaxng/docbook.rng b/test/relaxng/docbook.rng
new file mode 100644
index 0000000..85a6aed
--- /dev/null
+++ b/test/relaxng/docbook.rng
@@ -0,0 +1,9141 @@
+<?xml version="1.0" encoding="utf-8"?>

+<!-- $Id: docbook.rng,v 1.5 2001/10/23 05:56:47 jjc Exp $ -->

+<grammar xmlns="http://relaxng.org/ns/structure/1.0"

+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">

+   <start>

+      <choice>

+         <ref name="set"/>

+         <ref name="book"/>

+         <ref name="chapter"/>

+         <ref name="appendix"/>

+         <ref name="article"/>

+         <ref name="part"/>

+         <ref name="reference"/>

+         <ref name="refentry"/>

+         <ref name="section"/>

+         <ref name="sect1"/>

+         <ref name="sect2"/>

+         <ref name="sect3"/>

+         <ref name="sect4"/>

+         <ref name="sect5"/>

+         <ref name="para"/>

+      </choice>

+   </start>

+   <define name="ndxterm.class">

+      <ref name="indexterm"/>

+   </define>

+   <define name="list.class">

+      <choice>

+         <ref name="calloutlist"/>

+         <ref name="glosslist"/>

+         <ref name="itemizedlist"/>

+         <ref name="orderedlist"/>

+         <ref name="segmentedlist"/>

+         <ref name="simplelist"/>

+         <ref name="variablelist"/>

+      </choice>

+   </define>

+   <define name="admon.class">

+      <choice>

+         <ref name="caution"/>

+         <ref name="important"/>

+         <ref name="note"/>

+         <ref name="tip"/>

+         <ref name="warning"/>

+      </choice>

+   </define>

+   <define name="linespecific.class">

+      <choice>

+         <ref name="literallayout"/>

+         <ref name="programlisting"/>

+         <ref name="programlistingco"/>

+         <ref name="screen"/>

+         <ref name="screenco"/>

+         <ref name="screenshot"/>

+      </choice>

+   </define>

+   <define name="method.synop.class">

+      <choice>

+         <ref name="constructorsynopsis"/>

+         <ref name="destructorsynopsis"/>

+         <ref name="methodsynopsis"/>

+      </choice>

+   </define>

+   <define name="synop.class">

+      <choice>

+         <ref name="synopsis"/>

+         <ref name="cmdsynopsis"/>

+         <ref name="funcsynopsis"/>

+         <ref name="classsynopsis"/>

+         <ref name="fieldsynopsis"/>

+      </choice>

+   </define>

+   <define name="para.class">

+      <choice>

+         <ref name="formalpara"/>

+         <ref name="para"/>

+         <ref name="simpara"/>

+      </choice>

+   </define>

+   <define name="informal.class">

+      <choice>

+         <ref name="address"/>

+         <ref name="blockquote"/>

+         <ref name="graphic"/>

+         <ref name="graphicco"/>

+         <ref name="mediaobject"/>

+         <ref name="mediaobjectco"/>

+         <ref name="informalequation"/>

+         <ref name="informalexample"/>

+         <ref name="informalfigure"/>

+         <ref name="informaltable"/>

+      </choice>

+   </define>

+   <define name="formal.class">

+      <choice>

+         <ref name="equation"/>

+         <ref name="example"/>

+         <ref name="figure"/>

+         <ref name="table"/>

+      </choice>

+   </define>

+   <define name="compound.class">

+      <choice>

+         <ref name="msgset"/>

+         <ref name="procedure"/>

+         <ref name="sidebar"/>

+         <ref name="qandaset"/>

+      </choice>

+   </define>

+   <define name="genobj.class">

+      <choice>

+         <ref name="anchor"/>

+         <ref name="bridgehead"/>

+         <ref name="remark"/>

+         <ref name="highlights"/>

+      </choice>

+   </define>

+   <define name="descobj.class">

+      <choice>

+         <ref name="abstract"/>

+         <ref name="authorblurb"/>

+         <ref name="epigraph"/>

+      </choice>

+   </define>

+   <define name="xref.char.class">

+      <choice>

+         <ref name="footnoteref"/>

+         <ref name="xref"/>

+      </choice>

+   </define>

+   <define name="gen.char.class">

+      <choice>

+         <ref name="abbrev"/>

+         <ref name="acronym"/>

+         <ref name="citation"/>

+         <ref name="citerefentry"/>

+         <ref name="citetitle"/>

+         <ref name="emphasis"/>

+         <ref name="firstterm"/>

+         <ref name="foreignphrase"/>

+         <ref name="glossterm"/>

+         <ref name="footnote"/>

+         <ref name="phrase"/>

+         <ref name="quote"/>

+         <ref name="trademark"/>

+         <ref name="wordasword"/>

+      </choice>

+   </define>

+   <define name="link.char.class">

+      <choice>

+         <ref name="link"/>

+         <ref name="olink"/>

+         <ref name="ulink"/>

+      </choice>

+   </define>

+   <define name="tech.char.class">

+      <choice>

+         <ref name="action"/>

+         <ref name="application"/>

+         <ref name="classname"/>

+         <ref name="methodname"/>

+         <ref name="interfacename"/>

+         <ref name="exceptionname"/>

+         <ref name="ooclass"/>

+         <ref name="oointerface"/>

+         <ref name="ooexception"/>

+         <ref name="command"/>

+         <ref name="computeroutput"/>

+         <ref name="database"/>

+         <ref name="email"/>

+         <ref name="envar"/>

+         <ref name="errorcode"/>

+         <ref name="errorname"/>

+         <ref name="errortype"/>

+         <ref name="filename"/>

+         <ref name="function"/>

+         <ref name="guibutton"/>

+         <ref name="guiicon"/>

+         <ref name="guilabel"/>

+         <ref name="guimenu"/>

+         <ref name="guimenuitem"/>

+         <ref name="guisubmenu"/>

+         <ref name="hardware"/>

+         <ref name="interface"/>

+         <ref name="keycap"/>

+         <ref name="keycode"/>

+         <ref name="keycombo"/>

+         <ref name="keysym"/>

+         <ref name="literal"/>

+         <ref name="constant"/>

+         <ref name="markup"/>

+         <ref name="medialabel"/>

+         <ref name="menuchoice"/>

+         <ref name="mousebutton"/>

+         <ref name="option"/>

+         <ref name="optional"/>

+         <ref name="parameter"/>

+         <ref name="prompt"/>

+         <ref name="property"/>

+         <ref name="replaceable"/>

+         <ref name="returnvalue"/>

+         <ref name="sgmltag"/>

+         <ref name="structfield"/>

+         <ref name="structname"/>

+         <ref name="symbol"/>

+         <ref name="systemitem"/>

+         <ref name="token"/>

+         <ref name="type"/>

+         <ref name="userinput"/>

+         <ref name="varname"/>

+      </choice>

+   </define>

+   <define name="base.char.class">

+      <ref name="anchor"/>

+   </define>

+   <define name="docinfo.char.class">

+      <choice>

+         <ref name="author"/>

+         <ref name="authorinitials"/>

+         <ref name="corpauthor"/>

+         <ref name="modespec"/>

+         <ref name="othercredit"/>

+         <ref name="productname"/>

+         <ref name="productnumber"/>

+         <ref name="revhistory"/>

+      </choice>

+   </define>

+   <define name="other.char.class">

+      <choice>

+         <ref name="remark"/>

+         <ref name="subscript"/>

+         <ref name="superscript"/>

+      </choice>

+   </define>

+   <define name="inlineobj.char.class">

+      <choice>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+         <ref name="inlineequation"/>

+      </choice>

+   </define>

+   <define name="component.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="compound.class"/>

+         <ref name="genobj.class"/>

+         <ref name="descobj.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="sidebar.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="procedure"/>

+         <ref name="genobj.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="qandaset.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="procedure"/>

+         <ref name="genobj.class"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="revdescription.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="procedure"/>

+         <ref name="genobj.class"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="footnote.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+      </choice>

+   </define>

+   <define name="example.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="highlights.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="para.class"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="para.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+      </choice>

+   </define>

+   <define name="admon.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="procedure"/>

+         <ref name="sidebar"/>

+         <ref name="anchor"/>

+         <ref name="bridgehead"/>

+         <ref name="remark"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="figure.mix">

+      <choice>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="informal.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="tabentry.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="para.class"/>

+         <ref name="graphic"/>

+         <ref name="mediaobject"/>

+      </choice>

+   </define>

+   <define name="glossdef.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="remark"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="legalnotice.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="para.class"/>

+         <ref name="blockquote"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="textobject.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="para.class"/>

+         <ref name="blockquote"/>

+      </choice>

+   </define>

+   <define name="mediaobject.mix">

+      <choice>

+         <ref name="videoobject"/>

+         <ref name="audioobject"/>

+         <ref name="imageobject"/>

+      </choice>

+   </define>

+   <define name="para.char.mix">

+      <choice>

+         <ref name="xref.char.class"/>

+         <ref name="gen.char.class"/>

+         <ref name="link.char.class"/>

+         <ref name="tech.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="docinfo.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="inlineobj.char.class"/>

+         <ref name="synop.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="title.char.mix">

+      <choice>

+         <ref name="xref.char.class"/>

+         <ref name="gen.char.class"/>

+         <ref name="link.char.class"/>

+         <ref name="tech.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="docinfo.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="inlineobj.char.class"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="ndxterm.char.mix">

+      <choice>

+         <ref name="xref.char.class"/>

+         <ref name="gen.char.class"/>

+         <ref name="link.char.class"/>

+         <ref name="tech.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="docinfo.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+      </choice>

+   </define>

+   <define name="cptr.char.mix">

+      <choice>

+         <ref name="link.char.class"/>

+         <ref name="tech.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="smallcptr.char.mix">

+      <choice>

+         <ref name="replaceable"/>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="word.char.mix">

+      <choice>

+         <ref name="acronym"/>

+         <ref name="emphasis"/>

+         <ref name="trademark"/>

+         <ref name="link.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="docinfo.char.mix">

+      <choice>

+         <ref name="link.char.class"/>

+         <ref name="emphasis"/>

+         <ref name="trademark"/>

+         <ref name="replaceable"/>

+         <ref name="other.char.class"/>

+         <ref name="inlinegraphic"/>

+         <ref name="inlinemediaobject"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="formalobject.title.content">

+      <ref name="title"/>

+      <optional>

+         <ref name="titleabbrev"/>

+      </optional>

+   </define>

+   <define name="arch.attrib">

+      <optional>

+         <attribute name="arch">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="condition.attrib">

+      <optional>

+         <attribute name="condition">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="conformance.attrib">

+      <optional>

+         <attribute name="conformance">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="os.attrib">

+      <optional>

+         <attribute name="os">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="revision.attrib">

+      <optional>

+         <attribute name="revision">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="security.attrib">

+      <optional>

+         <attribute name="security">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="userlevel.attrib">

+      <optional>

+         <attribute name="userlevel">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="vendor.attrib">

+      <optional>

+         <attribute name="vendor">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="effectivity.attrib">

+      <ref name="arch.attrib"/>

+      <ref name="condition.attrib"/>

+      <ref name="conformance.attrib"/>

+      <ref name="os.attrib"/>

+      <ref name="revision.attrib"/>

+      <ref name="security.attrib"/>

+      <ref name="userlevel.attrib"/>

+      <ref name="vendor.attrib"/>

+   </define>

+   <define name="id.attrib">

+      <optional>

+         <attribute name="id">

+            <data type="ID"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="idreq.attrib">

+      <attribute name="id">

+         <data type="ID"/>

+      </attribute>

+   </define>

+   <define name="lang.attrib">

+      <optional>

+         <attribute name="lang">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="remap.attrib">

+      <optional>

+         <attribute name="remap">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="role.attrib">

+      <optional>

+         <attribute name="role">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="xreflabel.attrib">

+      <optional>

+         <attribute name="xreflabel">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="revisionflag.attrib">

+      <optional>

+         <attribute name="revisionflag">

+            <choice>

+               <value>changed</value>

+               <value>added</value>

+               <value>deleted</value>

+               <value>off</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="common.attrib">

+      <ref name="id.attrib"/>

+      <ref name="lang.attrib"/>

+      <ref name="remap.attrib"/>

+      <ref name="xreflabel.attrib"/>

+      <ref name="revisionflag.attrib"/>

+      <ref name="effectivity.attrib"/>

+   </define>

+   <define name="idreq.common.attrib">

+      <ref name="idreq.attrib"/>

+      <ref name="lang.attrib"/>

+      <ref name="remap.attrib"/>

+      <ref name="xreflabel.attrib"/>

+      <ref name="revisionflag.attrib"/>

+      <ref name="effectivity.attrib"/>

+   </define>

+   <define name="graphics.attrib">

+      <optional>

+         <attribute name="fileref">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="format">

+            <choice>

+               <value>BMP</value>

+               <value>CGM-CHAR</value>

+               <value>CGM-BINARY</value>

+               <value>CGM-CLEAR</value>

+               <value>DITROFF</value>

+               <value>DVI</value>

+               <value>EPS</value>

+               <value>EQN</value>

+               <value>FAX</value>

+               <value>GIF</value>

+               <value>GIF87a</value>

+               <value>GIF89a</value>

+               <value>JPG</value>

+               <value>JPEG</value>

+               <value>IGES</value>

+               <value>PCX</value>

+               <value>PIC</value>

+               <value>PNG</value>

+               <value>PS</value>

+               <value>SGML</value>

+               <value>TBL</value>

+               <value>TEX</value>

+               <value>TIFF</value>

+               <value>WMF</value>

+               <value>WPG</value>

+               <value>linespecific</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="srccredit">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="width">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="depth">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scale">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scalefit">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="keyaction.attrib">

+      <optional>

+         <attribute name="action">

+            <choice>

+               <value>click</value>

+               <value>double-click</value>

+               <value>press</value>

+               <value>seq</value>

+               <value>simul</value>

+               <value>other</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="otheraction">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="label.attrib">

+      <optional>

+         <attribute name="label">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="linespecific.attrib">

+      <optional>

+         <attribute name="format">

+            <value>linespecific</value>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="linenumbering">

+            <choice>

+               <value>numbered</value>

+               <value>unnumbered</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="linkend.attrib">

+      <optional>

+         <attribute name="linkend">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="linkendreq.attrib">

+      <attribute name="linkend">

+         <data type="IDREF"/>

+      </attribute>

+   </define>

+   <define name="linkends.attrib">

+      <optional>

+         <attribute name="linkends">

+            <data type="IDREFS"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="mark.attrib">

+      <optional>

+         <attribute name="mark">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="moreinfo.attrib">

+      <optional>

+         <attribute name="moreinfo">

+            <choice>

+               <value>refentry</value>

+               <value>none</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="pagenum.attrib">

+      <optional>

+         <attribute name="pagenum">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="status.attrib">

+      <optional>

+         <attribute name="status">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="width.attrib">

+      <optional>

+         <attribute name="width">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="title.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="title">

+      <element name="title">

+         <ref name="title.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="title.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="title.attlist">

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="title.role.attrib"/>

+   </define>

+   <define name="titleabbrev.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="titleabbrev">

+      <element name="titleabbrev">

+         <ref name="titleabbrev.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="title.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="titleabbrev.attlist">

+      <ref name="common.attrib"/>

+      <ref name="titleabbrev.role.attrib"/>

+   </define>

+   <define name="subtitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="subtitle">

+      <element name="subtitle">

+         <ref name="subtitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="title.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="subtitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="subtitle.role.attrib"/>

+   </define>

+   <define name="person.ident.mix">

+      <choice>

+         <ref name="honorific"/>

+         <ref name="firstname"/>

+         <ref name="surname"/>

+         <ref name="lineage"/>

+         <ref name="othername"/>

+         <ref name="affiliation"/>

+         <ref name="authorblurb"/>

+         <ref name="contrib"/>

+      </choice>

+   </define>

+   <define name="bibliocomponent.mix">

+      <choice>

+         <ref name="abbrev"/>

+         <ref name="abstract"/>

+         <ref name="address"/>

+         <ref name="artpagenums"/>

+         <ref name="author"/>

+         <ref name="authorgroup"/>

+         <ref name="authorinitials"/>

+         <ref name="bibliomisc"/>

+         <ref name="biblioset"/>

+         <ref name="collab"/>

+         <ref name="confgroup"/>

+         <ref name="contractnum"/>

+         <ref name="contractsponsor"/>

+         <ref name="copyright"/>

+         <ref name="corpauthor"/>

+         <ref name="corpname"/>

+         <ref name="date"/>

+         <ref name="edition"/>

+         <ref name="editor"/>

+         <ref name="invpartnumber"/>

+         <ref name="isbn"/>

+         <ref name="issn"/>

+         <ref name="issuenum"/>

+         <ref name="orgname"/>

+         <ref name="othercredit"/>

+         <ref name="pagenums"/>

+         <ref name="printhistory"/>

+         <ref name="productname"/>

+         <ref name="productnumber"/>

+         <ref name="pubdate"/>

+         <ref name="publisher"/>

+         <ref name="publishername"/>

+         <ref name="pubsnumber"/>

+         <ref name="releaseinfo"/>

+         <ref name="revhistory"/>

+         <ref name="seriesvolnums"/>

+         <ref name="subtitle"/>

+         <ref name="title"/>

+         <ref name="titleabbrev"/>

+         <ref name="volumenum"/>

+         <ref name="citetitle"/>

+         <ref name="person.ident.mix"/>

+         <ref name="ndxterm.class"/>

+      </choice>

+   </define>

+   <define name="biblioentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="biblioentry">

+      <element name="biblioentry">

+         <ref name="biblioentry.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="articleinfo"/>

+               <ref name="bibliocomponent.mix"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="biblioentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="biblioentry.role.attrib"/>

+   </define>

+   <define name="bibliomixed.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliomixed">

+      <element name="bibliomixed">

+         <ref name="bibliomixed.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="bibliocomponent.mix"/>

+                  <ref name="bibliomset"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="bibliomixed.attlist">

+      <ref name="common.attrib"/>

+      <ref name="bibliomixed.role.attrib"/>

+   </define>

+   <define name="articleinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="infoContentModel">

+      <oneOrMore>

+         <choice>

+            <ref name="graphic"/>

+            <ref name="mediaobject"/>

+            <ref name="legalnotice"/>

+            <ref name="modespec"/>

+            <ref name="subjectset"/>

+            <ref name="keywordset"/>

+            <ref name="itermset"/>

+            <ref name="bibliocomponent.mix"/>

+         </choice>

+      </oneOrMore>

+   </define>

+   <define name="articleinfo">

+      <element name="articleinfo">

+         <ref name="articleinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="articleinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="articleinfo.role.attrib"/>

+   </define>

+   <define name="biblioset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="biblioset">

+      <element name="biblioset">

+         <ref name="biblioset.attlist"/>

+         <oneOrMore>

+            <ref name="bibliocomponent.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="biblioset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="biblioset.role.attrib"/>

+      <optional>

+         <attribute name="relation">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="bibliomset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliomset">

+      <element name="bibliomset">

+         <ref name="bibliomset.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="bibliocomponent.mix"/>

+                  <ref name="bibliomset"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="bibliomset.attlist">

+      <ref name="bibliomset.role.attrib"/>

+      <ref name="common.attrib"/>

+      <optional>

+         <attribute name="relation">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="bibliomisc.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliomisc">

+      <element name="bibliomisc">

+         <ref name="bibliomisc.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="bibliomisc.attlist">

+      <ref name="common.attrib"/>

+      <ref name="bibliomisc.role.attrib"/>

+   </define>

+   <define name="subjectset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="subjectset">

+      <element name="subjectset">

+         <ref name="subjectset.attlist"/>

+         <oneOrMore>

+            <ref name="subject"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="subjectset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="subjectset.role.attrib"/>

+      <optional>

+         <attribute name="scheme">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="subject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="subject">

+      <element name="subject">

+         <ref name="subject.attlist"/>

+         <oneOrMore>

+            <ref name="subjectterm"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="subject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="subject.role.attrib"/>

+      <optional>

+         <attribute name="weight">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="subjectterm.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="subjectterm">

+      <element name="subjectterm">

+         <ref name="subjectterm.attlist"/>

+         <text/>

+      </element>

+   </define>

+   <define name="subjectterm.attlist">

+      <ref name="common.attrib"/>

+      <ref name="subjectterm.role.attrib"/>

+   </define>

+   <define name="keywordset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keywordset">

+      <element name="keywordset">

+         <ref name="keywordset.attlist"/>

+         <oneOrMore>

+            <ref name="keyword"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="keywordset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="keywordset.role.attrib"/>

+   </define>

+   <define name="keyword.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keyword">

+      <element name="keyword">

+         <ref name="keyword.attlist"/>

+         <text/>

+      </element>

+   </define>

+   <define name="keyword.attlist">

+      <ref name="common.attrib"/>

+      <ref name="keyword.role.attrib"/>

+   </define>

+   <define name="itermset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="itermset">

+      <element name="itermset">

+         <ref name="itermset.attlist"/>

+         <oneOrMore>

+            <ref name="indexterm"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="itermset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="itermset.role.attrib"/>

+   </define>

+   <define name="msgset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgset">

+      <element name="msgset">

+         <ref name="msgset.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <choice>

+            <oneOrMore>

+               <ref name="msgentry"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="simplemsgentry"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="msgset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgset.role.attrib"/>

+   </define>

+   <define name="msgentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgentry">

+      <element name="msgentry">

+         <ref name="msgentry.attlist"/>

+         <oneOrMore>

+            <ref name="msg"/>

+         </oneOrMore>

+         <optional>

+            <ref name="msginfo"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="msgexplan"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="msgentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgentry.role.attrib"/>

+   </define>

+   <define name="simplemsgentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="simplemsgentry">

+      <element name="simplemsgentry">

+         <ref name="simplemsgentry.attlist"/>

+         <ref name="msgtext"/>

+         <ref name="msgexplan"/>

+      </element>

+   </define>

+   <define name="simplemsgentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="simplemsgentry.role.attrib"/>

+      <optional>

+         <attribute name="audience">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="level">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="origin">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="msg.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msg">

+      <element name="msg">

+         <ref name="msg.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <ref name="msgmain"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="msgsub"/>

+               <ref name="msgrel"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="msg.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msg.role.attrib"/>

+   </define>

+   <define name="msgmain.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgmain">

+      <element name="msgmain">

+         <ref name="msgmain.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <ref name="msgtext"/>

+      </element>

+   </define>

+   <define name="msgmain.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgmain.role.attrib"/>

+   </define>

+   <define name="msgsub.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgsub">

+      <element name="msgsub">

+         <ref name="msgsub.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <ref name="msgtext"/>

+      </element>

+   </define>

+   <define name="msgsub.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgsub.role.attrib"/>

+   </define>

+   <define name="msgrel.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgrel">

+      <element name="msgrel">

+         <ref name="msgrel.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <ref name="msgtext"/>

+      </element>

+   </define>

+   <define name="msgrel.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgrel.role.attrib"/>

+   </define>

+   <define name="msginfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msginfo">

+      <element name="msginfo">

+         <ref name="msginfo.attlist"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="msglevel"/>

+               <ref name="msgorig"/>

+               <ref name="msgaud"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="msginfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msginfo.role.attrib"/>

+   </define>

+   <define name="msglevel.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msglevel">

+      <element name="msglevel">

+         <ref name="msglevel.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="msglevel.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msglevel.role.attrib"/>

+   </define>

+   <define name="msgorig.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgorig">

+      <element name="msgorig">

+         <ref name="msgorig.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="msgorig.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgorig.role.attrib"/>

+   </define>

+   <define name="msgaud.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgaud">

+      <element name="msgaud">

+         <ref name="msgaud.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="msgaud.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgaud.role.attrib"/>

+   </define>

+   <define name="msgexplan.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgexplan">

+      <element name="msgexplan">

+         <ref name="msgexplan.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="msgexplan.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgexplan.role.attrib"/>

+   </define>

+   <define name="qandset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="qandaset">

+      <element name="qandaset">

+         <ref name="qandaset.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="qandaset.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="qandadiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="qandaentry"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="qandaset.attlist">

+      <ref name="common.attrib"/>

+      <ref name="qandset.role.attrib"/>

+      <optional>

+         <attribute name="defaultlabel">

+            <choice>

+               <value>qanda</value>

+               <value>number</value>

+               <value>none</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="qandadiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="qandadiv">

+      <element name="qandadiv">

+         <ref name="qandadiv.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="qandaset.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="qandadiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="qandaentry"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="qandadiv.attlist">

+      <ref name="common.attrib"/>

+      <ref name="qandadiv.role.attrib"/>

+   </define>

+   <define name="qandaentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="qandaentry">

+      <element name="qandaentry">

+         <ref name="qandaentry.attlist"/>

+         <optional>

+            <ref name="revhistory"/>

+         </optional>

+         <ref name="question"/>

+         <zeroOrMore>

+            <ref name="answer"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="qandaentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="qandaentry.role.attrib"/>

+   </define>

+   <define name="question.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="question">

+      <element name="question">

+         <ref name="question.attlist"/>

+         <optional>

+            <ref name="label"/>

+         </optional>

+         <oneOrMore>

+            <ref name="qandaset.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="question.attlist">

+      <ref name="common.attrib"/>

+      <ref name="question.role.attrib"/>

+   </define>

+   <define name="answer.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="answer">

+      <element name="answer">

+         <ref name="answer.attlist"/>

+         <optional>

+            <ref name="label"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="qandaset.mix"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="qandaentry"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="answer.attlist">

+      <ref name="common.attrib"/>

+      <ref name="answer.role.attrib"/>

+   </define>

+   <define name="label.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="label">

+      <element name="label">

+         <ref name="label.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="label.attlist">

+      <ref name="common.attrib"/>

+      <ref name="label.role.attrib"/>

+   </define>

+   <define name="procedure.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="procedure">

+      <element name="procedure">

+         <ref name="procedure.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <oneOrMore>

+            <ref name="step"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="procedure.attlist">

+      <ref name="common.attrib"/>

+      <ref name="procedure.role.attrib"/>

+   </define>

+   <define name="step.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="step">

+      <element name="step">

+         <ref name="step.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="component.mix"/>

+               </oneOrMore>

+               <optional>

+                  <ref name="substeps"/>

+                  <zeroOrMore>

+                     <ref name="component.mix"/>

+                  </zeroOrMore>

+               </optional>

+            </group>

+            <group>

+               <ref name="substeps"/>

+               <zeroOrMore>

+                  <ref name="component.mix"/>

+               </zeroOrMore>

+            </group>

+         </choice>

+      </element>

+   </define>

+   <define name="step.attlist">

+      <ref name="common.attrib"/>

+      <ref name="step.role.attrib"/>

+      <optional>

+         <attribute name="performance">

+            <choice>

+               <value>optional</value>

+               <value>required</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="substeps.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="substeps">

+      <element name="substeps">

+         <ref name="substeps.attlist"/>

+         <oneOrMore>

+            <ref name="step"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="substeps.attlist">

+      <ref name="common.attrib"/>

+      <ref name="substeps.role.attrib"/>

+      <optional>

+         <attribute name="performance">

+            <choice>

+               <value>optional</value>

+               <value>required</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sidebarinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sidebarinfo">

+      <element name="sidebarinfo">

+         <ref name="sidebarinfo.attlist"/>

+         <text/>

+      </element>

+   </define>

+   <define name="sidebarinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sidebarinfo.role.attrib"/>

+   </define>

+   <define name="sidebar.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sidebar">

+      <element name="sidebar">

+         <ref name="sidebar.attlist"/>

+         <optional>

+            <ref name="sidebarinfo"/>

+         </optional>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="sidebar.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="sidebar.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sidebar.role.attrib"/>

+   </define>

+   <define name="abstract.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="abstract">

+      <element name="abstract">

+         <ref name="abstract.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <oneOrMore>

+            <ref name="para.class"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="abstract.attlist">

+      <ref name="common.attrib"/>

+      <ref name="abstract.role.attrib"/>

+   </define>

+   <define name="authorblurb.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="authorblurb">

+      <element name="authorblurb">

+         <ref name="authorblurb.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <oneOrMore>

+            <ref name="para.class"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="authorblurb.attlist">

+      <ref name="common.attrib"/>

+      <ref name="authorblurb.role.attrib"/>

+   </define>

+   <define name="blockquote.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="blockquote">

+      <element name="blockquote">

+         <ref name="blockquote.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <optional>

+            <ref name="attribution"/>

+         </optional>

+         <oneOrMore>

+            <ref name="component.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="blockquote.attlist">

+      <ref name="common.attrib"/>

+      <ref name="blockquote.role.attrib"/>

+   </define>

+   <define name="attribution.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="attribution">

+      <element name="attribution">

+         <ref name="attribution.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="attribution.attlist">

+      <ref name="common.attrib"/>

+      <ref name="attribution.role.attrib"/>

+   </define>

+   <define name="bridgehead.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bridgehead">

+      <element name="bridgehead">

+         <ref name="bridgehead.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="title.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="bridgehead.attlist">

+      <ref name="common.attrib"/>

+      <ref name="bridgehead.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>other</value>

+               <value>sect1</value>

+               <value>sect2</value>

+               <value>sect3</value>

+               <value>sect4</value>

+               <value>sect5</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="remark.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="remark">

+      <element name="remark">

+         <ref name="remark.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="remark.attlist">

+      <ref name="common.attrib"/>

+      <ref name="remark.role.attrib"/>

+   </define>

+   <define name="epigraph.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="epigraph">

+      <element name="epigraph">

+         <ref name="epigraph.attlist"/>

+         <optional>

+            <ref name="attribution"/>

+         </optional>

+         <oneOrMore>

+            <ref name="para.class"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="epigraph.attlist">

+      <ref name="common.attrib"/>

+      <ref name="epigraph.role.attrib"/>

+   </define>

+   <define name="footnote.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="footnote">

+      <element name="footnote">

+         <ref name="footnote.attlist"/>

+         <oneOrMore>

+            <ref name="footnote.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="footnote.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="footnote.role.attrib"/>

+   </define>

+   <define name="highlights.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="highlights">

+      <element name="highlights">

+         <ref name="highlights.attlist"/>

+         <oneOrMore>

+            <ref name="highlights.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="highlights.attlist">

+      <ref name="common.attrib"/>

+      <ref name="highlights.role.attrib"/>

+   </define>

+   <define name="formalpara.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="formalpara">

+      <element name="formalpara">

+         <ref name="formalpara.attlist"/>

+         <ref name="title"/>

+         <zeroOrMore>

+            <ref name="ndxterm.class"/>

+         </zeroOrMore>

+         <ref name="para"/>

+      </element>

+   </define>

+   <define name="formalpara.attlist">

+      <ref name="common.attrib"/>

+      <ref name="formalpara.role.attrib"/>

+   </define>

+   <define name="para.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="para">

+      <element name="para">

+         <ref name="para.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="para.mix"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="para.attlist">

+      <ref name="common.attrib"/>

+      <ref name="para.role.attrib"/>

+   </define>

+   <define name="simpara.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="simpara">

+      <element name="simpara">

+         <ref name="simpara.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="simpara.attlist">

+      <ref name="common.attrib"/>

+      <ref name="simpara.role.attrib"/>

+   </define>

+   <define name="admon.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="admonitionType">

+      <optional>

+         <ref name="title"/>

+      </optional>

+      <oneOrMore>

+         <ref name="admon.mix"/>

+      </oneOrMore>

+   </define>

+   <define name="important">

+      <element name="important">

+         <ref name="important.attlist"/>

+         <ref name="admonitionType"/>

+      </element>

+   </define>

+   <define name="important.attlist">

+      <ref name="common.attrib"/>

+      <ref name="admon.role.attrib"/>

+   </define>

+   <define name="warning">

+      <element name="warning">

+         <ref name="warning.attlist"/>

+         <ref name="admonitionType"/>

+      </element>

+   </define>

+   <define name="warning.attlist">

+      <ref name="common.attrib"/>

+      <ref name="admon.role.attrib"/>

+   </define>

+   <define name="caution">

+      <element name="caution">

+         <ref name="caution.attlist"/>

+         <ref name="admonitionType"/>

+      </element>

+   </define>

+   <define name="caution.attlist">

+      <ref name="common.attrib"/>

+      <ref name="admon.role.attrib"/>

+   </define>

+   <define name="note">

+      <element name="note">

+         <ref name="note.attlist"/>

+         <ref name="admonitionType"/>

+      </element>

+   </define>

+   <define name="note.attlist">

+      <ref name="common.attrib"/>

+      <ref name="admon.role.attrib"/>

+   </define>

+   <define name="tip">

+      <element name="tip">

+         <ref name="tip.attlist"/>

+         <ref name="admonitionType"/>

+      </element>

+   </define>

+   <define name="tip.attlist">

+      <ref name="common.attrib"/>

+      <ref name="admon.role.attrib"/>

+   </define>

+   <define name="glosslist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glosslist">

+      <element name="glosslist">

+         <ref name="glosslist.attlist"/>

+         <oneOrMore>

+            <ref name="glossentry"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="glosslist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glosslist.role.attrib"/>

+   </define>

+   <define name="glossentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossentry">

+      <element name="glossentry">

+         <ref name="glossentry.attlist"/>

+         <ref name="glossterm"/>

+         <optional>

+            <ref name="acronym"/>

+         </optional>

+         <optional>

+            <ref name="abbrev"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="ndxterm.class"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="revhistory"/>

+         </optional>

+         <choice>

+            <ref name="glosssee"/>

+            <oneOrMore>

+               <ref name="glossdef"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="glossentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glossentry.role.attrib"/>

+      <optional>

+         <attribute name="sortas">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="glossdef.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossdef">

+      <element name="glossdef">

+         <ref name="glossdef.attlist"/>

+         <oneOrMore>

+            <ref name="glossdef.mix"/>

+         </oneOrMore>

+         <oneOrMore>

+            <ref name="glossseealso"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="glossdef.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glossdef.role.attrib"/>

+      <optional>

+         <attribute name="subject">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="glosssee.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glosssee">

+      <element name="glosssee">

+         <ref name="glosssee.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="glosssee.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glosssee.role.attrib"/>

+      <optional>

+         <attribute name="otherterm">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="glossseealso.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossseealso">

+      <element name="glossseealso">

+         <ref name="glossseealso.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="glossseealso.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glossseealso.role.attrib"/>

+      <optional>

+         <attribute name="otherterm">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="itemizedlist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="itemizedlist">

+      <element name="itemizedlist">

+         <ref name="itemizedlist.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="listitem"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="itemizedlist.attlist">

+      <ref name="mark.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="itemizedlist.role.attrib"/>

+      <optional>

+         <attribute name="spacing">

+            <choice>

+               <value>normal</value>

+               <value>compact</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="orderedlist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="orderedlist">

+      <element name="orderedlist">

+         <ref name="orderedlist.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="listitem"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="orderedlist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="orderedlist.role.attrib"/>

+      <optional>

+         <attribute name="numeration">

+            <choice>

+               <value>arabic</value>

+               <value>upperalpha</value>

+               <value>loweralpha</value>

+               <value>upperroman</value>

+               <value>lowerroman</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="inheritnum">

+            <choice>

+               <value>inherit</value>

+               <value>ignore</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="continuation">

+            <choice>

+               <value>continues</value>

+               <value>restarts</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="spacing">

+            <choice>

+               <value>normal</value>

+               <value>compact</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="listitem.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="listitem">

+      <element name="listitem">

+         <ref name="listitem.attlist"/>

+         <oneOrMore>

+            <ref name="component.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="listitem.attlist">

+      <ref name="common.attrib"/>

+      <ref name="listitem.role.attrib"/>

+      <optional>

+         <attribute name="override">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="segmentedlist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="segmentedlist">

+      <element name="segmentedlist">

+         <ref name="segmentedlist.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <ref name="segtitle"/>

+         <zeroOrMore>

+            <ref name="segtitle"/>

+         </zeroOrMore>

+         <oneOrMore>

+            <ref name="seglistitem"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="segmentedlist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="segmentedlist.role.attrib"/>

+   </define>

+   <define name="segtitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="segtitle">

+      <element name="segtitle">

+         <ref name="segtitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="title.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="segtitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="segtitle.role.attrib"/>

+   </define>

+   <define name="seglistitem.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="seglistitem">

+      <element name="seglistitem">

+         <ref name="seglistitem.attlist"/>

+         <ref name="seg"/>

+         <zeroOrMore>

+            <ref name="seg"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="seglistitem.attlist">

+      <ref name="common.attrib"/>

+      <ref name="seglistitem.role.attrib"/>

+   </define>

+   <define name="seg.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="seg">

+      <element name="seg">

+         <ref name="seg.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="seg.attlist">

+      <ref name="common.attrib"/>

+      <ref name="seg.role.attrib"/>

+   </define>

+   <define name="simplelist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="simplelist">

+      <element name="simplelist">

+         <ref name="simplelist.attlist"/>

+         <oneOrMore>

+            <ref name="member"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="simplelist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="simplelist.role.attrib"/>

+      <optional>

+         <attribute name="columns">

+            <data type="integer"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="type">

+            <choice>

+               <value>inline</value>

+               <value>vert</value>

+               <value>horiz</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="member.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="member">

+      <element name="member">

+         <ref name="member.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="member.attlist">

+      <ref name="common.attrib"/>

+      <ref name="member.role.attrib"/>

+   </define>

+   <define name="variablelist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="variablelist">

+      <element name="variablelist">

+         <ref name="variablelist.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="varlistentry"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="variablelist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="variablelist.role.attrib"/>

+      <optional>

+         <attribute name="termlength">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="varlistentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="varlistentry">

+      <element name="varlistentry">

+         <ref name="varlistentry.attlist"/>

+         <oneOrMore>

+            <ref name="term"/>

+         </oneOrMore>

+         <ref name="listitem"/>

+      </element>

+   </define>

+   <define name="varlistentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="varlistentry.role.attrib"/>

+   </define>

+   <define name="term.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="term">

+      <element name="term">

+         <ref name="term.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="term.attlist">

+      <ref name="common.attrib"/>

+      <ref name="term.role.attrib"/>

+   </define>

+   <define name="calloutlist.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="calloutlist">

+      <element name="calloutlist">

+         <ref name="calloutlist.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="callout"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="calloutlist.attlist">

+      <ref name="common.attrib"/>

+      <ref name="calloutlist.role.attrib"/>

+   </define>

+   <define name="callout.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="callout">

+      <element name="callout">

+         <ref name="callout.attlist"/>

+         <oneOrMore>

+            <ref name="component.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="callout.attlist">

+      <ref name="common.attrib"/>

+      <ref name="callout.role.attrib"/>

+      <optional>

+         <attribute name="arearefs">

+            <data type="IDREFS"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="example.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="example">

+      <element name="example">

+         <ref name="example.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="example.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="example.attlist">

+      <ref name="label.attrib"/>

+      <ref name="width.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="example.role.attrib"/>

+   </define>

+   <define name="informalexample.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="informalexample">

+      <element name="informalexample">

+         <ref name="informalexample.attlist"/>

+         <oneOrMore>

+            <ref name="example.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="informalexample.attlist">

+      <ref name="width.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="informalexample.role.attrib"/>

+   </define>

+   <define name="programlistingco.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="programlistingco">

+      <element name="programlistingco">

+         <ref name="programlistingco.attlist"/>

+         <ref name="areaspec"/>

+         <ref name="programlisting"/>

+         <zeroOrMore>

+            <ref name="calloutlist"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="programlistingco.attlist">

+      <ref name="common.attrib"/>

+      <ref name="programlistingco.role.attrib"/>

+   </define>

+   <define name="areaspec.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="areaspec">

+      <element name="areaspec">

+         <ref name="areaspec.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="area"/>

+               <ref name="areaset"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="areaspec.attlist">

+      <ref name="common.attrib"/>

+      <ref name="areaspec.role.attrib"/>

+      <optional>

+         <attribute name="units">

+            <choice>

+               <value>calspair</value>

+               <value>linecolumn</value>

+               <value>linerange</value>

+               <value>linecolumnpair</value>

+               <value>other</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="otherunits">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="area.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="area">

+      <element name="area">

+         <ref name="area.attlist"/>

+      </element>

+   </define>

+   <define name="area.attlist">

+      <ref name="label.attrib"/>

+      <ref name="linkends.attrib"/>

+      <ref name="idreq.common.attrib"/>

+      <ref name="area.role.attrib"/>

+      <optional>

+         <attribute name="units">

+            <choice>

+               <value>calspair</value>

+               <value>linecolumn</value>

+               <value>linerange</value>

+               <value>linecolumnpair</value>

+               <value>other</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="otherunits">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <attribute name="coords">

+         <data type="string"/>

+      </attribute>

+   </define>

+   <define name="areaset.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="areaset">

+      <element name="areaset">

+         <ref name="areaset.attlist"/>

+         <oneOrMore>

+            <ref name="area"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="areaset.attlist">

+      <ref name="label.attrib"/>

+      <ref name="idreq.common.attrib"/>

+      <ref name="areaset.role.attrib"/>

+      <optional>

+         <attribute name="units">

+            <choice>

+               <value>calspair</value>

+               <value>linecolumn</value>

+               <value>linerange</value>

+               <value>linecolumnpair</value>

+               <value>other</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="otherunits">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <attribute name="coords">

+         <data type="string"/>

+      </attribute>

+   </define>

+   <define name="programlisting.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="programlisting">

+      <element name="programlisting">

+         <ref name="programlisting.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="co"/>

+                  <ref name="lineannotation"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="programlisting.attlist">

+      <ref name="width.attrib"/>

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="programlisting.role.attrib"/>

+   </define>

+   <define name="literallayout.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="literallayout">

+      <element name="literallayout">

+         <ref name="literallayout.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="co"/>

+                  <ref name="lineannotation"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="literallayout.attlist">

+      <ref name="width.attrib"/>

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="literallayout.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>monospaced</value>

+               <value>normal</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="screenco.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="screenco">

+      <element name="screenco">

+         <ref name="screenco.attlist"/>

+         <ref name="areaspec"/>

+         <ref name="screen"/>

+         <zeroOrMore>

+            <ref name="calloutlist"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="screenco.attlist">

+      <ref name="common.attrib"/>

+      <ref name="screenco.role.attrib"/>

+   </define>

+   <define name="screen.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="screen">

+      <element name="screen">

+         <ref name="screen.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="co"/>

+                  <ref name="lineannotation"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="screen.attlist">

+      <ref name="width.attrib"/>

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="screen.role.attrib"/>

+   </define>

+   <define name="screenshot.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="screenshot">

+      <element name="screenshot">

+         <ref name="screenshot.attlist"/>

+         <optional>

+            <ref name="screeninfo"/>

+         </optional>

+         <choice>

+            <ref name="graphic"/>

+            <ref name="graphicco"/>

+            <ref name="mediaobject"/>

+            <ref name="mediaobjectco"/>

+         </choice>

+      </element>

+   </define>

+   <define name="screenshot.attlist">

+      <ref name="common.attrib"/>

+      <ref name="screenshot.role.attrib"/>

+   </define>

+   <define name="screeninfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="screeninfo">

+      <element name="screeninfo">

+         <ref name="screeninfo.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="screeninfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="screeninfo.role.attrib"/>

+   </define>

+   <define name="figure.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="figure">

+      <element name="figure">

+         <ref name="figure.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <oneOrMore>

+            <choice>

+               <ref name="figure.mix"/>

+               <ref name="link.char.class"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="figure.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="figure.role.attrib"/>

+      <optional>

+         <attribute name="float">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="pgwide">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="informalfigure.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="informalfigure">

+      <element name="informalfigure">

+         <ref name="informalfigure.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="figure.mix"/>

+               <ref name="link.char.class"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="informalfigure.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="informalfigure.role.attrib"/>

+      <optional>

+         <attribute name="float">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="pgwide">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="graphicco.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="graphicco">

+      <element name="graphicco">

+         <ref name="graphicco.attlist"/>

+         <ref name="areaspec"/>

+         <ref name="graphic"/>

+         <zeroOrMore>

+            <ref name="calloutlist"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="graphicco.attlist">

+      <ref name="common.attrib"/>

+      <ref name="graphicco.role.attrib"/>

+   </define>

+   <define name="graphic.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="graphic">

+      <element name="graphic">

+         <ref name="graphic.attlist"/>

+      </element>

+   </define>

+   <define name="graphic.attlist">

+      <ref name="graphics.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="graphic.role.attrib"/>

+   </define>

+   <define name="inlinegraphic.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="inlinegraphic">

+      <element name="inlinegraphic">

+         <ref name="inlinegraphic.attlist"/>

+      </element>

+   </define>

+   <define name="inlinegraphic.attlist">

+      <ref name="graphics.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="inlinegraphic.role.attrib"/>

+   </define>

+   <define name="mediaobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="mediaobject">

+      <element name="mediaobject">

+         <ref name="mediaobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="mediaobject.mix"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="mediaobject.mix"/>

+               <ref name="textobject"/>

+            </choice>

+         </zeroOrMore>

+         <optional>

+            <ref name="caption"/>

+         </optional>

+      </element>

+   </define>

+   <define name="mediaobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="mediaobject.role.attrib"/>

+   </define>

+   <define name="inlinemediaobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="inlinemediaobject">

+      <element name="inlinemediaobject">

+         <ref name="inlinemediaobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="mediaobject.mix"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="mediaobject.mix"/>

+               <ref name="textobject"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="inlinemediaobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="inlinemediaobject.role.attrib"/>

+   </define>

+   <define name="videoobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="videoobject">

+      <element name="videoobject">

+         <ref name="videoobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="videodata"/>

+      </element>

+   </define>

+   <define name="videoobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="videoobject.role.attrib"/>

+   </define>

+   <define name="audioobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="audioobject">

+      <element name="audioobject">

+         <ref name="audioobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="audiodata"/>

+      </element>

+   </define>

+   <define name="audioobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="audioobject.role.attrib"/>

+   </define>

+   <define name="imageobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="imageobject">

+      <element name="imageobject">

+         <ref name="imageobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="imagedata"/>

+      </element>

+   </define>

+   <define name="imageobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="imageobject.role.attrib"/>

+   </define>

+   <define name="textobject.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="textobject">

+      <element name="textobject">

+         <ref name="textobject.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <choice>

+            <ref name="phrase"/>

+            <oneOrMore>

+               <ref name="textobject.mix"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="textobject.attlist">

+      <ref name="common.attrib"/>

+      <ref name="textobject.role.attrib"/>

+   </define>

+   <define name="objectinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="objectinfo">

+      <element name="objectinfo">

+         <ref name="objectinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="objectinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="objectinfo.role.attrib"/>

+   </define>

+   <define name="objectdata.attrib">

+      <optional>

+         <attribute name="fileref">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="format">

+            <choice>

+               <value>BMP</value>

+               <value>CGM-CHAR</value>

+               <value>CGM-BINARY</value>

+               <value>CGM-CLEAR</value>

+               <value>DITROFF</value>

+               <value>DVI</value>

+               <value>EPS</value>

+               <value>EQN</value>

+               <value>FAX</value>

+               <value>GIF</value>

+               <value>GIF87a</value>

+               <value>GIF89a</value>

+               <value>JPG</value>

+               <value>JPEG</value>

+               <value>IGES</value>

+               <value>PCX</value>

+               <value>PIC</value>

+               <value>PNG</value>

+               <value>PS</value>

+               <value>SGML</value>

+               <value>TBL</value>

+               <value>TEX</value>

+               <value>TIFF</value>

+               <value>WMF</value>

+               <value>WPG</value>

+               <value>linespecific</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="srccredit">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="videodata.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="videodata">

+      <element name="videodata">

+         <ref name="videodata.attlist"/>

+      </element>

+   </define>

+   <define name="videodata.attlist">

+      <ref name="common.attrib"/>

+      <ref name="objectdata.attrib"/>

+      <optional>

+         <attribute name="width">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="depth">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scale">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scalefit">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="audiodata.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="audiodata">

+      <element name="audiodata">

+         <ref name="audiodata.attlist"/>

+      </element>

+   </define>

+   <define name="audiodata.attlist">

+      <ref name="common.attrib"/>

+      <ref name="objectdata.attrib"/>

+      <ref name="audiodata.role.attrib"/>

+   </define>

+   <define name="imagedata.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="imagedata">

+      <element name="imagedata">

+         <ref name="imagedata.attlist"/>

+      </element>

+   </define>

+   <define name="imagedata.attlist">

+      <ref name="common.attrib"/>

+      <ref name="objectdata.attrib"/>

+      <ref name="imagedata.role.attrib"/>

+      <optional>

+         <attribute name="width">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="depth">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scale">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="scalefit">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="caption.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="caption">

+      <element name="caption">

+         <ref name="caption.attlist"/>

+         <zeroOrMore>

+            <ref name="textobject.mix"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="caption.attlist">

+      <ref name="common.attrib"/>

+      <ref name="caption.role.attrib"/>

+   </define>

+   <define name="mediaobjectco.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="mediaobjectco">

+      <element name="mediaobjectco">

+         <ref name="mediaobjectco.attlist"/>

+         <optional>

+            <ref name="objectinfo"/>

+         </optional>

+         <ref name="imageobjectco"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="imageobjectco"/>

+               <ref name="textobject"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="mediaobjectco.attlist">

+      <ref name="common.attrib"/>

+      <ref name="mediaobjectco.role.attrib"/>

+   </define>

+   <define name="imageobjectco.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="imageobjectco">

+      <element name="imageobjectco">

+         <ref name="imageobjectco.attlist"/>

+         <ref name="areaspec"/>

+         <ref name="imageobject"/>

+         <zeroOrMore>

+            <ref name="calloutlist"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="imageobjectco.attlist">

+      <ref name="common.attrib"/>

+      <ref name="imageobjectco.role.attrib"/>

+   </define>

+   <define name="equation.content">

+      <optional>

+         <ref name="alt"/>

+      </optional>

+      <choice>

+         <oneOrMore>

+            <ref name="graphic"/>

+         </oneOrMore>

+         <oneOrMore>

+            <ref name="mediaobject"/>

+         </oneOrMore>

+      </choice>

+   </define>

+   <define name="inlineequation.content">

+      <optional>

+         <ref name="alt"/>

+      </optional>

+      <choice>

+         <oneOrMore>

+            <ref name="graphic"/>

+         </oneOrMore>

+         <oneOrMore>

+            <ref name="inlinemediaobject"/>

+         </oneOrMore>

+      </choice>

+   </define>

+   <define name="equation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="equation">

+      <element name="equation">

+         <ref name="equation.attlist"/>

+         <optional>

+            <ref name="formalobject.title.content"/>

+         </optional>

+         <choice>

+            <ref name="informalequation"/>

+            <ref name="equation.content"/>

+         </choice>

+      </element>

+   </define>

+   <define name="equation.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="equation.role.attrib"/>

+   </define>

+   <define name="informalequation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="informalequation">

+      <element name="informalequation">

+         <ref name="informalequation.attlist"/>

+         <ref name="equation.content"/>

+      </element>

+   </define>

+   <define name="informalequation.attlist">

+      <ref name="common.attrib"/>

+      <ref name="informalequation.role.attrib"/>

+   </define>

+   <define name="inlineequation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="inlineequation">

+      <element name="inlineequation">

+         <ref name="inlineequation.attlist"/>

+         <ref name="inlineequation.content"/>

+      </element>

+   </define>

+   <define name="inlineequation.attlist">

+      <ref name="common.attrib"/>

+      <ref name="inlineequation.role.attrib"/>

+   </define>

+   <define name="alt.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="alt">

+      <element name="alt">

+         <ref name="alt.attlist"/>

+         <text/>

+      </element>

+   </define>

+   <define name="alt.attlist">

+      <ref name="common.attrib"/>

+      <ref name="alt.role.attrib"/>

+   </define>

+   <define name="synopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="synopsis">

+      <element name="synopsis">

+         <ref name="synopsis.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="graphic"/>

+                  <ref name="mediaobject"/>

+                  <ref name="lineannotation"/>

+                  <ref name="co"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="synopsis.attlist">

+      <ref name="label.attrib"/>

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="synopsis.role.attrib"/>

+   </define>

+   <define name="cmdsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="cmdsynopsis">

+      <element name="cmdsynopsis">

+         <ref name="cmdsynopsis.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="command"/>

+               <ref name="arg"/>

+               <ref name="group"/>

+               <ref name="sbr"/>

+            </choice>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="synopfragment"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="cmdsynopsis.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="cmdsynopsis.role.attrib"/>

+      <optional>

+         <attribute name="sepchar">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="cmdlength">

+            <data type="integer"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="arg.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="arg">

+      <element name="arg">

+         <ref name="arg.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="arg"/>

+                  <ref name="group"/>

+                  <ref name="option"/>

+                  <ref name="synopfragmentref"/>

+                  <ref name="replaceable"/>

+                  <ref name="sbr"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="arg.attlist">

+      <ref name="common.attrib"/>

+      <ref name="arg.role.attrib"/>

+      <optional>

+         <attribute name="choice">

+            <choice>

+               <value>opt</value>

+               <value>req</value>

+               <value>plain</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rep">

+            <choice>

+               <value>norepeat</value>

+               <value>repeat</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="group.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="group">

+      <element name="group">

+         <ref name="group.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="arg"/>

+               <ref name="group"/>

+               <ref name="option"/>

+               <ref name="synopfragmentref"/>

+               <ref name="replaceable"/>

+               <ref name="sbr"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="group.attlist">

+      <ref name="common.attrib"/>

+      <ref name="group.role.attrib"/>

+      <optional>

+         <attribute name="choice">

+            <choice>

+               <value>opt</value>

+               <value>req</value>

+               <value>plain</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rep">

+            <choice>

+               <value>norepeat</value>

+               <value>repeat</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sbr.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sbr">

+      <element name="sbr">

+         <ref name="sbr.attlist"/>

+      </element>

+   </define>

+   <define name="sbr.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sbr.role.attrib"/>

+   </define>

+   <define name="synopfragmentref.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="synopfragmentref">

+      <element name="synopfragmentref">

+         <ref name="synopfragmentref.attlist"/>

+         <text/>

+      </element>

+   </define>

+   <define name="synopfragmentref.attlist">

+      <ref name="linkendreq.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="synopfragmentref.role.attrib"/>

+   </define>

+   <define name="synopfragment.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="synopfragment">

+      <element name="synopfragment">

+         <ref name="synopfragment.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="arg"/>

+               <ref name="group"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="synopfragment.attlist">

+      <ref name="idreq.common.attrib"/>

+      <ref name="synopfragment.role.attrib"/>

+   </define>

+   <define name="funcsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="funcsynopsis">

+      <element name="funcsynopsis">

+         <ref name="funcsynopsis.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="funcsynopsisinfo"/>

+               <ref name="funcprototype"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="funcsynopsis.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="funcsynopsis.role.attrib"/>

+   </define>

+   <define name="funcsynopsisinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="funcsynopsisinfo">

+      <element name="funcsynopsisinfo">

+         <ref name="funcsynopsisinfo.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="cptr.char.mix"/>

+                  <ref name="lineannotation"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="funcsynopsisinfo.attlist">

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="funcsynopsisinfo.role.attrib"/>

+   </define>

+   <define name="funcprototype.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="funcprototype">

+      <element name="funcprototype">

+         <ref name="funcprototype.attlist"/>

+         <ref name="funcdef"/>

+         <oneOrMore>

+            <choice>

+               <ref name="void"/>

+               <ref name="varargs"/>

+               <ref name="paramdef"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="funcprototype.attlist">

+      <ref name="common.attrib"/>

+      <ref name="funcprototype.role.attrib"/>

+   </define>

+   <define name="funcdef.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="funcdef">

+      <element name="funcdef">

+         <ref name="funcdef.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="replaceable"/>

+                  <ref name="function"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="funcdef.attlist">

+      <ref name="common.attrib"/>

+      <ref name="funcdef.role.attrib"/>

+   </define>

+   <define name="void.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="void">

+      <element name="void">

+         <ref name="void.attlist"/>

+      </element>

+   </define>

+   <define name="void.attlist">

+      <ref name="common.attrib"/>

+      <ref name="void.role.attrib"/>

+   </define>

+   <define name="varargs.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="varargs">

+      <element name="varargs">

+         <ref name="varargs.attlist"/>

+      </element>

+   </define>

+   <define name="varargs.attlist">

+      <ref name="common.attrib"/>

+      <ref name="varargs.role.attrib"/>

+   </define>

+   <define name="paramdef.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="paramdef">

+      <element name="paramdef">

+         <ref name="paramdef.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="replaceable"/>

+                  <ref name="parameter"/>

+                  <ref name="funcparams"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="paramdef.attlist">

+      <ref name="common.attrib"/>

+      <ref name="paramdef.role.attrib"/>

+   </define>

+   <define name="funcparams.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="funcparams">

+      <element name="funcparams">

+         <ref name="funcparams.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="funcparams.attlist">

+      <ref name="common.attrib"/>

+      <ref name="funcparams.role.attrib"/>

+   </define>

+   <define name="classsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="classsynopsis">

+      <element name="classsynopsis">

+         <ref name="classsynopsis.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="ooclass"/>

+               <ref name="oointerface"/>

+               <ref name="ooexception"/>

+            </choice>

+         </oneOrMore>

+         <zeroOrMore>

+            <choice>

+               <ref name="classsynopsisinfo"/>

+               <ref name="fieldsynopsis"/>

+               <ref name="method.synop.class"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="classsynopsis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="classsynopsis.role.attrib"/>

+      <optional>

+         <attribute name="language">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>class</value>

+               <value>interface</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="classsynopsisinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="classsynopsisinfo">

+      <element name="classsynopsisinfo">

+         <ref name="classsynopsisinfo.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="cptr.char.mix"/>

+                  <ref name="lineannotation"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="classsynopsisinfo.attlist">

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="classsynopsisinfo.role.attrib"/>

+   </define>

+   <define name="ooclass.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="ooclass">

+      <element name="ooclass">

+         <ref name="ooclass.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <ref name="classname"/>

+      </element>

+   </define>

+   <define name="ooclass.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ooclass.role.attrib"/>

+   </define>

+   <define name="oointerface.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="oointerface">

+      <element name="oointerface">

+         <ref name="oointerface.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <ref name="interfacename"/>

+      </element>

+   </define>

+   <define name="oointerface.attlist">

+      <ref name="common.attrib"/>

+      <ref name="oointerface.role.attrib"/>

+   </define>

+   <define name="ooexception.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="ooexception">

+      <element name="ooexception">

+         <ref name="ooexception.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <ref name="exceptionname"/>

+      </element>

+   </define>

+   <define name="ooexception.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ooexception.role.attrib"/>

+   </define>

+   <define name="modifier.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="modifier">

+      <element name="modifier">

+         <ref name="modifier.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="modifier.attlist">

+      <ref name="common.attrib"/>

+      <ref name="modifier.role.attrib"/>

+   </define>

+   <define name="interfacename.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="interfacename">

+      <element name="interfacename">

+         <ref name="interfacename.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="interfacename.attlist">

+      <ref name="common.attrib"/>

+      <ref name="interfacename.role.attrib"/>

+   </define>

+   <define name="exceptionname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="exceptionname">

+      <element name="exceptionname">

+         <ref name="exceptionname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="exceptionname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="exceptionname.role.attrib"/>

+   </define>

+   <define name="fieldsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="fieldsynopsis">

+      <element name="fieldsynopsis">

+         <ref name="fieldsynopsis.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="type"/>

+         </optional>

+         <ref name="varname"/>

+         <optional>

+            <ref name="initializer"/>

+         </optional>

+      </element>

+   </define>

+   <define name="fieldsynopsis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="fieldsynopsis.role.attrib"/>

+   </define>

+   <define name="initializer.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="initializer">

+      <element name="initializer">

+         <ref name="initializer.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="initializer.attlist">

+      <ref name="common.attrib"/>

+      <ref name="initializer.role.attrib"/>

+   </define>

+   <define name="constructorsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="constructorsynopsis">

+      <element name="constructorsynopsis">

+         <ref name="constructorsynopsis.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="methodname"/>

+         </optional>

+         <choice>

+            <oneOrMore>

+               <ref name="methodparam"/>

+            </oneOrMore>

+            <ref name="void"/>

+         </choice>

+         <zeroOrMore>

+            <ref name="exceptionname"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="constructorsynopsis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="constructorsynopsis.role.attrib"/>

+   </define>

+   <define name="destructorsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="destructorsynopsis">

+      <element name="destructorsynopsis">

+         <ref name="destructorsynopsis.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="methodname"/>

+         </optional>

+         <choice>

+            <oneOrMore>

+               <ref name="methodparam"/>

+            </oneOrMore>

+            <ref name="void"/>

+         </choice>

+         <zeroOrMore>

+            <ref name="exceptionname"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="destructorsynopsis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="destructorsynopsis.role.attrib"/>

+   </define>

+   <define name="methodsynopsis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="methodsynopsis">

+      <element name="methodsynopsis">

+         <ref name="methodsynopsis.attlist"/>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+         <optional>

+            <choice>

+               <ref name="type"/>

+               <ref name="void"/>

+            </choice>

+         </optional>

+         <optional>

+            <ref name="methodname"/>

+         </optional>

+         <choice>

+            <oneOrMore>

+               <ref name="methodparam"/>

+            </oneOrMore>

+            <ref name="void"/>

+         </choice>

+         <zeroOrMore>

+            <ref name="exceptionname"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="modifier"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="methodsynopsis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="methodsynopsis.role.attrib"/>

+   </define>

+   <define name="methodname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="methodname">

+      <element name="methodname">

+         <ref name="methodname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="methodname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="methodname.role.attrib"/>

+   </define>

+   <define name="methodparam.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="methodparam">

+      <element name="methodparam">

+         <ref name="methodparam.attlist"/>

+         <zeroOrMore>

+            <element name="modifier">

+               <text/>

+            </element>

+         </zeroOrMore>

+         <optional>

+            <element name="type">

+               <text/>

+            </element>

+         </optional>

+         <choice>

+            <group>

+               <element name="parameter">

+                  <text/>

+               </element>

+               <optional>

+                  <element name="initializer">

+                     <text/>

+                  </element>

+               </optional>

+            </group>

+            <element name="funcparams">

+               <text/>

+            </element>

+         </choice>

+         <zeroOrMore>

+            <element name="modifier">

+               <text/>

+            </element>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="methodparam.attlist">

+      <ref name="common.attrib"/>

+      <ref name="methodparam.role.attrib"/>

+      <optional>

+         <attribute name="choice">

+            <choice>

+               <value>opt</value>

+               <value>req</value>

+               <value>plain</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rep">

+            <choice>

+               <value>norepeat</value>

+               <value>repeat</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="ackno.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="ackno">

+      <element name="ackno">

+         <ref name="ackno.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="ackno.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ackno.role.attrib"/>

+   </define>

+   <define name="address.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="address">

+      <element name="address">

+         <ref name="address.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="person.ident.mix"/>

+                  <ref name="street"/>

+                  <ref name="pob"/>

+                  <ref name="postcode"/>

+                  <ref name="city"/>

+                  <ref name="state"/>

+                  <ref name="country"/>

+                  <ref name="phone"/>

+                  <ref name="fax"/>

+                  <ref name="email"/>

+                  <ref name="otheraddr"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="address.attlist">

+      <ref name="linespecific.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="address.role.attrib"/>

+   </define>

+   <define name="street.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="street">

+      <element name="street">

+         <ref name="street.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="street.attlist">

+      <ref name="common.attrib"/>

+      <ref name="street.role.attrib"/>

+   </define>

+   <define name="pob.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="pob">

+      <element name="pob">

+         <ref name="pob.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="pob.attlist">

+      <ref name="common.attrib"/>

+      <ref name="pob.role.attrib"/>

+   </define>

+   <define name="postcode.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="postcode">

+      <element name="postcode">

+         <ref name="postcode.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="postcode.attlist">

+      <ref name="common.attrib"/>

+      <ref name="postcode.role.attrib"/>

+   </define>

+   <define name="city.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="city">

+      <element name="city">

+         <ref name="city.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="city.attlist">

+      <ref name="common.attrib"/>

+      <ref name="city.role.attrib"/>

+   </define>

+   <define name="state.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="state">

+      <element name="state">

+         <ref name="state.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="state.attlist">

+      <ref name="common.attrib"/>

+      <ref name="state.role.attrib"/>

+   </define>

+   <define name="country.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="country">

+      <element name="country">

+         <ref name="country.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="country.attlist">

+      <ref name="common.attrib"/>

+      <ref name="country.role.attrib"/>

+   </define>

+   <define name="phone.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="phone">

+      <element name="phone">

+         <ref name="phone.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="phone.attlist">

+      <ref name="common.attrib"/>

+      <ref name="phone.role.attrib"/>

+   </define>

+   <define name="fax.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="fax">

+      <element name="fax">

+         <ref name="fax.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="fax.attlist">

+      <ref name="common.attrib"/>

+      <ref name="fax.role.attrib"/>

+   </define>

+   <define name="otheraddr.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="otheraddr">

+      <element name="otheraddr">

+         <ref name="otheraddr.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="otheraddr.attlist">

+      <ref name="common.attrib"/>

+      <ref name="otheraddr.role.attrib"/>

+   </define>

+   <define name="affiliation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="affiliation">

+      <element name="affiliation">

+         <ref name="affiliation.attlist"/>

+         <optional>

+            <ref name="shortaffil"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="jobtitle"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="orgname"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="orgdiv"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="address"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="affiliation.attlist">

+      <ref name="common.attrib"/>

+      <ref name="affiliation.role.attrib"/>

+   </define>

+   <define name="shortaffil.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="shortaffil">

+      <element name="shortaffil">

+         <ref name="shortaffil.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="shortaffil.attlist">

+      <ref name="common.attrib"/>

+      <ref name="shortaffil.role.attrib"/>

+   </define>

+   <define name="jobtitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="jobtitle">

+      <element name="jobtitle">

+         <ref name="jobtitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="jobtitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="jobtitle.role.attrib"/>

+   </define>

+   <define name="orgdiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="orgdiv">

+      <element name="orgdiv">

+         <ref name="orgdiv.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="orgdiv.attlist">

+      <ref name="common.attrib"/>

+      <ref name="orgdiv.role.attrib"/>

+   </define>

+   <define name="artpagenums.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="artpagenums">

+      <element name="artpagenums">

+         <ref name="artpagenums.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="artpagenums.attlist">

+      <ref name="common.attrib"/>

+      <ref name="artpagenums.role.attrib"/>

+   </define>

+   <define name="author.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="author">

+      <element name="author">

+         <ref name="author.attlist"/>

+         <oneOrMore>

+            <ref name="person.ident.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="author.attlist">

+      <ref name="common.attrib"/>

+      <ref name="author.role.attrib"/>

+   </define>

+   <define name="authorgroup.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="authorgroup">

+      <element name="authorgroup">

+         <ref name="authorgroup.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="author"/>

+               <ref name="editor"/>

+               <ref name="collab"/>

+               <ref name="corpauthor"/>

+               <ref name="othercredit"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="authorgroup.attlist">

+      <ref name="common.attrib"/>

+      <ref name="authorgroup.role.attrib"/>

+   </define>

+   <define name="collab.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="collab">

+      <element name="collab">

+         <ref name="collab.attlist"/>

+         <ref name="collabname"/>

+         <zeroOrMore>

+            <ref name="affiliation"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="collab.attlist">

+      <ref name="common.attrib"/>

+      <ref name="collab.role.attrib"/>

+   </define>

+   <define name="collabname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="collabname">

+      <element name="collabname">

+         <ref name="collabname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="collabname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="collabname.role.attrib"/>

+   </define>

+   <define name="authorinitials.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="authorinitials">

+      <element name="authorinitials">

+         <ref name="authorinitials.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="authorinitials.attlist">

+      <ref name="common.attrib"/>

+      <ref name="authorinitials.role.attrib"/>

+   </define>

+   <define name="confgroup.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="confgroup">

+      <element name="confgroup">

+         <ref name="confgroup.attlist"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="confdates"/>

+               <ref name="conftitle"/>

+               <ref name="confnum"/>

+               <ref name="address"/>

+               <ref name="confsponsor"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="confgroup.attlist">

+      <ref name="common.attrib"/>

+      <ref name="confgroup.role.attrib"/>

+   </define>

+   <define name="confdates.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="confdates">

+      <element name="confdates">

+         <ref name="confdates.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="confdates.attlist">

+      <ref name="common.attrib"/>

+      <ref name="confdates.role.attrib"/>

+   </define>

+   <define name="conftitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="conftitle">

+      <element name="conftitle">

+         <ref name="conftitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="conftitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="conftitle.role.attrib"/>

+   </define>

+   <define name="confnum.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="confnum">

+      <element name="confnum">

+         <ref name="confnum.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="confnum.attlist">

+      <ref name="common.attrib"/>

+      <ref name="confnum.role.attrib"/>

+   </define>

+   <define name="confsponsor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="confsponsor">

+      <element name="confsponsor">

+         <ref name="confsponsor.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="confsponsor.attlist">

+      <ref name="common.attrib"/>

+      <ref name="confsponsor.role.attrib"/>

+   </define>

+   <define name="contractnum.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="contractnum">

+      <element name="contractnum">

+         <ref name="contractnum.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="contractnum.attlist">

+      <ref name="common.attrib"/>

+      <ref name="contractnum.role.attrib"/>

+   </define>

+   <define name="contractsponsor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="contractsponsor">

+      <element name="contractsponsor">

+         <ref name="contractsponsor.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="contractsponsor.attlist">

+      <ref name="common.attrib"/>

+      <ref name="contractsponsor.role.attrib"/>

+   </define>

+   <define name="copyright.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="copyright">

+      <element name="copyright">

+         <ref name="copyright.attlist"/>

+         <oneOrMore>

+            <ref name="year"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="holder"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="copyright.attlist">

+      <ref name="common.attrib"/>

+      <ref name="copyright.role.attrib"/>

+   </define>

+   <define name="year.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="year">

+      <element name="year">

+         <ref name="year.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="year.attlist">

+      <ref name="common.attrib"/>

+      <ref name="year.role.attrib"/>

+   </define>

+   <define name="holder.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="holder">

+      <element name="holder">

+         <ref name="holder.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="holder.attlist">

+      <ref name="common.attrib"/>

+      <ref name="holder.role.attrib"/>

+   </define>

+   <define name="corpauthor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="corpauthor">

+      <element name="corpauthor">

+         <ref name="corpauthor.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="corpauthor.attlist">

+      <ref name="common.attrib"/>

+      <ref name="corpauthor.role.attrib"/>

+   </define>

+   <define name="corpname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="corpname">

+      <element name="corpname">

+         <ref name="corpname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="corpname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="corpname.role.attrib"/>

+   </define>

+   <define name="date.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="date">

+      <element name="date">

+         <ref name="date.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="date.attlist">

+      <ref name="common.attrib"/>

+      <ref name="date.role.attrib"/>

+   </define>

+   <define name="edition.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="edition">

+      <element name="edition">

+         <ref name="edition.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="edition.attlist">

+      <ref name="common.attrib"/>

+      <ref name="edition.role.attrib"/>

+   </define>

+   <define name="editor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="editor">

+      <element name="editor">

+         <ref name="editor.attlist"/>

+         <oneOrMore>

+            <ref name="person.ident.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="editor.attlist">

+      <ref name="common.attrib"/>

+      <ref name="editor.role.attrib"/>

+   </define>

+   <define name="isbn.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="isbn">

+      <element name="isbn">

+         <ref name="isbn.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="isbn.attlist">

+      <ref name="common.attrib"/>

+      <ref name="isbn.role.attrib"/>

+   </define>

+   <define name="issn.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="issn">

+      <element name="issn">

+         <ref name="issn.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="issn.attlist">

+      <ref name="common.attrib"/>

+      <ref name="issn.role.attrib"/>

+   </define>

+   <define name="invpartnumber.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="invpartnumber">

+      <element name="invpartnumber">

+         <ref name="invpartnumber.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="invpartnumber.attlist">

+      <ref name="common.attrib"/>

+      <ref name="invpartnumber.role.attrib"/>

+   </define>

+   <define name="issuenum.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="issuenum">

+      <element name="issuenum">

+         <ref name="issuenum.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="issuenum.attlist">

+      <ref name="common.attrib"/>

+      <ref name="issuenum.role.attrib"/>

+   </define>

+   <define name="legalnotice.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="legalnotice">

+      <element name="legalnotice">

+         <ref name="legalnotice.attlist"/>

+         <optional>

+            <ref name="title"/>

+         </optional>

+         <oneOrMore>

+            <ref name="legalnotice.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="legalnotice.attlist">

+      <ref name="common.attrib"/>

+      <ref name="legalnotice.role.attrib"/>

+   </define>

+   <define name="modespec.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="modespec">

+      <element name="modespec">

+         <ref name="modespec.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="modespec.attlist">

+      <ref name="common.attrib"/>

+      <ref name="modespec.role.attrib"/>

+      <optional>

+         <attribute name="application">

+            <choice>

+               <value>BMP</value>

+               <value>CGM-CHAR</value>

+               <value>CGM-BINARY</value>

+               <value>CGM-CLEAR</value>

+               <value>DITROFF</value>

+               <value>DVI</value>

+               <value>EPS</value>

+               <value>EQN</value>

+               <value>FAX</value>

+               <value>GIF</value>

+               <value>GIF87a</value>

+               <value>GIF89a</value>

+               <value>JPG</value>

+               <value>JPEG</value>

+               <value>IGES</value>

+               <value>PCX</value>

+               <value>PIC</value>

+               <value>PNG</value>

+               <value>PS</value>

+               <value>SGML</value>

+               <value>TBL</value>

+               <value>TEX</value>

+               <value>TIFF</value>

+               <value>WMF</value>

+               <value>WPG</value>

+               <value>linespecific</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="orgname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="orgname">

+      <element name="orgname">

+         <ref name="orgname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="orgname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="orgname.role.attrib"/>

+   </define>

+   <define name="othercredit.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="othercredit">

+      <element name="othercredit">

+         <ref name="othercredit.attlist"/>

+         <oneOrMore>

+            <ref name="person.ident.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="othercredit.attlist">

+      <ref name="common.attrib"/>

+      <ref name="othercredit.role.attrib"/>

+   </define>

+   <define name="pagenums.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="pagenums">

+      <element name="pagenums">

+         <ref name="pagenums.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="pagenums.attlist">

+      <ref name="common.attrib"/>

+      <ref name="pagenums.role.attrib"/>

+   </define>

+   <define name="contrib.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="contrib">

+      <element name="contrib">

+         <ref name="contrib.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="contrib.attlist">

+      <ref name="common.attrib"/>

+      <ref name="contrib.role.attrib"/>

+   </define>

+   <define name="firstname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="firstname">

+      <element name="firstname">

+         <ref name="firstname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="firstname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="firstname.role.attrib"/>

+   </define>

+   <define name="honorific.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="honorific">

+      <element name="honorific">

+         <ref name="honorific.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="honorific.attlist">

+      <ref name="common.attrib"/>

+      <ref name="honorific.role.attrib"/>

+   </define>

+   <define name="lineage.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="lineage">

+      <element name="lineage">

+         <ref name="lineage.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="lineage.attlist">

+      <ref name="common.attrib"/>

+      <ref name="lineage.role.attrib"/>

+   </define>

+   <define name="othername.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="othername">

+      <element name="othername">

+         <ref name="othername.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="othername.attlist">

+      <ref name="common.attrib"/>

+      <ref name="othername.role.attrib"/>

+   </define>

+   <define name="surname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="surname">

+      <element name="surname">

+         <ref name="surname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="surname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="surname.role.attrib"/>

+   </define>

+   <define name="printhistory.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="printhistory">

+      <element name="printhistory">

+         <ref name="printhistory.attlist"/>

+         <oneOrMore>

+            <ref name="para.class"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="printhistory.attlist">

+      <ref name="common.attrib"/>

+      <ref name="printhistory.role.attrib"/>

+   </define>

+   <define name="productname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="productname">

+      <element name="productname">

+         <ref name="productname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="productname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="productname.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>service</value>

+               <value>trade</value>

+               <value>registered</value>

+               <value>copyright</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="productnumber.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="productnumber">

+      <element name="productnumber">

+         <ref name="productnumber.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="productnumber.attlist">

+      <ref name="common.attrib"/>

+      <ref name="productnumber.role.attrib"/>

+   </define>

+   <define name="pubdate.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="pubdate">

+      <element name="pubdate">

+         <ref name="pubdate.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="pubdate.attlist">

+      <ref name="common.attrib"/>

+      <ref name="pubdate.role.attrib"/>

+   </define>

+   <define name="publisher.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="publisher">

+      <element name="publisher">

+         <ref name="publisher.attlist"/>

+         <ref name="publishername"/>

+         <zeroOrMore>

+            <ref name="address"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="publisher.attlist">

+      <ref name="common.attrib"/>

+      <ref name="publisher.role.attrib"/>

+   </define>

+   <define name="publishername.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="publishername">

+      <element name="publishername">

+         <ref name="publishername.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="publishername.attlist">

+      <ref name="common.attrib"/>

+      <ref name="publishername.role.attrib"/>

+   </define>

+   <define name="pubsnumber.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="pubsnumber">

+      <element name="pubsnumber">

+         <ref name="pubsnumber.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="pubsnumber.attlist">

+      <ref name="common.attrib"/>

+      <ref name="pubsnumber.role.attrib"/>

+   </define>

+   <define name="releaseinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="releaseinfo">

+      <element name="releaseinfo">

+         <ref name="releaseinfo.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="releaseinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="releaseinfo.role.attrib"/>

+   </define>

+   <define name="revhistory.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="revhistory">

+      <element name="revhistory">

+         <ref name="revhistory.attlist"/>

+         <oneOrMore>

+            <ref name="revision"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="revhistory.attlist">

+      <ref name="common.attrib"/>

+      <ref name="revhistory.role.attrib"/>

+   </define>

+   <define name="revision.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="revision">

+      <element name="revision">

+         <ref name="revision.attlist"/>

+         <ref name="revnumber"/>

+         <ref name="date"/>

+         <zeroOrMore>

+            <ref name="authorinitials"/>

+         </zeroOrMore>

+         <optional>

+            <choice>

+               <ref name="revremark"/>

+               <ref name="revdescription"/>

+            </choice>

+         </optional>

+      </element>

+   </define>

+   <define name="revision.attlist">

+      <ref name="common.attrib"/>

+      <ref name="revision.role.attrib"/>

+   </define>

+   <define name="revnumber.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="revnumber">

+      <element name="revnumber">

+         <ref name="revnumber.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="revnumber.attlist">

+      <ref name="common.attrib"/>

+      <ref name="revnumber.role.attrib"/>

+   </define>

+   <define name="revremark.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="revremark">

+      <element name="revremark">

+         <ref name="revremark.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="revremark.attlist">

+      <ref name="common.attrib"/>

+      <ref name="revremark.role.attrib"/>

+   </define>

+   <define name="revdescription.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="revdescription">

+      <element name="revdescription">

+         <ref name="revdescription.attlist"/>

+         <oneOrMore>

+            <ref name="revdescription.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="revdescription.attlist">

+      <ref name="common.attrib"/>

+      <ref name="revdescription.role.attrib"/>

+   </define>

+   <define name="seriesvolnums.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="seriesvolnums">

+      <element name="seriesvolnums">

+         <ref name="seriesvolnums.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="seriesvolnums.attlist">

+      <ref name="common.attrib"/>

+      <ref name="seriesvolnums.role.attrib"/>

+   </define>

+   <define name="volumenum.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="volumenum">

+      <element name="volumenum">

+         <ref name="volumenum.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="volumenum.attlist">

+      <ref name="common.attrib"/>

+      <ref name="volumenum.role.attrib"/>

+   </define>

+   <define name="accel.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="accel">

+      <element name="accel">

+         <ref name="accel.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="accel.attlist">

+      <ref name="common.attrib"/>

+      <ref name="accel.role.attrib"/>

+   </define>

+   <define name="action.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="action">

+      <element name="action">

+         <ref name="action.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="action.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="action.role.attrib"/>

+   </define>

+   <define name="application.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="application">

+      <element name="application">

+         <ref name="application.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="application.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="application.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>hardware</value>

+               <value>software</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="classname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="classname">

+      <element name="classname">

+         <ref name="classname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="classname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="classname.role.attrib"/>

+   </define>

+   <define name="co.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="co">

+      <element name="co">

+         <ref name="co.attlist"/>

+      </element>

+   </define>

+   <define name="co.attlist">

+      <ref name="label.attrib"/>

+      <ref name="linkends.attrib"/>

+      <ref name="idreq.common.attrib"/>

+      <ref name="co.role.attrib"/>

+   </define>

+   <define name="command.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="command">

+      <element name="command">

+         <ref name="command.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="command.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="command.role.attrib"/>

+   </define>

+   <define name="computeroutput.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="computeroutput">

+      <element name="computeroutput">

+         <ref name="computeroutput.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="computeroutput.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="computeroutput.role.attrib"/>

+   </define>

+   <define name="database.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="database">

+      <element name="database">

+         <ref name="database.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="database.attlist">

+      <ref name="common.attrib"/>

+      <ref name="database.role.attrib"/>

+      <ref name="moreinfo.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>name</value>

+               <value>table</value>

+               <value>field</value>

+               <value>key1</value>

+               <value>key2</value>

+               <value>record</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="email.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="email">

+      <element name="email">

+         <ref name="email.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="email.attlist">

+      <ref name="common.attrib"/>

+      <ref name="email.role.attrib"/>

+   </define>

+   <define name="envar.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="envar">

+      <element name="envar">

+         <ref name="envar.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="envar.attlist">

+      <ref name="common.attrib"/>

+      <ref name="envar.role.attrib"/>

+   </define>

+   <define name="errorcode.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="errorcode">

+      <element name="errorcode">

+         <ref name="errorcode.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="errorcode.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="errorcode.role.attrib"/>

+   </define>

+   <define name="errorname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="errorname">

+      <element name="errorname">

+         <ref name="errorname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="errorname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="errorname.role.attrib"/>

+   </define>

+   <define name="errortype.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="errortype">

+      <element name="errortype">

+         <ref name="errortype.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="errortype.attlist">

+      <ref name="common.attrib"/>

+      <ref name="errortype.role.attrib"/>

+   </define>

+   <define name="filename.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="filename">

+      <element name="filename">

+         <ref name="filename.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="filename.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="filename.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>headerfile</value>

+               <value>devicefile</value>

+               <value>libraryfile</value>

+               <value>directory</value>

+               <value>symlink</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="path">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="function.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="function">

+      <element name="function">

+         <ref name="function.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="function.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="function.role.attrib"/>

+   </define>

+   <define name="guibutton.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guibutton">

+      <element name="guibutton">

+         <ref name="guibutton.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guibutton.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guibutton.role.attrib"/>

+   </define>

+   <define name="guiicon.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guiicon">

+      <element name="guiicon">

+         <ref name="guiicon.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guiicon.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guiicon.role.attrib"/>

+   </define>

+   <define name="guilabel.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guilabel">

+      <element name="guilabel">

+         <ref name="guilabel.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guilabel.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guilabel.role.attrib"/>

+   </define>

+   <define name="guimenu.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guimenu">

+      <element name="guimenu">

+         <ref name="guimenu.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guimenu.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guimenu.role.attrib"/>

+   </define>

+   <define name="guimenuitem.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guimenuitem">

+      <element name="guimenuitem">

+         <ref name="guimenuitem.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guimenuitem.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guimenuitem.role.attrib"/>

+   </define>

+   <define name="guisubmenu.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="guisubmenu">

+      <element name="guisubmenu">

+         <ref name="guisubmenu.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="guisubmenu.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="guisubmenu.role.attrib"/>

+   </define>

+   <define name="hardware.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="hardware">

+      <element name="hardware">

+         <ref name="hardware.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="hardware.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="hardware.role.attrib"/>

+   </define>

+   <define name="interface.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="interface">

+      <element name="interface">

+         <ref name="interface.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="accel"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="interface.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="interface.role.attrib"/>

+   </define>

+   <define name="keycap.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keycap">

+      <element name="keycap">

+         <ref name="keycap.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="keycap.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="keycap.role.attrib"/>

+   </define>

+   <define name="keycode.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keycode">

+      <element name="keycode">

+         <ref name="keycode.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="keycode.attlist">

+      <ref name="common.attrib"/>

+      <ref name="keycode.role.attrib"/>

+   </define>

+   <define name="keycombo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keycombo">

+      <element name="keycombo">

+         <ref name="keycombo.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="keycap"/>

+               <ref name="keycombo"/>

+               <ref name="keysym"/>

+               <ref name="mousebutton"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="keycombo.attlist">

+      <ref name="keyaction.attrib"/>

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="keycombo.role.attrib"/>

+   </define>

+   <define name="keysysm.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="keysym">

+      <element name="keysym">

+         <ref name="keysym.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="keysym.attlist">

+      <ref name="common.attrib"/>

+      <ref name="keysysm.role.attrib"/>

+   </define>

+   <define name="lineannotation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="lineannotation">

+      <element name="lineannotation">

+         <ref name="lineannotation.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="lineannotation.attlist">

+      <ref name="common.attrib"/>

+      <ref name="lineannotation.role.attrib"/>

+   </define>

+   <define name="literal.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="literal">

+      <element name="literal">

+         <ref name="literal.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="literal.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="literal.role.attrib"/>

+   </define>

+   <define name="constant.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="constant">

+      <element name="constant">

+         <ref name="constant.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="constant.attlist">

+      <ref name="common.attrib"/>

+      <ref name="constant.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <value>limit</value>

+         </attribute>

+      </optional>

+   </define>

+   <define name="varname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="varname">

+      <element name="varname">

+         <ref name="varname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="varname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="varname.role.attrib"/>

+   </define>

+   <define name="markup.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="markup">

+      <element name="markup">

+         <ref name="markup.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="markup.attlist">

+      <ref name="common.attrib"/>

+      <ref name="markup.role.attrib"/>

+   </define>

+   <define name="medialabel.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="medialabel">

+      <element name="medialabel">

+         <ref name="medialabel.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="medialabel.attlist">

+      <ref name="common.attrib"/>

+      <ref name="medialabel.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>cartridge</value>

+               <value>cdrom</value>

+               <value>disk</value>

+               <value>tape</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="menuchoice.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="menuchoice">

+      <element name="menuchoice">

+         <ref name="menuchoice.attlist"/>

+         <optional>

+            <ref name="shortcut"/>

+         </optional>

+         <oneOrMore>

+            <choice>

+               <ref name="guibutton"/>

+               <ref name="guiicon"/>

+               <ref name="guilabel"/>

+               <ref name="guimenu"/>

+               <ref name="guimenuitem"/>

+               <ref name="guisubmenu"/>

+               <ref name="interface"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="menuchoice.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="menuchoice.role.attrib"/>

+   </define>

+   <define name="shortcut.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="shortcut">

+      <element name="shortcut">

+         <ref name="shortcut.attlist"/>

+         <oneOrMore>

+            <choice>

+               <ref name="keycap"/>

+               <ref name="keycombo"/>

+               <ref name="keysym"/>

+               <ref name="mousebutton"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="shortcut.attlist">

+      <ref name="keyaction.attrib"/>

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="shortcut.role.attrib"/>

+   </define>

+   <define name="mousebutton.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="mousebutton">

+      <element name="mousebutton">

+         <ref name="mousebutton.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="mousebutton.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="mousebutton.role.attrib"/>

+   </define>

+   <define name="msgtext.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="msgtext">

+      <element name="msgtext">

+         <ref name="msgtext.attlist"/>

+         <oneOrMore>

+            <ref name="component.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="msgtext.attlist">

+      <ref name="common.attrib"/>

+      <ref name="msgtext.role.attrib"/>

+   </define>

+   <define name="option.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="option">

+      <element name="option">

+         <ref name="option.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="option.attlist">

+      <ref name="common.attrib"/>

+      <ref name="option.role.attrib"/>

+   </define>

+   <define name="optional.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="optional">

+      <element name="optional">

+         <ref name="optional.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="optional.attlist">

+      <ref name="common.attrib"/>

+      <ref name="optional.role.attrib"/>

+   </define>

+   <define name="parameter.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="parameter">

+      <element name="parameter">

+         <ref name="parameter.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="parameter.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="parameter.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>command</value>

+               <value>function</value>

+               <value>option</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="prompt.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="prompt">

+      <element name="prompt">

+         <ref name="prompt.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="prompt.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="prompt.role.attrib"/>

+   </define>

+   <define name="property.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="property">

+      <element name="property">

+         <ref name="property.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="property.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="property.role.attrib"/>

+   </define>

+   <define name="replaceable.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="replaceable">

+      <element name="replaceable">

+         <ref name="replaceable.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="link.char.class"/>

+                  <ref name="optional"/>

+                  <ref name="base.char.class"/>

+                  <ref name="other.char.class"/>

+                  <ref name="inlinegraphic"/>

+                  <ref name="inlinemediaobject"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="replaceable.attlist">

+      <ref name="common.attrib"/>

+      <ref name="replaceable.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>command</value>

+               <value>function</value>

+               <value>option</value>

+               <value>parameter</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="returnvalue.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="returnvalue">

+      <element name="returnvalue">

+         <ref name="returnvalue.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="returnvalue.attlist">

+      <ref name="common.attrib"/>

+      <ref name="returnvalue.role.attrib"/>

+   </define>

+   <define name="sgmltag.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sgmltag">

+      <element name="sgmltag">

+         <ref name="sgmltag.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="sgmltag.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sgmltag.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>attribute</value>

+               <value>attvalue</value>

+               <value>element</value>

+               <value>endtag</value>

+               <value>emptytag</value>

+               <value>genentity</value>

+               <value>numcharref</value>

+               <value>paramentity</value>

+               <value>pi</value>

+               <value>xmlpi</value>

+               <value>starttag</value>

+               <value>sgmlcomment</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="structfield.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="structfield">

+      <element name="structfield">

+         <ref name="structfield.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="structfield.attlist">

+      <ref name="common.attrib"/>

+      <ref name="structfield.role.attrib"/>

+   </define>

+   <define name="structname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="structname">

+      <element name="structname">

+         <ref name="structname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="structname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="structname.role.attrib"/>

+   </define>

+   <define name="symbol.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="symbol">

+      <element name="symbol">

+         <ref name="symbol.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="symbol.attlist">

+      <ref name="common.attrib"/>

+      <ref name="symbol.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <value>limit</value>

+         </attribute>

+      </optional>

+   </define>

+   <define name="systemitem.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="systemitem">

+      <element name="systemitem">

+         <ref name="systemitem.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="smallcptr.char.mix"/>

+                  <ref name="acronym"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="systemitem.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="systemitem.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>constant</value>

+               <value>groupname</value>

+               <value>library</value>

+               <value>macro</value>

+               <value>osname</value>

+               <value>resource</value>

+               <value>systemname</value>

+               <value>username</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="token.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="token">

+      <element name="token">

+         <ref name="token.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="token.attlist">

+      <ref name="common.attrib"/>

+      <ref name="token.role.attrib"/>

+   </define>

+   <define name="type.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="type">

+      <element name="type">

+         <ref name="type.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="smallcptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="type.attlist">

+      <ref name="common.attrib"/>

+      <ref name="type.role.attrib"/>

+   </define>

+   <define name="userinput.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="userinput">

+      <element name="userinput">

+         <ref name="userinput.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="cptr.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="userinput.attlist">

+      <ref name="moreinfo.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="userinput.role.attrib"/>

+   </define>

+   <define name="abbrev.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="abbrev">

+      <element name="abbrev">

+         <ref name="abbrev.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="abbrev.attlist">

+      <ref name="common.attrib"/>

+      <ref name="abbrev.role.attrib"/>

+   </define>

+   <define name="acronym.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="acronym">

+      <element name="acronym">

+         <ref name="acronym.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="acronym.attlist">

+      <ref name="common.attrib"/>

+      <ref name="acronym.role.attrib"/>

+   </define>

+   <define name="citation.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="citation">

+      <element name="citation">

+         <ref name="citation.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="citation.attlist">

+      <ref name="common.attrib"/>

+      <ref name="citation.role.attrib"/>

+   </define>

+   <define name="citerefentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="citerefentry">

+      <element name="citerefentry">

+         <ref name="citerefentry.attlist"/>

+         <ref name="refentrytitle"/>

+         <optional>

+            <ref name="manvolnum"/>

+         </optional>

+      </element>

+   </define>

+   <define name="citerefentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="citerefentry.role.attrib"/>

+   </define>

+   <define name="refentrytitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refentrytitle">

+      <element name="refentrytitle">

+         <ref name="refentrytitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refentrytitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refentrytitle.role.attrib"/>

+   </define>

+   <define name="namvolnum.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="manvolnum">

+      <element name="manvolnum">

+         <ref name="manvolnum.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="manvolnum.attlist">

+      <ref name="common.attrib"/>

+      <ref name="namvolnum.role.attrib"/>

+   </define>

+   <define name="citetitle.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="citetitle">

+      <element name="citetitle">

+         <ref name="citetitle.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="citetitle.attlist">

+      <ref name="common.attrib"/>

+      <ref name="citetitle.role.attrib"/>

+      <optional>

+         <attribute name="pubwork">

+            <choice>

+               <value>article</value>

+               <value>book</value>

+               <value>chapter</value>

+               <value>part</value>

+               <value>refentry</value>

+               <value>section</value>

+               <value>journal</value>

+               <value>series</value>

+               <value>set</value>

+               <value>manuscript</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="emphasis.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="emphasis">

+      <element name="emphasis">

+         <ref name="emphasis.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="emphasis.attlist">

+      <ref name="common.attrib"/>

+      <ref name="emphasis.role.attrib"/>

+   </define>

+   <define name="firstterm.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="firstterm">

+      <element name="firstterm">

+         <ref name="firstterm.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="firstterm.attlist">

+      <ref name="common.attrib"/>

+      <ref name="firstterm.role.attrib"/>

+      <ref name="linkend.attrib"/>

+   </define>

+   <define name="foreignphrase.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="foreignphrase">

+      <element name="foreignphrase">

+         <ref name="foreignphrase.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="foreignphrase.attlist">

+      <ref name="common.attrib"/>

+      <ref name="foreignphrase.role.attrib"/>

+   </define>

+   <define name="glossterm.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossterm">

+      <element name="glossterm">

+         <ref name="glossterm.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="glossterm.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glossterm.role.attrib"/>

+      <ref name="linkend.attrib"/>

+      <optional>

+         <attribute name="baseform">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="phrase.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="phrase">

+      <element name="phrase">

+         <ref name="phrase.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="phrase.attlist">

+      <ref name="common.attrib"/>

+      <ref name="phrase.role.attrib"/>

+   </define>

+   <define name="quote.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="quote">

+      <element name="quote">

+         <ref name="quote.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="quote.attlist">

+      <ref name="common.attrib"/>

+      <ref name="quote.role.attrib"/>

+   </define>

+   <define name="ssscript.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="subscriptContentModel">

+      <zeroOrMore>

+         <choice>

+            <ref name="link.char.class"/>

+            <ref name="emphasis"/>

+            <ref name="replaceable"/>

+            <ref name="symbol"/>

+            <ref name="inlinegraphic"/>

+            <ref name="inlinemediaobject"/>

+            <ref name="base.char.class"/>

+            <ref name="other.char.class"/>

+         </choice>

+      </zeroOrMore>

+   </define>

+   <define name="subscript">

+      <element name="subscript">

+         <ref name="subscript.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="subscriptContentModel"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="subscript.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ssscript.role.attrib"/>

+   </define>

+   <define name="superscript">

+      <element name="superscript">

+         <ref name="superscript.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="subscriptContentModel"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="superscript.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ssscript.role.attrib"/>

+   </define>

+   <define name="trademark.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="trademark">

+      <element name="trademark">

+         <ref name="trademark.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="link.char.class"/>

+                  <ref name="tech.char.class"/>

+                  <ref name="base.char.class"/>

+                  <ref name="other.char.class"/>

+                  <ref name="inlinegraphic"/>

+                  <ref name="inlinemediaobject"/>

+                  <ref name="emphasis"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="trademark.attlist">

+      <ref name="common.attrib"/>

+      <ref name="trademark.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>service</value>

+               <value>trade</value>

+               <value>registered</value>

+               <value>copyright</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="wordasword.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="wordasword">

+      <element name="wordasword">

+         <ref name="wordasword.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="word.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="wordasword.attlist">

+      <ref name="common.attrib"/>

+      <ref name="wordasword.role.attrib"/>

+   </define>

+   <define name="link.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="link">

+      <element name="link">

+         <ref name="link.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="link.attlist">

+      <ref name="linkendreq.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="link.role.attrib"/>

+      <optional>

+         <attribute name="endterm">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="type">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="olink.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="olink">

+      <element name="olink">

+         <ref name="olink.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="olink.attlist">

+      <ref name="common.attrib"/>

+      <ref name="olink.role.attrib"/>

+      <optional>

+         <attribute name="linkmode">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="localinfo">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="type">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="ulink.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="ulink">

+      <element name="ulink">

+         <ref name="ulink.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="ulink.attlist">

+      <ref name="common.attrib"/>

+      <ref name="ulink.role.attrib"/>

+      <attribute name="url">

+         <data type="string"/>

+      </attribute>

+      <optional>

+         <attribute name="type">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="footnoteref.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="footnoteref">

+      <element name="footnoteref">

+         <ref name="footnoteref.attlist"/>

+      </element>

+   </define>

+   <define name="footnoteref.attlist">

+      <ref name="linkendreq.attrib"/>

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="footnoteref.role.attrib"/>

+   </define>

+   <define name="xref.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="xref">

+      <element name="xref">

+         <ref name="xref.attlist"/>

+      </element>

+   </define>

+   <define name="xref.attlist">

+      <ref name="linkendreq.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="xref.role.attrib"/>

+      <optional>

+         <attribute name="endterm">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="anchor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="anchor">

+      <element name="anchor">

+         <ref name="anchor.attlist"/>

+      </element>

+   </define>

+   <define name="anchor.attlist">

+      <ref name="idreq.attrib"/>

+      <ref name="pagenum.attrib"/>

+      <ref name="remap.attrib"/>

+      <ref name="xreflabel.attrib"/>

+      <ref name="revisionflag.attrib"/>

+      <ref name="effectivity.attrib"/>

+      <ref name="anchor.role.attrib"/>

+   </define>

+   <define name="beginpage.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="beginpage">

+      <element name="beginpage">

+         <ref name="beginpage.attlist"/>

+      </element>

+   </define>

+   <define name="beginpage.attlist">

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="beginpage.role.attrib"/>

+   </define>

+   <define name="indexterm.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="indexterm">

+      <element name="indexterm">

+         <ref name="indexterm.attlist"/>

+         <optional>

+            <ref name="primary"/>

+         </optional>

+         <optional>

+            <choice>

+               <group>

+                  <ref name="secondary"/>

+                  <optional>

+                     <choice>

+                        <group>

+                           <ref name="tertiary"/>

+                           <optional>

+                              <choice>

+                                 <ref name="see"/>

+                                 <oneOrMore>

+                                    <ref name="seealso"/>

+                                 </oneOrMore>

+                              </choice>

+                           </optional>

+                        </group>

+                        <ref name="see"/>

+                        <oneOrMore>

+                           <ref name="seealso"/>

+                        </oneOrMore>

+                     </choice>

+                  </optional>

+               </group>

+               <ref name="see"/>

+               <oneOrMore>

+                  <ref name="seealso"/>

+               </oneOrMore>

+            </choice>

+         </optional>

+      </element>

+   </define>

+   <define name="indexterm.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexterm.role.attrib"/>

+      <ref name="pagenum.attrib"/>

+      <optional>

+         <attribute name="scope">

+            <choice>

+               <value>all</value>

+               <value>global</value>

+               <value>local</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="significance">

+            <choice>

+               <value>preferred</value>

+               <value>normal</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>singular</value>

+               <value>startofrange</value>

+               <value>endofrange</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="startref">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="zone">

+            <data type="IDREFS"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="primsecter.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="primary">

+      <element name="primary">

+         <ref name="primary.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="primary.attlist">

+      <ref name="common.attrib"/>

+      <ref name="primsecter.role.attrib"/>

+      <optional>

+         <attribute name="sortas">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="secondary">

+      <element name="secondary">

+         <ref name="secondary.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="secondary.attlist">

+      <ref name="common.attrib"/>

+      <ref name="primsecter.role.attrib"/>

+      <optional>

+         <attribute name="sortas">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="tertiary">

+      <element name="tertiary">

+         <ref name="tertiary.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="tertiary.attlist">

+      <ref name="common.attrib"/>

+      <ref name="primsecter.role.attrib"/>

+      <optional>

+         <attribute name="sortas">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="seeseealso.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="see">

+      <element name="see">

+         <ref name="see.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="see.attlist">

+      <ref name="common.attrib"/>

+      <ref name="seeseealso.role.attrib"/>

+   </define>

+   <define name="seealso">

+      <element name="seealso">

+         <ref name="seealso.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="seealso.attlist">

+      <ref name="common.attrib"/>

+      <ref name="seeseealso.role.attrib"/>

+   </define>

+   <define name="appendix.class">

+      <ref name="appendix"/>

+   </define>

+   <define name="article.class">

+      <ref name="article"/>

+   </define>

+   <define name="book.class">

+      <ref name="book"/>

+   </define>

+   <define name="chapter.class">

+      <ref name="chapter"/>

+   </define>

+   <define name="index.class">

+      <choice>

+         <ref name="index"/>

+         <ref name="setindex"/>

+      </choice>

+   </define>

+   <define name="refentry.class">

+      <ref name="refentry"/>

+   </define>

+   <define name="nav.class">

+      <choice>

+         <ref name="toc"/>

+         <ref name="lot"/>

+         <ref name="index"/>

+         <ref name="glossary"/>

+         <ref name="bibliography"/>

+      </choice>

+   </define>

+   <define name="divcomponent.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="compound.class"/>

+         <ref name="genobj.class"/>

+         <ref name="descobj.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="refcomponent.mix">

+      <choice>

+         <ref name="list.class"/>

+         <ref name="admon.class"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="formal.class"/>

+         <ref name="compound.class"/>

+         <ref name="genobj.class"/>

+         <ref name="descobj.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="indexdivcomponent.mix">

+      <choice>

+         <ref name="itemizedlist"/>

+         <ref name="orderedlist"/>

+         <ref name="variablelist"/>

+         <ref name="simplelist"/>

+         <ref name="linespecific.class"/>

+         <ref name="synop.class"/>

+         <ref name="para.class"/>

+         <ref name="informal.class"/>

+         <ref name="anchor"/>

+         <ref name="remark"/>

+         <ref name="link.char.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="refname.char.mix">

+      <ref name="tech.char.class"/>

+   </define>

+   <define name="partcontent.mix">

+      <choice>

+         <ref name="appendix.class"/>

+         <ref name="chapter.class"/>

+         <ref name="nav.class"/>

+         <ref name="article.class"/>

+         <ref name="preface"/>

+         <ref name="refentry.class"/>

+         <ref name="reference"/>

+      </choice>

+   </define>

+   <define name="refinline.char.mix">

+      <choice>

+         <ref name="xref.char.class"/>

+         <ref name="gen.char.class"/>

+         <ref name="link.char.class"/>

+         <ref name="tech.char.class"/>

+         <ref name="base.char.class"/>

+         <ref name="docinfo.char.class"/>

+         <ref name="other.char.class"/>

+         <ref name="ndxterm.class"/>

+         <ref name="beginpage"/>

+      </choice>

+   </define>

+   <define name="refclass.char.mix">

+      <ref name="application"/>

+   </define>

+   <define name="div.title.content">

+      <ref name="title"/>

+      <optional>

+         <ref name="subtitle"/>

+      </optional>

+      <optional>

+         <ref name="titleabbrev"/>

+      </optional>

+   </define>

+   <define name="bookcomponent.title.content">

+      <ref name="title"/>

+      <optional>

+         <ref name="subtitle"/>

+      </optional>

+      <optional>

+         <ref name="titleabbrev"/>

+      </optional>

+   </define>

+   <define name="sect.title.content">

+      <ref name="title"/>

+      <optional>

+         <ref name="subtitle"/>

+      </optional>

+      <optional>

+         <ref name="titleabbrev"/>

+      </optional>

+   </define>

+   <define name="refsect.title.content">

+      <ref name="title"/>

+      <optional>

+         <ref name="subtitle"/>

+      </optional>

+      <optional>

+         <ref name="titleabbrev"/>

+      </optional>

+   </define>

+   <define name="bookcomponent.content">

+      <choice>

+         <group>

+            <oneOrMore>

+               <ref name="divcomponent.mix"/>

+            </oneOrMore>

+            <choice>

+               <zeroOrMore>

+                  <ref name="sect1"/>

+               </zeroOrMore>

+               <zeroOrMore>

+                  <ref name="refentry.class"/>

+               </zeroOrMore>

+               <zeroOrMore>

+                  <ref name="simplesect"/>

+               </zeroOrMore>

+               <zeroOrMore>

+                  <ref name="section"/>

+               </zeroOrMore>

+            </choice>

+         </group>

+         <choice>

+            <oneOrMore>

+               <ref name="sect1"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="refentry.class"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="simplesect"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="section"/>

+            </oneOrMore>

+         </choice>

+      </choice>

+   </define>

+   <define name="set.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="set">

+      <element name="set">

+         <ref name="set.attlist"/>

+         <optional>

+            <ref name="div.title.content"/>

+         </optional>

+         <optional>

+            <ref name="setinfo"/>

+         </optional>

+         <optional>

+            <ref name="toc"/>

+         </optional>

+         <oneOrMore>

+            <ref name="book.class"/>

+         </oneOrMore>

+         <optional>

+            <ref name="setindex"/>

+         </optional>

+      </element>

+   </define>

+   <define name="set.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="set.role.attrib"/>

+      <optional>

+         <attribute name="fpi">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="setinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="setinfo">

+      <element name="setinfo">

+         <ref name="setinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="setinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="setinfo.role.attrib"/>

+      <optional>

+         <attribute name="contents">

+            <data type="IDREFS"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="book.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="book">

+      <element name="book">

+         <ref name="book.attlist"/>

+         <optional>

+            <ref name="div.title.content"/>

+         </optional>

+         <optional>

+            <ref name="bookinfo"/>

+         </optional>

+         <zeroOrMore>

+            <choice>

+               <ref name="dedication"/>

+               <ref name="toc"/>

+               <ref name="lot"/>

+               <ref name="glossary"/>

+               <ref name="bibliography"/>

+               <ref name="preface"/>

+               <ref name="chapter.class"/>

+               <ref name="reference"/>

+               <ref name="part"/>

+               <ref name="article.class"/>

+               <ref name="appendix.class"/>

+               <ref name="index.class"/>

+               <ref name="colophon"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="book.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="book.role.attrib"/>

+      <optional>

+         <attribute name="fpi">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="bookinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bookinfo">

+      <element name="bookinfo">

+         <ref name="bookinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="bookinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="bookinfo.role.attrib"/>

+      <optional>

+         <attribute name="contents">

+            <data type="IDREFS"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="dedication.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="dedication">

+      <element name="dedication">

+         <ref name="dedication.attlist"/>

+         <optional>

+            <ref name="sect.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="legalnotice.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="dedication.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="dedication.role.attrib"/>

+   </define>

+   <define name="colophon.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="colophon">

+      <element name="colophon">

+         <ref name="colophon.attlist"/>

+         <optional>

+            <ref name="sect.title.content"/>

+         </optional>

+         <oneOrMore>

+            <ref name="textobject.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="colophon.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="colophon.role.attrib"/>

+   </define>

+   <define name="toc.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toc">

+      <element name="toc">

+         <ref name="toc.attlist"/>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="tocfront"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <choice>

+               <ref name="tocpart"/>

+               <ref name="tocchap"/>

+            </choice>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="tocback"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="toc.attlist">

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="toc.role.attrib"/>

+   </define>

+   <define name="tocfront.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="tocfront">

+      <element name="tocfront">

+         <ref name="tocfront.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="tocfront.attlist">

+      <ref name="label.attrib"/>

+      <ref name="linkend.attrib"/>

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="tocfront.role.attrib"/>

+   </define>

+   <define name="tocentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="tocentry">

+      <element name="tocentry">

+         <ref name="tocentry.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="tocentry.attlist">

+      <ref name="linkend.attrib"/>

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="tocentry.role.attrib"/>

+   </define>

+   <define name="tocpart.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="tocpart">

+      <element name="tocpart">

+         <ref name="tocpart.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="tocchap"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="tocpart.attlist">

+      <ref name="common.attrib"/>

+      <ref name="tocpart.role.attrib"/>

+   </define>

+   <define name="tocchap.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="tocchap">

+      <element name="tocchap">

+         <ref name="tocchap.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="toclevel1"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="tocchap.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="tocchap.role.attrib"/>

+   </define>

+   <define name="toclevel1.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toclevel1">

+      <element name="toclevel1">

+         <ref name="toclevel1.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="toclevel2"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="toclevel1.attlist">

+      <ref name="common.attrib"/>

+      <ref name="toclevel1.role.attrib"/>

+   </define>

+   <define name="toclevel2.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toclevel2">

+      <element name="toclevel2">

+         <ref name="toclevel2.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="toclevel3"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="toclevel2.attlist">

+      <ref name="common.attrib"/>

+      <ref name="toclevel2.role.attrib"/>

+   </define>

+   <define name="toclevel3.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toclevel3">

+      <element name="toclevel3">

+         <ref name="toclevel3.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="toclevel4"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="toclevel3.attlist">

+      <ref name="common.attrib"/>

+      <ref name="toclevel3.role.attrib"/>

+   </define>

+   <define name="toclevel4.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toclevel4">

+      <element name="toclevel4">

+         <ref name="toclevel4.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+         <zeroOrMore>

+            <ref name="toclevel5"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="toclevel4.attlist">

+      <ref name="common.attrib"/>

+      <ref name="toclevel4.role.attrib"/>

+   </define>

+   <define name="toclevel5.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="toclevel5">

+      <element name="toclevel5">

+         <ref name="toclevel5.attlist"/>

+         <oneOrMore>

+            <ref name="tocentry"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="toclevel5.attlist">

+      <ref name="common.attrib"/>

+      <ref name="toclevel5.role.attrib"/>

+   </define>

+   <define name="tocback.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="tocback">

+      <element name="tocback">

+         <ref name="tocback.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="tocback.attlist">

+      <ref name="label.attrib"/>

+      <ref name="linkend.attrib"/>

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="tocback.role.attrib"/>

+   </define>

+   <define name="lot.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="lot">

+      <element name="lot">

+         <ref name="lot.attlist"/>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="lotentry"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="lot.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="lot.role.attrib"/>

+   </define>

+   <define name="lotentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="lotentry">

+      <element name="lotentry">

+         <ref name="lotentry.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="para.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="lotentry.attlist">

+      <ref name="pagenum.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="linkend.attrib"/>

+      <ref name="lotentry.role.attrib"/>

+      <optional>

+         <attribute name="srccredit">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="appendix.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="appendix">

+      <element name="appendix">

+         <ref name="appendix.attlist"/>

+         <optional>

+            <ref name="appendixinfo"/>

+         </optional>

+         <ref name="bookcomponent.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="tocchap"/>

+         </optional>

+         <ref name="bookcomponent.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="appendix.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="appendix.role.attrib"/>

+   </define>

+   <define name="chapter.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="chapter">

+      <element name="chapter">

+         <ref name="chapter.attlist"/>

+         <optional>

+            <ref name="chapterinfo"/>

+         </optional>

+         <ref name="bookcomponent.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="tocchap"/>

+         </optional>

+         <ref name="bookcomponent.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="chapter.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="chapter.role.attrib"/>

+   </define>

+   <define name="part.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="part">

+      <element name="part">

+         <ref name="part.attlist"/>

+         <optional>

+            <ref name="partinfo"/>

+         </optional>

+         <ref name="bookcomponent.title.content"/>

+         <optional>

+            <ref name="partintro"/>

+         </optional>

+         <oneOrMore>

+            <ref name="partcontent.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="part.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="part.role.attrib"/>

+   </define>

+   <define name="preface.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="preface">

+      <element name="preface">

+         <ref name="preface.attlist"/>

+         <optional>

+            <ref name="prefaceinfo"/>

+         </optional>

+         <ref name="bookcomponent.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="tocchap"/>

+         </optional>

+         <ref name="bookcomponent.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="preface.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="preface.role.attrib"/>

+   </define>

+   <define name="reference.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="reference">

+      <element name="reference">

+         <ref name="reference.attlist"/>

+         <optional>

+            <ref name="referenceinfo"/>

+         </optional>

+         <ref name="bookcomponent.title.content"/>

+         <optional>

+            <ref name="partintro"/>

+         </optional>

+         <oneOrMore>

+            <ref name="refentry.class"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="reference.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="reference.role.attrib"/>

+   </define>

+   <define name="partintro.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="partintro">

+      <element name="partintro">

+         <ref name="partintro.attlist"/>

+         <optional>

+            <ref name="div.title.content"/>

+         </optional>

+         <ref name="bookcomponent.content"/>

+      </element>

+   </define>

+   <define name="partintro.attlist">

+      <ref name="label.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="partintro.role.attrib"/>

+   </define>

+   <define name="appendixinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="appendixinfo">

+      <element name="appendixinfo">

+         <ref name="appendixinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="appendixinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="appendixinfo.role.attrib"/>

+   </define>

+   <define name="bibliographyinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliographyinfo">

+      <element name="bibliographyinfo">

+         <ref name="bibliographyinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="bibliographyinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="bibliographyinfo.role.attrib"/>

+   </define>

+   <define name="chapterinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="chapterinfo">

+      <element name="chapterinfo">

+         <ref name="chapterinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="chapterinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="chapterinfo.role.attrib"/>

+   </define>

+   <define name="glossaryinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossaryinfo">

+      <element name="glossaryinfo">

+         <ref name="glossaryinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="glossaryinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="glossaryinfo.role.attrib"/>

+   </define>

+   <define name="indexinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="indexinfo">

+      <element name="indexinfo">

+         <ref name="indexinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="indexinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexinfo.role.attrib"/>

+   </define>

+   <define name="setindexinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="setindexinfo">

+      <element name="setindexinfo">

+         <ref name="setindexinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="setindexinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="setindexinfo.role.attrib"/>

+   </define>

+   <define name="partinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="partinfo">

+      <element name="partinfo">

+         <ref name="partinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="partinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="partinfo.role.attrib"/>

+   </define>

+   <define name="prefaceinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="prefaceinfo">

+      <element name="prefaceinfo">

+         <ref name="prefaceinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="prefaceinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="prefaceinfo.role.attrib"/>

+   </define>

+   <define name="refentryinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refentryinfo">

+      <element name="refentryinfo">

+         <ref name="refentryinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="refentryinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refentryinfo.role.attrib"/>

+   </define>

+   <define name="refsect1info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect1info">

+      <element name="refsect1info">

+         <ref name="refsect1info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="refsect1info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refsect1info.role.attrib"/>

+   </define>

+   <define name="refsect2info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect2info">

+      <element name="refsect2info">

+         <ref name="refsect2info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="refsect2info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refsect2info.role.attrib"/>

+   </define>

+   <define name="refsect3info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect3info">

+      <element name="refsect3info">

+         <ref name="refsect3info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="refsect3info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refsect3info.role.attrib"/>

+   </define>

+   <define name="refsynopsisdivinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsynopsisdivinfo">

+      <element name="refsynopsisdivinfo">

+         <ref name="refsynopsisdivinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="refsynopsisdivinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refsynopsisdivinfo.role.attrib"/>

+   </define>

+   <define name="referenceinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="referenceinfo">

+      <element name="referenceinfo">

+         <ref name="referenceinfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="referenceinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="referenceinfo.role.attrib"/>

+   </define>

+   <define name="sect1info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect1info">

+      <element name="sect1info">

+         <ref name="sect1info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sect1info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sect1info.role.attrib"/>

+   </define>

+   <define name="sect2info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect2info">

+      <element name="sect2info">

+         <ref name="sect2info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sect2info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sect2info.role.attrib"/>

+   </define>

+   <define name="sect3info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect3info">

+      <element name="sect3info">

+         <ref name="sect3info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sect3info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sect3info.role.attrib"/>

+   </define>

+   <define name="sect4info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect4info">

+      <element name="sect4info">

+         <ref name="sect4info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sect4info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sect4info.role.attrib"/>

+   </define>

+   <define name="sect5info.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect5info">

+      <element name="sect5info">

+         <ref name="sect5info.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sect5info.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sect5info.role.attrib"/>

+   </define>

+   <define name="section.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="section">

+      <element name="section">

+         <ref name="section.attlist"/>

+         <optional>

+            <ref name="sectioninfo"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="section"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="section"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="section.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="section.role.attrib"/>

+   </define>

+   <define name="sectioninfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sectioninfo">

+      <element name="sectioninfo">

+         <ref name="sectioninfo.attlist"/>

+         <ref name="infoContentModel"/>

+      </element>

+   </define>

+   <define name="sectioninfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="sectioninfo.role.attrib"/>

+   </define>

+   <define name="sect1.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect1">

+      <element name="sect1">

+         <ref name="sect1.attlist"/>

+         <optional>

+            <ref name="sect1info"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="sect2"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="simplesect"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="sect2"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="simplesect"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="sect1.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="sect1.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>sect2</value>

+               <value>sect3</value>

+               <value>sect4</value>

+               <value>sect5</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sect2.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect2">

+      <element name="sect2">

+         <ref name="sect2.attlist"/>

+         <optional>

+            <ref name="sect2info"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="sect3"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="simplesect"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="sect3"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="simplesect"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="sect2.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="sect2.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>sect1</value>

+               <value>sect3</value>

+               <value>sect4</value>

+               <value>sect5</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sect3.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect3">

+      <element name="sect3">

+         <ref name="sect3.attlist"/>

+         <optional>

+            <ref name="sect3info"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="sect4"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="simplesect"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="sect4"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="simplesect"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="sect3.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="sect3.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>sect1</value>

+               <value>sect2</value>

+               <value>sect4</value>

+               <value>sect5</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sect4.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect4">

+      <element name="sect4">

+         <ref name="sect4.attlist"/>

+         <optional>

+            <ref name="sect4info"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="sect5"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="simplesect"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="sect5"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="simplesect"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="sect4.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="sect4.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>sect1</value>

+               <value>sect2</value>

+               <value>sect3</value>

+               <value>sect5</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="sect5.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="sect5">

+      <element name="sect5">

+         <ref name="sect5.attlist"/>

+         <optional>

+            <ref name="sect5info"/>

+         </optional>

+         <ref name="sect.title.content"/>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="divcomponent.mix"/>

+               </oneOrMore>

+               <choice>

+                  <zeroOrMore>

+                     <ref name="refentry.class"/>

+                  </zeroOrMore>

+                  <zeroOrMore>

+                     <ref name="simplesect"/>

+                  </zeroOrMore>

+               </choice>

+            </group>

+            <choice>

+               <oneOrMore>

+                  <ref name="refentry.class"/>

+               </oneOrMore>

+               <oneOrMore>

+                  <ref name="simplesect"/>

+               </oneOrMore>

+            </choice>

+         </choice>

+         <zeroOrMore>

+            <ref name="nav.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="sect5.attlist">

+      <ref name="label.attrib"/>

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="sect5.role.attrib"/>

+      <optional>

+         <attribute name="renderas">

+            <choice>

+               <value>sect1</value>

+               <value>sect2</value>

+               <value>sect3</value>

+               <value>sect4</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="simplesect.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="simplesect">

+      <element name="simplesect">

+         <ref name="simplesect.attlist"/>

+         <ref name="sect.title.content"/>

+         <oneOrMore>

+            <ref name="divcomponent.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="simplesect.attlist">

+      <ref name="common.attrib"/>

+      <ref name="simplesect.role.attrib"/>

+   </define>

+   <define name="bibliography.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliography">

+      <element name="bibliography">

+         <ref name="bibliography.attlist"/>

+         <zeroOrMore>

+            <ref name="bibliographyinfo"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="bibliodiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <choice>

+                  <ref name="biblioentry"/>

+                  <ref name="bibliomixed"/>

+               </choice>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="bibliography.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="bibliography.role.attrib"/>

+   </define>

+   <define name="bibliodiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="bibliodiv">

+      <element name="bibliodiv">

+         <ref name="bibliodiv.attlist"/>

+         <optional>

+            <ref name="sect.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <oneOrMore>

+            <choice>

+               <ref name="biblioentry"/>

+               <ref name="bibliomixed"/>

+            </choice>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="bibliodiv.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="bibliodiv.role.attrib"/>

+   </define>

+   <define name="glossary.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossary">

+      <element name="glossary">

+         <ref name="glossary.attlist"/>

+         <zeroOrMore>

+            <ref name="glossaryinfo"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="glossdiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="glossentry"/>

+            </oneOrMore>

+         </choice>

+         <optional>

+            <ref name="bibliography"/>

+         </optional>

+      </element>

+   </define>

+   <define name="glossary.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="glossary.role.attrib"/>

+   </define>

+   <define name="glossdiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="glossdiv">

+      <element name="glossdiv">

+         <ref name="glossdiv.attlist"/>

+         <optional>

+            <ref name="sect.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <oneOrMore>

+            <ref name="glossentry"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="glossdiv.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="glossdiv.role.attrib"/>

+   </define>

+   <define name="indexes.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="index">

+      <element name="index">

+         <ref name="index.attlist"/>

+         <zeroOrMore>

+            <ref name="indexinfo"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="indexdiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="indexentry"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="index.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexes.role.attrib"/>

+   </define>

+   <define name="setindex">

+      <element name="setindex">

+         <ref name="setindex.attlist"/>

+         <zeroOrMore>

+            <ref name="setindexinfo"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="bookcomponent.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="component.mix"/>

+         </zeroOrMore>

+         <choice>

+            <oneOrMore>

+               <ref name="indexdiv"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="indexentry"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="setindex.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexes.role.attrib"/>

+   </define>

+   <define name="indexdiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="indexdiv">

+      <element name="indexdiv">

+         <ref name="indexdiv.attlist"/>

+         <optional>

+            <ref name="sect.title.content"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="indexdivcomponent.mix"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="indexentry"/>

+         </zeroOrMore>

+         <ref name="segmentedlist"/>

+      </element>

+   </define>

+   <define name="indexdiv.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexdiv.role.attrib"/>

+   </define>

+   <define name="indexentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="indexentry">

+      <element name="indexentry">

+         <ref name="indexentry.attlist"/>

+         <ref name="primaryie"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="seeie"/>

+               <ref name="seealsoie"/>

+            </choice>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="secondaryie"/>

+            <zeroOrMore>

+               <choice>

+                  <ref name="seeie"/>

+                  <ref name="seealsoie"/>

+                  <ref name="tertiaryie"/>

+               </choice>

+            </zeroOrMore>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="indexentry.attlist">

+      <ref name="common.attrib"/>

+      <ref name="indexentry.role.attrib"/>

+   </define>

+   <define name="primsecterie.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="primaryie">

+      <element name="primaryie">

+         <ref name="primaryie.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="primaryie.attlist">

+      <ref name="linkends.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="primsecterie.role.attrib"/>

+   </define>

+   <define name="secondaryie">

+      <element name="secondaryie">

+         <ref name="secondaryie.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="secondaryie.attlist">

+      <ref name="linkends.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="primsecterie.role.attrib"/>

+   </define>

+   <define name="tertiaryie">

+      <element name="tertiaryie">

+         <ref name="tertiaryie.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="tertiaryie.attlist">

+      <ref name="linkends.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="primsecterie.role.attrib"/>

+   </define>

+   <define name="seeie.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="seeie">

+      <element name="seeie">

+         <ref name="seeie.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="ndxterm.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="seeie.attlist">

+      <ref name="linkend.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="seeie.role.attrib"/>

+   </define>

+   <define name="seealsoie.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="seealsoie">

+      <element name="seealsoie">

+         <ref name="seealsoie.attlist"/>

+         <zeroOrMore>

+            <ref name="ndxterm.char.mix"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="seealsoie.attlist">

+      <ref name="linkends.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="seealsoie.role.attrib"/>

+   </define>

+   <define name="refentry.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refentry">

+      <element name="refentry">

+         <ref name="refentry.attlist"/>

+         <zeroOrMore>

+            <ref name="ndxterm.class"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="refentryinfo"/>

+         </optional>

+         <optional>

+            <ref name="refmeta"/>

+         </optional>

+         <zeroOrMore>

+            <choice>

+               <ref name="remark"/>

+               <ref name="link.char.class"/>

+            </choice>

+         </zeroOrMore>

+         <ref name="refnamediv"/>

+         <optional>

+            <ref name="refsynopsisdiv"/>

+         </optional>

+         <oneOrMore>

+            <ref name="refsect1"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="refentry.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="refentry.role.attrib"/>

+   </define>

+   <define name="refmeta.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refmeta">

+      <element name="refmeta">

+         <ref name="refmeta.attlist"/>

+         <zeroOrMore>

+            <ref name="ndxterm.class"/>

+         </zeroOrMore>

+         <ref name="refentrytitle"/>

+         <optional>

+            <ref name="manvolnum"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="refmiscinfo"/>

+         </zeroOrMore>

+         <zeroOrMore>

+            <ref name="ndxterm.class"/>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="refmeta.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refmeta.role.attrib"/>

+   </define>

+   <define name="refmiscinfo.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refmiscinfo">

+      <element name="refmiscinfo">

+         <ref name="refmiscinfo.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="docinfo.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refmiscinfo.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refmiscinfo.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <data type="string"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="refnamediv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refnamediv">

+      <element name="refnamediv">

+         <ref name="refnamediv.attlist"/>

+         <optional>

+            <ref name="refdescriptor"/>

+         </optional>

+         <oneOrMore>

+            <ref name="refname"/>

+         </oneOrMore>

+         <ref name="refpurpose"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="remark"/>

+               <ref name="link.char.class"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="refnamediv.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refnamediv.role.attrib"/>

+   </define>

+   <define name="refdescriptor.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refdescriptor">

+      <element name="refdescriptor">

+         <ref name="refdescriptor.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="refname.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refdescriptor.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refdescriptor.role.attrib"/>

+   </define>

+   <define name="refname.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refname">

+      <element name="refname">

+         <ref name="refname.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="refname.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refname.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refname.role.attrib"/>

+   </define>

+   <define name="refpurpose.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refpurpose">

+      <element name="refpurpose">

+         <ref name="refpurpose.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="refinline.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refpurpose.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refpurpose.role.attrib"/>

+   </define>

+   <define name="refclass.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refclass">

+      <element name="refclass">

+         <ref name="refclass.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <ref name="refclass.char.mix"/>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="refclass.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refclass.role.attrib"/>

+   </define>

+   <define name="refsynopsisdiv.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsynopsisdiv">

+      <element name="refsynopsisdiv">

+         <ref name="refsynopsisdiv.attlist"/>

+         <optional>

+            <ref name="refsynopsisdivinfo"/>

+         </optional>

+         <optional>

+            <ref name="refsect.title.content"/>

+         </optional>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="refcomponent.mix"/>

+               </oneOrMore>

+               <zeroOrMore>

+                  <ref name="refsect2"/>

+               </zeroOrMore>

+            </group>

+            <oneOrMore>

+               <ref name="refsect2"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="refsynopsisdiv.attlist">

+      <ref name="common.attrib"/>

+      <ref name="refsynopsisdiv.role.attrib"/>

+   </define>

+   <define name="refsect1.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect1">

+      <element name="refsect1">

+         <ref name="refsect1.attlist"/>

+         <optional>

+            <ref name="refsect1info"/>

+         </optional>

+         <ref name="refsect.title.content"/>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="refcomponent.mix"/>

+               </oneOrMore>

+               <zeroOrMore>

+                  <ref name="refsect2"/>

+               </zeroOrMore>

+            </group>

+            <oneOrMore>

+               <ref name="refsect2"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="refsect1.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="refsect1.role.attrib"/>

+   </define>

+   <define name="refsect2.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect2">

+      <element name="refsect2">

+         <ref name="refsect2.attlist"/>

+         <optional>

+            <ref name="refsect2info"/>

+         </optional>

+         <ref name="refsect.title.content"/>

+         <choice>

+            <group>

+               <oneOrMore>

+                  <ref name="refcomponent.mix"/>

+               </oneOrMore>

+               <zeroOrMore>

+                  <ref name="refsect3"/>

+               </zeroOrMore>

+            </group>

+            <oneOrMore>

+               <ref name="refsect3"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="refsect2.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="refsect2.role.attrib"/>

+   </define>

+   <define name="refsect3.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="refsect3">

+      <element name="refsect3">

+         <ref name="refsect3.attlist"/>

+         <optional>

+            <ref name="refsect3info"/>

+         </optional>

+         <ref name="refsect.title.content"/>

+         <oneOrMore>

+            <ref name="refcomponent.mix"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="refsect3.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="refsect3.role.attrib"/>

+   </define>

+   <define name="article.role.attrib">

+      <ref name="role.attrib"/>

+   </define>

+   <define name="article">

+      <element name="article">

+         <ref name="article.attlist"/>

+         <optional>

+            <ref name="div.title.content"/>

+         </optional>

+         <optional>

+            <ref name="articleinfo"/>

+         </optional>

+         <optional>

+            <ref name="tocchap"/>

+         </optional>

+         <zeroOrMore>

+            <ref name="lot"/>

+         </zeroOrMore>

+         <ref name="bookcomponent.content"/>

+         <zeroOrMore>

+            <choice>

+               <ref name="nav.class"/>

+               <ref name="appendix.class"/>

+               <ref name="ackno"/>

+            </choice>

+         </zeroOrMore>

+      </element>

+   </define>

+   <define name="article.attlist">

+      <ref name="status.attrib"/>

+      <ref name="common.attrib"/>

+      <ref name="article.role.attrib"/>

+      <optional>

+         <attribute name="class">

+            <choice>

+               <value>journalarticle</value>

+               <value>productsheet</value>

+               <value>whitepaper</value>

+               <value>techreport</value>

+               <value>specification</value>

+               <value>faq</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="parentbook">

+            <data type="IDREF"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="table.att">

+      <empty/>

+   </define>

+   <define name="tgroup.att">

+      <empty/>

+   </define>

+   <define name="colspec.att">

+      <empty/>

+   </define>

+   <define name="thead.att">

+      <empty/>

+   </define>

+   <define name="tbody.att">

+      <empty/>

+   </define>

+   <define name="row.att">

+      <empty/>

+   </define>

+   <define name="entry.att">

+      <empty/>

+   </define>

+   <define name="table">

+      <element name="table">

+         <ref name="table.attlist"/>

+         <ref name="formalobject.title.content"/>

+         <optional>

+            <ref name="ndxterm.class"/>

+         </optional>

+         <choice>

+            <oneOrMore>

+               <ref name="graphic"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="mediaobject"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="tgroup"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="table.attlist">

+      <ref name="table.att"/>

+      <optional>

+         <attribute name="frame">

+            <choice>

+               <value>top</value>

+               <value>bottom</value>

+               <value>topbot</value>

+               <value>all</value>

+               <value>sides</value>

+               <value>none</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="informaltable">

+      <element name="informaltable">

+         <ref name="informaltable.attlist"/>

+         <choice>

+            <oneOrMore>

+               <ref name="graphic"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="mediaobject"/>

+            </oneOrMore>

+            <oneOrMore>

+               <ref name="tgroup"/>

+            </oneOrMore>

+         </choice>

+      </element>

+   </define>

+   <define name="informaltable.attlist">

+      <ref name="table.att"/>

+      <optional>

+         <attribute name="frame">

+            <choice>

+               <value>top</value>

+               <value>bottom</value>

+               <value>topbot</value>

+               <value>all</value>

+               <value>sides</value>

+               <value>none</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="tgroup">

+      <element name="tgroup">

+         <ref name="tgroup.attlist"/>

+         <zeroOrMore>

+            <ref name="colspec"/>

+         </zeroOrMore>

+         <optional>

+            <ref name="thead"/>

+         </optional>

+         <ref name="tbody"/>

+      </element>

+   </define>

+   <define name="tgroup.attlist">

+      <ref name="tgroup.att"/>

+      <attribute name="cols">

+         <data type="integer"/>

+      </attribute>

+      <optional>

+         <attribute name="colsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+               <value>justify</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="colspec">

+      <element name="colspec">

+         <ref name="colspec.attlist"/>

+      </element>

+   </define>

+   <define name="colspec.attlist">

+      <ref name="colspec.att"/>

+      <optional>

+         <attribute name="colnum">

+            <data type="integer"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colname">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colwidth">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+               <value>justify</value>

+               <value>char</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="char">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="charoff">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+   </define>

+   <define name="thead">

+      <element name="thead">

+         <ref name="thead.attlist"/>

+         <oneOrMore>

+            <ref name="row"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="thead.attlist">

+      <ref name="thead.att"/>

+      <optional>

+         <attribute name="valign">

+            <choice>

+               <value>top</value>

+               <value>middle</value>

+               <value>bottom</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="tbody">

+      <element name="tbody">

+         <ref name="tbody.attlist"/>

+         <oneOrMore>

+            <ref name="row"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="tbody.attlist">

+      <ref name="tbody.att"/>

+      <optional>

+         <attribute name="valign">

+            <choice>

+               <value>top</value>

+               <value>middle</value>

+               <value>bottom</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="row">

+      <element name="row">

+         <ref name="row.attlist"/>

+         <oneOrMore>

+            <ref name="entry"/>

+         </oneOrMore>

+      </element>

+   </define>

+   <define name="row.attlist">

+      <ref name="row.att"/>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="valign">

+            <choice>

+               <value>top</value>

+               <value>middle</value>

+               <value>bottom</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+   <define name="entry">

+      <element name="entry">

+         <ref name="entry.attlist"/>

+         <mixed>

+            <zeroOrMore>

+               <choice>

+                  <ref name="para.char.mix"/>

+                  <ref name="tabentry.mix"/>

+               </choice>

+            </zeroOrMore>

+         </mixed>

+      </element>

+   </define>

+   <define name="entry.attlist">

+      <ref name="entry.att"/>

+      <optional>

+         <attribute name="colname">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="namest">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="nameend">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="morerows">

+            <data type="integer"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="colsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="rowsep">

+            <choice>

+               <value>0</value>

+               <value>1</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="align">

+            <choice>

+               <value>left</value>

+               <value>right</value>

+               <value>center</value>

+               <value>justify</value>

+               <value>char</value>

+            </choice>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="char">

+            <data type="string"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="charoff">

+            <data type="NMTOKEN"/>

+         </attribute>

+      </optional>

+      <optional>

+         <attribute name="valign">

+            <choice>

+               <value>top</value>

+               <value>middle</value>

+               <value>bottom</value>

+            </choice>

+         </attribute>

+      </optional>

+   </define>

+</grammar>

diff --git a/test/relaxng/docbook_0.xml b/test/relaxng/docbook_0.xml
new file mode 100644
index 0000000..6fe6253
--- /dev/null
+++ b/test/relaxng/docbook_0.xml
@@ -0,0 +1,4448 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+    "../dtd/4.1.2/docbookx.dtd" [
+<!ENTITY version "1.0.53">
+<!ENTITY mdash  "--">
+<!ENTITY hellip "...">
+        <!-- replace version above with actual application version number-->
+	<!--  Template Version: 1.0.1  (do not remove this line) -->
+
+
+
+<!ENTITY APPLET-TEMPLATE-1x-SHELL SYSTEM
+"templates/applet_template_1-applet.sgml.cdata">
+<!ENTITY APPLET-TEMPLATE-1x SYSTEM
+"templates/applet_template_1.sgml.cdata">
+]>
+
+<!--  Version: 1.0.1  -->
+
+<article id="index">
+  <articleinfo>
+
+    <authorgroup>
+
+      <author>
+        <firstname>David</firstname>
+        <surname>Mason</surname>
+        <affiliation>
+          <orgname>Red Hat, Inc.</orgname>
+          <address>
+            <email>dcm@redhat.com</email>
+          </address>
+        </affiliation>
+      </author>
+
+      <author>
+        <firstname>Daniel</firstname>
+        <surname>Mueth</surname>
+        <affiliation>
+          <address>
+            <email>d-mueth@uchicago.edu</email>
+          </address>
+        </affiliation>
+      </author>
+
+      <author>
+        <firstname>Alexander</firstname>
+        <surname>Kirillov</surname>
+        <affiliation>
+          <address>
+            <email>kirillov@math.sunysb.edu</email>
+          </address>
+        </affiliation>
+      </author>
+
+    </authorgroup>
+
+    <releaseinfo>
+      This is a pre-release!
+    </releaseinfo>
+    
+    <revhistory>
+      <revision>
+        <revnumber>
+          0.99
+        </revnumber>
+        <date>
+         04.10.2000
+        </date>
+      </revision>
+    </revhistory>
+    
+    <copyright>
+      <year>2000</year>
+      <holder>Red Hat, Inc., Daniel Mueth, and Alexander Kirillov</holder>
+    </copyright>
+
+    <legalnotice>
+     <para>
+      Permission is granted to copy, distribute and/or modify this
+      document under the terms of the <citetitle>GNU Free Documentation
+      License</citetitle>, Version 1.1 or any later version published
+      by the Free Software Foundation with no Invariant Sections, no
+      Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
+      of the <citetitle>GNU Free Documentation License</citetitle> from
+      the Free Software Foundation by visiting <ulink type="http"
+      url="http://www.fsf.org">their Web site</ulink> or by writing to:
+      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+      Boston, MA 02111-1307, USA.
+     </para>
+     <para>
+      Many of the names used by companies to distinguish their products and
+      services are claimed as trademarks. Where those names appear in any
+      GNOME documentation, and those trademarks are made aware to the members
+      of the GNOME Documentation Project, the names have been printed in caps
+      or initial caps.
+     </para>
+    </legalnotice>
+
+    <title>The GNOME Handbook of Writing Software Documentation</title>
+
+  </articleinfo>
+  
+  <!-- ################# Introduction ############### -->
+
+  <sect1 id="intro">
+    <title>Introduction</title>
+
+    <!-- ####### Introduction | The GNOME Documentation Project ####### -->
+
+    <sect2 id="gdp">
+      <title>The GNOME Documentation Project</title>
+
+      <sect3 id="goals">
+        <title>Goals</title>
+        <para>
+          The GNOME Documentation Project (GDP) aims to provide GNOME
+          and GNOME applications with a complete, intuitive, and clear
+          documentation system.  At the center of the GDP is the
+          <application>GNOME Help Browser</application>, which
+          presents a unified interface to GNOME-specific documentation
+          as well as other Linux documentation such as man pages and
+          texinfo documents. The GNOME Help System provides a
+          comprehensive view of documentation on a machine by
+          dynamically assembling the documentation of GNOME
+          applications and components which are installed. The GDP is
+          responsible for writing numerous GNOME-related documents,
+          both for developers and for users.  Developer documentation
+          includes <ulink url="http://developer.gnome.org/doc/API/"
+          type="http">APIs for the GNOME libraries</ulink>, <ulink
+          url="http://developer.gnome.org/doc/whitepapers/"
+          type="http"><citetitle>GNOME White
+          Papers</citetitle></ulink>, GNOME developer <ulink
+          url="http://developer.gnome.org/doc/tutorials/"
+          type="http">tutorials</ulink>, the <ulink
+          url="http://developer.gnome.org/doc/FAQ/"
+          type="http"><citetitle>GNOME Developer
+          FAQ</citetitle></ulink>, the <ulink
+          url="http://developer.gnome.org" type="http">GNOME
+          Developer's Website</ulink>, and <citetitle>GNOME
+          Handbook</citetitle>'s, such as the one you are reading.
+          User documentation include the <ulink
+          url="http://www.gnome.org/learn/"
+          type="http"><citetitle>GNOME User's
+          Guide</citetitle></ulink>, the <ulink
+          url="http://www.gnome.org/learn/"
+          type="http"><citetitle>GNOME FAQ</citetitle></ulink>, and
+          GNOME application documentation.  Most GNOME applications
+          have their own manual in addition to context sensitive help.
+        </para>
+      </sect3>
+
+      <sect3 id="joining">
+       <title>Joining the GDP</title>
+       <para>
+         Documenting GNOME and all the numerous GNOME applications is
+         a very large project.  The GDP is always looking for people
+         to help write, update, and edit documentation.  If you are
+         interested in joining the GDP team, you should join the
+         <ulink url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+         <citetitle>gnome-doc-list mailing list</citetitle> </ulink>.
+         Read <xref linkend="gettingstarted" />, for help selecting a
+         project to work on.  Feel free to introduce yourself on the
+         gnome-doc-list mailing list and indicate which project you
+         intend to work on, or else ask for suggestions of important
+         documents which need work done. You may also want to join the
+         #docs IRC channel on irc.gnome.org to meet other GDP members
+         and discuss any questions you may have.  For a list of GDP
+         projects and members, see the
+         <ulink url="http://developer.gnome.org/projects/gdp">
+           <citetitle>GDP Website</citetitle></ulink>.
+       </para>
+      </sect3>
+
+      <sect3 id="collaborating">
+       <title>Collaborating with the GDP</title>
+       <para>
+        GNOME developers, packagers, and translators may not be
+        writing GNOME documentation but will want to understand how
+        the GNOME documentation system works and will need to
+        collaborate with GDP members.  This document should help to
+        outline the structure of how the GNOME documentation system
+        works.  Developers who do not write the documentation for
+        their applications are encouraged to find a GDP member to
+        write the documentation.  This is best done by sending an
+        email to the <ulink
+        url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+        <citetitle>gnome-doc-list mailing list</citetitle> </ulink>
+        describing the application, where it can be downloaded from,
+        and that the developer(s) would like a GDP member to write
+        documentation for the application. The #docs IRC channel on
+        irc.gnome.org is another option for contacting GDP members.
+       </para>
+      </sect3>
+    </sect2>
+
+    <!-- ####### Introduction | Notation and Conventions  ####### -->
+
+    <sect2 id="notation">
+      <title>Notation and Conventions</title>
+      <para>
+        This Handbook uses the following notation:
+        <informaltable frame="none">
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>
+                  <filename class="directory">/usr/bin</filename>
+                </entry>
+                <entry>
+                  Directory
+                </entry>
+              </row>
+              <row>
+                <entry>
+                  <filename>foo.sgml</filename>
+                </entry>
+                <entry>
+                  Filename
+                </entry>
+              </row>
+              <row>
+                <entry>
+                  <command>command</command>
+                </entry>
+                <entry>
+                  Command or text that would be typed.
+                </entry>
+              </row>
+              <row>
+                <entry>
+                  <command><replaceable>replaceable</replaceable></command>
+                </entry>
+                <entry>
+                  "Variable" text that can be replaced.
+                </entry>
+              </row>
+              <row>
+                <entry>
+                  <literal>Program or Doc Code</literal>
+                </entry>
+                <entry>Program or document code</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable>
+      </para>
+    </sect2>
+
+    <!-- ####### Introduction | About This Handbook  ####### -->
+
+    <sect2 id="about">
+      <title>About This Handbook</title>
+      <para>
+       This Handbook is a guide for both writing documentation for
+       GNOME components and applications and for properly binding and
+       packaging documentation into GNOME applications.
+      </para>
+      <para>
+       This Handbook, like all GNOME documentation, was written in
+       DocBook(SGML) and is available in several formats including
+       SGML, HTML, PostScript, and PDF.  For the latest version, see
+       <ulink
+       url="http://developer.gnome.org/projects/gdp/handbook.html"> 
+       <citetitle>Getting The GNOME Handbook of Writing Software
+       Documentation</citetitle> </ulink>.  Alternately, one may
+       download it anonymously from GNOME CVS under <filename
+       class="directory">gnome-docu/gdp</filename>.
+      </para>
+    </sect2>
+  </sect1>
+
+<!-- ################# Getting Started  ############### -->
+
+  <sect1 id="gettingstarted">
+    <title>Getting Started Writing GNOME Documentation</title>
+
+<!--####### Getting Started | Selecting A Document ####### -->
+
+    <sect2 id="selecting">
+      <title>Selecting A Document</title>
+    
+      <sect3 id="know">
+        <title>Document Something You Know</title>
+        <para>
+          The most frequently asked question of new contributors who
+          join the GDP is "which document should I start
+          with?". Because most people involved are volunteers, we do
+          not <emphasis>assign</emphasis> projects and applications to
+          write documents for. The first step is all yours - you must
+          decide what about GNOME interests you most and find out if
+          it has complete documents or not.
+        </para>
+        <para>
+          It is also important to spend some time with GNOME to make
+          sure you are familiar enough with it to be
+          <emphasis>authoritative</emphasis>  in your writing. The
+          best way to do this is to just sit down and play with GNOME
+          as much as possible before starting to write.
+        </para>
+        <para>
+          The easiest way to get started is to improve existing
+          documentation. If you notice some inaccuracies or omissions
+          in the documentation, or you think that you can explain the
+          material more clearly, just send your suggestions to the
+          author of the original documentation or to the GNOME
+          documentation project at <email>docs@gnome.org</email>.
+        </para>
+      </sect3>
+      
+      <sect3 id="doctable">
+        <title>The GNOME Documentation Status Table</title>
+        <para>
+          The <citetitle>GDP Documentation Status Table</citetitle>
+          (<citetitle>DocTable</citetitle>) (<ulink
+          url="http://www.gnome.org/gdp/doctable/"
+          type="http">http://www.gnome.org/gdp/doctable/</ulink>) is a
+          web page which tracks the status of all the various
+          documentation components of GNOME.  These components include
+          application documentation, internal GNOME component
+          documentation, user documentation, and developer
+          documentation.  For each documentation item, it tracks the
+          current status of the documentation, who is working on the
+          particular document, where the documentation can be found,
+          and provides a forum for the discussion of each item.
+        </para>
+        <para>
+          You should use the <citetitle>DocTable</citetitle> to help
+          you select a documentation item which needs work done.  Once
+          you have selected an item to work on, please register
+          yourself as an author so that other authors do not duplicate
+          your work and may contact you to help or offer suggestions.
+          Also be sure to keep the status icons up-to-date  so that
+          the GDP team can easily identify which items need additional
+          help.  The <citetitle>DocTable</citetitle> also allows
+          people to make announcements and suggestions and to discuss
+          issues in the comments section.
+        </para>
+        <note>
+         <title>Note</title>
+         <para>
+          Note that the information in the
+          <citetitle>DocTable</citetitle> may not always be up-to-date
+          or accurate.  When you assign yourself to documenting an
+          application, make sure you find out the latest status of
+          documentation by contacting the application author.  
+         </para>
+        </note>
+      </sect3>
+    </sect2>
+
+<!-- ####### Getting Started | Installing And Using DocBook ####### -->
+
+    <sect2 id="docbook">
+      <title>Installing and Using DocBook</title>
+      <para>
+        All documentation for the GNOME project is written in SGML
+        using the DocBook DTD. There are many advantages to using
+        this for documentation, not least of which is the single
+        source nature of SGML. To contribute to the GDP you should
+        learn to use DocBook.
+      </para>
+      <note>
+        <title>NOTE</title>
+        <para>
+          To get started writing for the GDP you do not need to rush
+          out and learn DocBook - if you feel it is too much to handle
+          for now, you can submit plain ASCII text to the <ulink
+          url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+          <citetitle>gnome-doc-list mailing list</citetitle>
+          </ulink>and a volunteer will mark it up for you. Seeing your
+          document marked up will also be a great way for you to start
+          learning DocBook.
+        </para>
+      </note>
+      <sect3 id="installingdocbook">
+        <title>Installing DocBook</title>
+        <para>
+          Download and install the following <ulink
+          url="ftp://sourceware.cygnus.com:/pub/docbook-tools/"
+          type="ftp">DocBook Tools packages</ulink>: jade, docbook,
+          jadetex, sgml-common, and stylesheets. (RPM users should note
+          that jade is platform dependent (eg. i386), while the other packages
+          are in the <filename class="directory">noarch</filename>
+          directory.) You can find more 
+          information on DocBook Tools <ulink url="
+          http://sourceware.cygnus.com/docbook-tools/"
+          type="http">here</ulink>.
+        </para>
+        <para>
+          If you are an <application>Emacs</application> user you may
+          want to grab the psgml package as well. This is a major mode
+          for editing sgml files in <application>Emacs</application>.
+        </para>
+      </sect3>
+      
+      <sect3 id="gdpstylesheets">
+        <title>GDP Stylesheets</title>
+        <para>
+          The GDP uses its own DocBook stylesheets.  To use the GDP
+          stylesheets, you should download the file
+          <filename>gdp-both.dsl</filename> from the <filename
+          class="directory">gnome-docu/gdp/dsssl</filename> module in
+          CVS (or from <ulink
+          url="http://developer.gnome.org/projects/gdp/stylesheets.html">
+          GDP Custom DSSSL Stylesheet</ulink>)and copy it
+<!--      into <filename
+          class="directory">/usr/lib/sgml/stylesheets</filename>. You
+          will need to point DocBook Tools to this stylesheet with the
+          <command><option>-d</option></command> option:
+          <command>db2html -d /usr/lib/sgml/stylesheets/gdp-both.dsl
+          <replaceable>foo.sgml</replaceable></command>. (Creating an
+          alias to include this option and path is convenient.)
+          Alternately, you could overwrite
+          <filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>
+          with <filename>gdp-both.dsl</filename>.
+-->
+          over the file
+          <filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>.
+          Alternately, you can download and install the
+          <ulink url="http://people.redhat.com/dcm/software.html"
+          type="http">gnome-doc-tools package</ulink> which will set
+          up the stylesheets as well as the DTD discussed below.
+        </para>
+
+<!--        <note>
+          <para>
+            The current version of the DocBook Tools command
+            <command>db2ps</command> does not have a
+            <command><option>-d</option></command> option. In order to
+            create PostScript output, you must overwrite
+            <filename>/usr/lib/sgml/stylesheets/cygnus-both.dsl</filename>
+            with <filename>gdp-both.dsl</filename>.
+          </para>
+        </note>
+-->
+      </sect3>
+      
+      <sect3 id="gdpdtd">
+        <title>GDP DTD (PNG Image Support)</title>
+        <para>
+          Due to some license issues involved with the creation of
+          gifs, the GNOME Documentation Project has decided to use the
+          PNG image format for all images in GNOME documentation. You
+          can read more about the issues involved with gifs at <ulink
+          url="http://www.gnu.org/philosophy/gif.html"
+          type="http">http://www.gnu.org/philosophy/gif.html</ulink>.
+        </para>
+        <para>
+          The current DocBook DTD(3.1) does not include support for
+          embedding PNG images in your documents.  Since the GDP uses
+          many screenshots in its documentation, we use our own
+          variation on the DocBook DTD which has PNG image support.
+          We encourage everybody to use this DTD instead of the
+          default DocBook DTD since your source document header and
+          your output document appearance subtly vary between the two
+          DTD's.  To install the GDP custom DTD with PNG image support
+          by hand:
+        </para>
+        <itemizedlist mark="opencircle">
+          <listitem>
+            <para>
+              Download <ulink
+              url="http://www.labs.redhat.com/png/png-support.html">the
+              GDP DocBook DTD for PNG support</ulink> and install it
+              where you keep your DTD's. (On Red Hat use <filename
+              class="directory">/usr/lib/sgml/</filename>.) Note that
+              the 3.0 DTD is missing support for the
+              <sgmltag>&lt;legalnotice></sgmltag> tag, so it is
+              recommended that you use version 3.1
+            </para>
+          </listitem>
+          <listitem override="bullet">
+            <para>
+              Add the new DTD to your SGML CATALOG file.  The location
+              of your SGML CATALOG file may vary depending upon your
+              distribution. (On Red Hat it is usually in
+              /usr/lib/sgml/CATALOG.) Add the following line to this
+              file:
+              <programlisting>
+PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" "png-support-3.0.dtd"
+              </programlisting> 
+              If you are using the 3.1 DTD, use:
+              <programlisting>
+PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN" "png-support-3.1.dtd"
+              </programlisting> 
+            </para>
+          </listitem>
+        </itemizedlist>
+        <para>
+          Alternately, you can download and install the
+          <ulink url="http://people.redhat.com/dcm/software.html"
+          type="http">gnome-doc-tools package</ulink> which will set
+          up the custom stylesheets and DTD for you.
+        </para>
+        <para>
+          To include PNG files in your documents, you will need to
+          indicate that you are using this special DTD.  To do
+          this, use the following headers:
+        </para>
+        <para>
+          Articles:
+          <programlisting>
+<![CDATA[<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant
+V1.1//EN"[]>]]>
+          </programlisting>
+        </para>
+        <para>
+          Books:
+          <programlisting>
+<![CDATA[<!DOCTYPE Book PUBLIC "-//GNOME//DTD DocBook PNG Variant
+V1.1//EN"[]>]]>
+          </programlisting>
+        </para>
+
+      </sect3>
+      
+      <sect3 id="editors">
+        <title>Editors</title>
+        <para>
+          There are many editors on Linux and UNIX systems available
+          to you. Which editor you use to work on the sgml documents
+          is completely up to you, as long as the editor is able to
+          preserve sgml and produce the source in a format that is
+          readable by everyone.
+        </para>
+        <para>
+          Probably the two most popular editors available are
+          <application>Emacs</application> and
+          <application>vi</application>. These and other editors are
+          used regularly by members of the GDP. Emacs has a major
+          mode, psgml, for editing sgml files which can save you time
+          and effort in adding and closing tags. You will find the
+          psgml package in DocBook Tools, which is the standard set of
+          tools for the GDP. You may find out more about DocBook Tools
+          in <xref linkend="installingdocbook" />.
+        </para>
+      </sect3>
+      
+      <sect3 id="make-output">
+        <title>Creating Something Useful with your Docs</title>
+        <para>
+          The tools available in DocBook Tools allow you to convert
+          your sgml document to many different formats including html
+          and Postscript. The primary tool used to do the conversion
+          is an application called <application>Jade</application>. In
+          most cases you will not have to work directly with
+          <application>Jade</application>; Instead,  you will use the
+          scripts provided by DocBook Tools.
+        </para>
+        <para>
+          To preview your DocBook document, it is easiest to convert
+          it to <filename>html</filename>. If you have installed the
+          DocBook tools described above, all you have to do is to run
+          the command <prompt>$</prompt><command>db2html
+          mydocument.sgml</command>. If there are no sgml syntax
+          errors, this will create a directory <filename
+          class="directory">mydocument</filename> and place the
+          resulting html files in it. The title page of the document
+          will typically be
+          <filename>mydocument/index.html</filename>.  If you have
+          screenshots in your document, you will have to copy these
+          files into the <filename
+          class="directory">mydocument</filename> directory by
+          hand. You can use any web browser to view your document.
+          Note that every time you run <command>db2html</command>, it
+          creates the <filename
+          class="directory">mydocument</filename> directory over, so
+          you will have to copy the screenshots over each time.
+        </para>
+        <para>
+          You can also convert your document to PostScript by running
+          the command <prompt>$</prompt><command>db2ps
+          mydocument.sgml</command>, after which you can print out or
+          view the resulting .ps file.  
+        </para>
+        <note>
+          <title>NOTE</title>
+          <para>
+            The html files you get will not look quite the same as the
+            documentation distributed with GNOME unless you have the
+            custom stylesheets installed on your machine. DocBook
+            Tools' default stylesheets will produce a different look
+            to your docs. You can read more about the GDP stylesheets
+            in <xref linkend="gdpstylesheets" />.
+          </para>
+        </note>
+      </sect3>
+      
+      <sect3 id="jadeimages">
+        <title>Images in DocBook Tools</title>
+        <para>
+          If your document uses images you will need to take note of a
+          few things that should take place in order for you to make
+          use of those images in your output.
+        </para>
+        <para>
+          The DocBook Tools scripts and applications are smart enough
+          to know that when you are creating html you will be using
+          PNG files and when you are creating Postscript you will be
+          using EPS files (you must use EPS with Postscript).
+        </para>
+        <para>
+          Thus, you should never explicitly
+          include the extension of the image file, since DocBook
+          Tools will automatically insert it for you. For example:
+        </para>
+        <programlisting>
+<![CDATA[
+<figure>
+ <title>My Image</title>
+ <screenshot>
+  <screeninfo>Sample GNOME Display</screeninfo>
+  <graphic  format="png" fileref="myfile" srccredit="me">
+  </graphic>
+ </screenshot>
+</figure>
+]]>     </programlisting>
+        <para>
+          You will notice in this example that the file
+          <filename>myfile.png</filename> was referred to as simply
+          <filename>myfile</filename>. Now when you run
+          <command>db2html</command> to create an html file, it will
+          automatically look for <filename>myfile.png</filename> in
+          the directory.
+        </para>
+        <para>
+          If you want to create PostScript ouput, you will need to create an
+          EPS version of your image file to be displayed in the
+          PostScript file. There is a simple script available which
+          allows you to change a PNG image into an EPS file
+          easily. You can download this file - img2eps - from <ulink
+          url="http://people.redhat.com/dcm/sgml.html"
+          type="html">http://people.redhat.com/dcm/sgml.html</ulink>
+          (look for the img2eps section).  Note that this script is
+          included in the gnome-doc-tools package, so if you are using
+          this package, you should already have
+          <command>img2eps</command> on you system.
+        </para>
+      </sect3>
+      
+      <sect3 id="moredocbookinfo">
+        <title>Learning DocBook</title>
+        <para>
+          There are many resources available to help you learn DocBook.
+          The following resources on the web are useful for learning
+          DocBook:
+        </para>
+        <itemizedlist mark="bullet">
+          <listitem>
+            <para>
+              <ulink url="http://www.docbook.org"
+              type="http">http://www.docbook.org</ulink>  - Norman
+              Walsh's <citetitle>DocBook: The Definitive
+              Guide</citetitle>.  Online O'Reilly book on using
+              DocBook. Contains an excellent element reference. May be
+              too formal for a beginner.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <ulink
+              url="http://www.oswg.org/oswg-nightly/oswg/en_US.ISO_8859-1/articles/DocBook-Intro/docbook-intro/index.html"
+              type="http">A Practical Introduction to DocBook</ulink>
+              - The Open Source Writers Group's introduction to using
+              DocBook. This is an excellent HOW-TO type article on
+              getting started.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <ulink
+              url="http://nis-www.lanl.gov/~rosalia/mydocs/docbook-intro/docbook-intro.html"
+              type="http">Getting Going with DocBook: Notes for
+              Hackers</ulink> - Mark Galassi's introduction to DocBook
+              for hackers. This has to be one of the first
+              introductions to DocBook ever - still as good as it ever
+              was.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <ulink type="http" url="http://www.freebsd.org/tutorials/docproj-primer/">
+              FreeBSD Documentation Project Primer for New
+              Contributors</ulink> - FreeBSD documentation project
+              primer. Chapter 4.2 provides a very good introduction to
+              writing documentation using DocBook. Note that it also
+              describes some custom extensions of DocBook;
+              fortunately, they are clearly marked as such.
+            </para>
+          </listitem>
+        </itemizedlist>
+        <para>
+          Norman Walsh's book is also available in print.
+        </para>
+        <para>
+          The following sections of this document are designed to help
+          documentation authors write correct and consistent DocBook:
+        </para>
+        <itemizedlist mark="bullet">
+          <listitem>
+            <para>
+              <xref linkend="docbookbasics" /> - Descriptions of
+              commonly used DocBook tags.
+            </para>
+          </listitem>
+        </itemizedlist>
+        <para>
+          You may also discuss specific DocBook questions with GDP
+          members on the #docs IRC channel at irc.gnome.org and on the
+          gnome-doc-list mailing list.
+        </para>
+      </sect3>
+    </sect2>
+   
+<!-- ####### Getting Started | GDP Document Examples ####### -->
+<!--
+    <sect2 id="examples">
+      <title>GDP Document Examples</title>
+      <para>
+        Examples of various types of GNOME documents are found in
+        <xref linkend="examples" />.  There is also an example GNOME
+        application with documentation called
+        <application>gnome-hello</application> in GNOME cvs.
+      </para>
+    </sect2>
+-->
+<!-- ####### Getting Started | GDP Document Templates ####### -->
+
+    <sect2 id="gdptemplates">
+      <title>GDP Document Templates</title>
+      <para>
+        Templates for various types of GNOME documents are found in
+        <xref linkend="templates" />.  They are kept in CVS in
+        gnome-docu/gdp/templates. The easiest source to get them from
+        is probably the <ulink
+        url="http://developer.gnome.org/projects/gdp/templates.html" 
+        type="http">GDP
+        Document Templates</ulink> web page, which is typically kept
+        completely up-to-date with CVS and has a basic description of
+        each file from CVS.
+      </para>
+    </sect2>
+
+<!-- ####### Getting Started | Screenshots ####### -->
+
+    <sect2 id="screenshots">
+      <title>Screenshots</title>
+      <para>
+        Most GNOME documents will have screenshots of the particular
+        applet, application, GNOME component, or widget being
+        discussed.  As discussed above in <xref linkend="gdpdtd"/> you
+        will need to install the special GDP DocBook DTD which
+        supports PNG images, the format used for all images in GNOME
+        documentation. For the basic DocBook structure used to insert
+        images in a document, see <xref linkend="jadeimages"/> above.
+      </para>
+      <sect3 id="screenshotappearance">
+        <title>Screenshot Appearance</title>
+        <para>
+          For all screenshots of windows that typically have border
+          decorations (e.g. applications and dialogs, but not applets
+          in a <interface>panel</interface>), GDP standards dictate
+          the appearance of the window.  (This is to minimize possible
+          confusion to the reader, improve the appearance of GNOME
+          documents, and guarantee the screenshot is readable when
+          printed.) All screenshots should be taken with the SawFish
+          (formerly known as Sawmill) window manager using the
+          MicroGui theme and Helvetica 12pt font. (A different window
+          manager can be used provided the MicroGui theme is available
+          for this window manager and the appearance is identical to
+          that when using the SawFish window manager.) The default
+          GTK+ theme(gtk) and font (Helvetica 12 pt) should be used
+          for all screenshots.  If you are unable to provide
+          screenshots in this form, you should create screenshots as
+          you wish them to appear and send them to the
+          <ulink url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+          <citetitle>gnome-doc-list mailing list</citetitle> </ulink>
+          requesting a GDP member reproduce these screenshots in the
+          correct format and email them to you.
+        </para>
+      </sect3>
+      <sect3 id="screenshottools">
+        <title>Screenshot Tools</title>
+        <para>
+          There are many tools for taking screenshots in
+          GNOME/Linux. Perhaps the most convenient is the
+          <application>Screen-Shooter Applet</application>. Just click
+          on the window icon in the applet and then on the window you
+          would like to take a screenshot of. (Note that
+          at the time of this writing, PNG images taken by
+          screenshooter do not appear properly in
+          <application>Netscape</application> or the
+          <application>GNOME Help Browser</application>.  You
+          should save your screenshot as a GIF and
+          then use <command>convert filename.gif
+          filename.png</command>.) For applets
+          in a <interface>Panel</interface>,
+          <application>xv</application> can be used to crop the
+          screenshot to only include the relevant portion of the
+          <interface>Panel</interface>. Note that
+          <application>xv</application> and 
+          <application>gimp</application> can both be used for taking
+          screenshots, cropping screenshots, and converting image
+          formats. 
+        </para>
+      </sect3>
+      <sect3 id="screenshotfiles">
+        <title>Screenshot Files</title>
+        <para>
+          Screenshots should be kept in the main documentation
+          directory with your SGML file for applets, or should be
+          kept in a directory called "figs" for application and other
+          documentation.  After you use <command>db2html</command> to
+          convert your SGML file to HTML (see <xref
+          linkend="make-output"/>), you will need to copy your
+          screenshots (either the individual PNG files for applet
+          documentation, or the whole "figs" directory for other
+          documentation) into the newly created HTML directory.  Note
+          that every time you use <command>db2html</command> the HTML
+          directory is erased and rewritten, so do not store your only
+          copy of the screenshots in that directory.  If you wish to
+          create PostScript or PDF output, you will need to manually
+          convert the PNG images to EPS as described in <xref
+          linkend="jadeimages"/>, but will not need to copy these
+          images from their default location, as they are included
+          directly into the output(PostScript of PDF) file.
+        </para>
+      </sect3>
+    </sect2>
+
+
+<!-- ####### Getting Started | Application Bugs ####### -->
+
+    <sect2 id="applicationbugs">
+      <title>Application Bugs</title>
+      <para>
+        Documentation authors tend to investigate and test applets and
+        applications more thoroughly than most 
+        users.  Often documentation authors will discover one or
+        more bugs in the software.  These bugs vary from small ones,
+        such as mis-spelled words or missing
+        <interface>About</interface> dialogs in the menu, to large
+        ones which cause the applet to crash.  As all users, you
+        should be sure to report these bugs so that application
+        developers know of them and can fix them.  The easiest way to
+        submit a bug report is by using the <application>Bug
+        Buddy</application> applet which is part of the gnome-applets
+        package.  
+      </para>
+    </sect2>
+
+
+<!-- ####### Getting Started | Using CVS  ####### -->
+
+    <sect2 id="cvs">
+      <title>Using CVS</title>
+      <para>
+        CVS (Concurrent Versions System) is a tool that allows
+        multiple developers to concurrently work on a set of
+        documents, keeping track of the modifications made by each
+        person.  The files are stored on a server and each developer
+        checks files out, modifies them, and then checks in their
+        modified version of the files.  Many GNOME programs and
+        documents are stored in CVS.  The GNOME CVS server allows
+        users to anonymously check out CVS files. Most GDP members
+        will need to use anonymous CVS to download the most up-to-date
+        version of documentation or programs.  Modified documents will
+        typically be emailed to the the application developer. Core
+        GDP members may also be granted login CVS privileges so they
+        may commit modified files directly to CVS.
+      </para>
+
+      <sect3 id="anonymouscvs">
+        <title>Anonymous CVS</title>
+        <para>
+          To anonymously check out documents from CVS, you must first
+          log in.  From the bash shell, you should set your CVSROOT
+          shell variable with <command>  export
+          CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'</command>
+          and then login with <command>cvs login</command>(there is no
+          password, just hit return). As an example, we will use the
+          "gnome-docu/gdp" module which contains this and several
+          other documents. To check these documents out for the first
+          time, type <command>cvs -z3 checkout
+          gnome-docu/gdp</command>. After you have this document
+          checked out and you would like to download any updates on
+          the CVS server, use <command>cvs -z3 update -Pd</command>.
+        </para>
+      </sect3>
+
+      <sect3 id="logincvs">
+        <title>Login CVS</title>  <para>  If you have been given a
+        login for the GNOME CVS server,  you may commit your file
+        modifications to CVS.  Be sure to read the following section
+        on CVS etiquette before making any commits to CVS.  To log in
+        to the CVS server as user
+        <command><replaceable>username</replaceable></command> with a
+        password, you must first set your CVSROOT shell variable with
+        <command> export
+        CVSROOT=':pserver:<replaceable>username</replaceable>@cvs.gnome.org:/cvs/gnome'</command>.
+        Log in with <command>cvs login</command> and enter your
+        password. You may check out and update modules as described
+        above for anonymous CVS access.  As a login CVS user, you may
+        also check modified versions of a file into the CVS server.
+        To check
+        <command><replaceable>filename</replaceable></command> into
+        the CVS server, type <command>cvs -z3 commit
+        <replaceable>filename</replaceable></command>. You will be
+        given a vi editor window to type in a brief log entry,
+        summarizing your changes.  The default editor can be changed
+        using the <varname>EDITOR</varname> environment variable or
+        with the <command><option>-e</option></command> option. You
+        may also check in any modifications to files in the working
+        directory and subdirectories using <command>cvs -z3
+        commit</command>.  To
+        add a new file to the CVS server, use <command>cvs -z3 add
+        <replaceable>filename</replaceable></command>, followed by the
+        commit command.
+        </para>
+      </sect3>
+
+      <sect3 id="cvsetiquette">
+        <title>CVS Etiquette</title>
+        <para>
+          Because files in CVS are typically used and modified by
+          multiple developers and documentation authors, users should
+          exercise a few simple practices out of courtesy towards the
+          other CVS users and the project leader.  First, you should
+          not make CVS commits to a package without first discussing
+          your plans with the project leader.  This way, the project
+          leader knows who is modifying the files and generally, what
+          sort of changes/development is being done.  Also, whenever a
+          CVS user commits a file to CVS, they should make an entry in
+          the CVS log and in the <filename>ChangeLog</filename> so
+          that other users know who is making modifications and what
+          is being modified.  When modifying files created by others,
+          you should follow the indentation scheme used by the initial
+          author.
+        </para>
+      </sect3>
+    </sect2>
+  </sect1>
+  
+<!-- ################# The GNOME Documentation System###############
+-->
+
+  <sect1 id="gnomedocsystem">
+    <title>The GNOME Documentation System</title>
+
+<!-- ####### The GNOME Documentation System | The GNOME Help Browser
+####### -->
+    
+    <sect2 id="gnomehelpbrowser">
+      <title>The GNOME Help Browser</title>
+      <para>
+        At the core of the GNOME help system is the <application>GNOME
+        Help Browser</application>. The <application>Help
+        Browser</application> provides a unified interface to several
+        distinct documentation systems on Linux/Unix systems: man
+        pages, texinfo pages, Linux Documentation Project(LDP)
+        documents, GNOME application documentation, and other GNOME
+        documents.
+      </para>
+      <para>
+        The <application>GNOME Help Browser</application> works by
+        searching standard directories for documents which are to be
+        presented.  Thus, the documentation that appears in the GHB is
+        specific to each computer and will typically only represent
+        software that is installed on the computer.
+      </para>
+    </sect2>
+
+<!-- ####### The GNOME Documentation System | The GNOME Help Browser
+####### -->
+
+    <sect2 id="gnomehelpbrowser2">
+      <title>The GNOME Help Browser (GNOME-2.0)</title> <para> In
+      GNOME 2.0, the <application>GNOME Help Browser</application>
+      will be replaced by <application>Nautilus</application>.
+      Nautilus will be the file manager/graphical shell for GNOME 2.0
+      and will also implement a more sophisticated help system than
+      that used by the <application>GNOME Help Browser</application>
+      used in GNOME 1.0.  It will read and display DocBook files
+      directly, avoiding the need for duplicating documents in both
+      DocBook and HTML formats.  Its display engine for DocBook will
+      be much faster than running <application>jade</application> to
+      convert to HTML for rendering.  Because it uses the original
+      DocBook source for documentation, it will be possible to do more
+      sophisticated searching using the meta information included in
+      the documents.  And since Nautilus is a virtual file system
+      layer which is Internet-capable, it will be able to find and
+      display documents which are on the web as well as those on the
+      local file system. For more information on
+      <application>Nautilus</application>, visit the #nautilus IRC
+      channel on irc.gnome.org.  </para>
+    </sect2>
+
+<!-- ####### The GNOME Documentation System | GNOME On-The-Fly
+Documentation Generation  ####### -->
+    
+    <sect2 id="gnomehelponthefly">
+      <title>Dynamic Document Synthesis(GNOME-2.0)</title>
+      <para>
+        GNOME uses the documentation presented by all the various
+        GNOME components and applications installed on the system to
+        present a complete and customized documentation environment
+        describing only components which are currently installed on a
+        users system.  Some of this documentation, such as the manuals
+        for applets, will be combined in such a way that it appears to
+        be a single document.
+      </para>
+      <para>
+        By using such a system, you can be sure that any GNOME app you
+        install that has documentation will show up in the index,
+        table of contents, any search you do in the help browser.
+      </para>
+    </sect2>
+    
+<!-- ####### The GNOME Documentation System | The GNOME Documentation
+Components  ####### -->
+
+    <sect2 id="gnomehelpcomponents">
+      <title>The GNOME Documentation Components</title>
+
+      <sect3 id="applicationmanualsintro">
+        <title>Application Manuals</title>
+        <para>
+          Every GNOME application should have an application manual.
+          An application manual is a document specific to the
+          particular application which explains the various windows
+          and features of the application.  Application Manuals
+          typically use screenshots (PNG format) for clarity.  Writing
+          application manuals is discussed in more detail in <xref
+          linkend="writingapplicationmanuals" /> below.
+        </para>
+      </sect3>
+
+      <sect3 id="applicationhelpintro">
+        <title>Application Help</title>
+        <para>
+          Applications should have a <guibutton>Help</guibutton>
+          button on screens on which users may need help.  These
+          <guibutton>Help</guibutton> buttons should pull up the
+          default help browser, determined by the
+          <varname>ghelp</varname> URL Handler (configured using the
+          <application>Control Center</application>), typically the
+          <application>GNOME Help Browser</application>.  The help
+          browser should show either the first page of the application
+          manual, or else the relevant page thereof. Application help
+          is described in more detail in <xref
+          linkend="applicationhelpbuttons" /> below.
+        </para>
+      </sect3>
+
+      <sect3 id="contextsensitivehelpintro">
+        <title>Application Context Sensitive Help (coming in
+        GNOME-2.0)</title>
+        <para>
+          Context sensitive help is a system which will allow the user
+          to query any part (button, widget, etc.) of an application
+          window.  This is done by either entering a CS Help mode by
+          clicking on an icon or by right clicking on the application
+          part and selecting "What's This" or whatever is decided on
+          at the time.  Context sensitive help is described in more
+          detail in <xref linkend="writingcontextsensitivehelp" />
+          below.
+        </para>
+      </sect3>
+
+      <sect3 id="userguide">
+        <title>The GNOME User Guide</title>
+        <para>
+          The <citetitle>GNOME User Guide</citetitle> describes the
+          GNOME desktop environment and core components of GNOME such
+          as the <application>panel</application> and
+          <application>control center</application>. In GNOME 1.x this
+          was the main and only source of documentation. In GNOME 2.0
+          this will become a document for the web and for printing
+          that is derived from various parts chosen in the system that
+          are necessary for the new user to understand.
+        </para>
+      </sect3>
+
+      <sect3 id="userdocs">
+        <title>User Documents</title>
+        <para>
+          Aside from the <citetitle>GNOME User Guide</citetitle>,
+          there are several other documents to help GNOME users learn
+          GNOME, including the <citetitle>GNOME FAQ</citetitle>,
+          <citetitle>GNOME Installation and Configuration
+          Guide</citetitle>, and the <citetitle>GNOME Administrators
+          Guide</citetitle>.
+        </para>
+      </sect3>
+
+      <sect3 id="developerdocs">
+        <title>Developer Documents</title>
+        <para>
+          There are many White Papers, Tutorials, HOWTO's and FAQ's to
+          make programming GNOME and GNOME applications as easy as
+          possible.
+        </para>
+        <para>
+          API documentation is also available for the GNOME libraries. This is
+          detailed documentation of the code that is used to build GNOME
+          apps. You can keep up with the GNOME API docs on the <ulink
+          url="http://developer.gnome.org/doc/API/" type="http">GNOME API
+          Reference</ulink> page.
+        </para>
+      </sect3>
+
+      <sect3 id="projectdocs">
+        <title>Project Documents</title>
+        <para>
+          Some GNOME projects have documentation to maintain
+          consistency in their product and to help new contributors
+          get up to speed quickly. Among these are the GDP documents,
+          such as the one you are reading now.
+        </para>
+      </sect3>
+    </sect2>
+  </sect1>
+  
+  
+<!-- ################# DocBook Basics ############### -->
+
+  <sect1 id="docbookbasics">
+    <title>DocBook Basics </title>  
+<!-- ####### DocBook Basics | Introduction to DocBook ####### -->
+
+    <sect2 id="introtodocbook">
+      <title>Introduction to DocBook</title>
+      <para>
+        To understand DocBook, a basic understanding of SGML is
+        helpful. SGML stands for Standard General Markup Language and
+        is one of the first markup languages every created. HTML is
+        actually derived from SGML and XML is a subset of SGML.  SGML
+        uses what is called a Document Type Definition to specify
+        <emphasis>elements</emphasis> which are contained between
+        brackets, &lt; and >. Text is marked by both beginning and
+        ending elements, for example in the DocBook DTD, one denotes a
+        title with <sgmltag>&lt;title></sgmltag>The
+        Title<sgmltag>&lt;/title></sgmltag>.
+      </para>
+      <para>
+        The DTD (in the case of the GDP, DocBook) defines rules for how the
+        elements can be used. For example, if one element can only be used when
+        embedded within another, this is defined in the DTD.
+      </para>
+      <para> 
+	An SGML file is just a plain ASCII file containing the text
+	with the markup specified above. To convert it  to some easily
+	readable format, you need special tools. The GDP uses <emphasis>DocBook
+        Tools</emphasis>, a free package of utilities for working with DocBook
+        which includes <emphasis>Jade</emphasis>, which does the SGML/DSSL
+        parsing. You can read more about DocBook Tools in <xref
+        linkend="installingdocbook" />. 
+      </para>
+      <para>
+        The final appearance of the output (e.g. PostScript or HTML)
+        is determined by a
+        <emphasis>stylesheet</emphasis>. Stylesheets are files,
+        written in a special language (DSSSL &mdash; Document Style
+        Semantics and Specification Language), which  specify the
+        appearance of various DocBook elements, for example,
+        what fonts to use for titles and various inline elements, page
+        numbering style, and much more. DocBook tools come with a
+        collection of stylesheets (Norman Walsh's modular
+        stylesheets); GNOME Document Project uses some customized
+        version of this stylesheets &mdash; see <xref
+        linkend="gdpstylesheets"/>.   
+      </para>
+      <para>
+        The advantage of specifying the <emphasis>structure</emphasis>
+        of a document with SGML instead of specifying the
+        <emphasis>appearance</emphasis> of the document with a typical
+        word processor, or with html, is that the resulting document
+        can be processed in a variety of ways using the structural
+        information.  Whereas formatting a document for appearance
+        assumes a medium (typically written text on a standard-sized
+        piece of paper), SGML can be processed to produce output for a
+        large variety of media such as text, postscript, HTML,
+        Braille, audio, and potentially many other formats.
+      </para>
+      <para>
+        Using 'content' as the elements to define the text of a document also
+        allows for search engines to make use of the actual elements to make a
+        "smarter search". For example, if you are searching for all documents
+        written by the author "Susie" your search engine could be made smart
+        enough to only search &lt;author> elements, making for a faster and more
+        accurate search.
+      </para>
+      <para>
+        Since the overall appearance of the output is determined not by the DTD
+        or the SGML document, but rather by a stylesheet, the appearance of a
+        document can be easily changed just by changing the stylesheet. This
+        allows everyone in the project to create documents that all look the
+        same.
+      </para>
+      <para>
+        As stated before, the GDP uses the DocBook DTD.  For a list of
+        introductory and reference resources on DocBook, see <xref
+        linkend="resources" />.  The following sections also provide
+        convenient instructions on which markup tags to use in various
+        circumstances.  Be sure to read <xref linkend="conventions" />
+        for GDP documentation-specific guidelines.
+      </para>
+    </sect2>
+    
+ <!-- ######  DocBook Basics | XML and SGML       ########--> 
+ <sect2 id="xml">
+      <title>XML and SGML</title>
+
+      <para> In not so distant future (probably before GNOME 2.0),
+      DocBook itself and GNOME Documentation project will migrate from
+      SGML to XML. This transition should be relatively painless:
+      (almost) all DocBook tags will remain the same. However, XML has
+      stricter syntax rules than SGML; thus, some constructions which
+      are valid in SGML will not be valid in XML. Therefore, to be
+      ready for this transistion, it is <emphasis>strongly
+      advised</emphasis> that the documentation writers conform to XML
+      syntax rules. Here are most important differences:
+      </para>
+	
+      <variablelist>
+	  <varlistentry>
+	    <term> <emphasis>Minimization</emphasis></term> 
+	    <listitem>
+	    
+	    <para>
+	      It is possible with some implementations of SGML to use
+	      minimizations to close elements in a document by using
+	      &lt;/>, for example:
+	      <literal><sgmltag>&lt;title></sgmltag>The
+		Title<sgmltag>&lt;/></sgmltag></literal>. This is not
+              allowed in XML. You can use <command>sgmlnorm</command> command,
+              included in DocBook Tools package, to expand minimized tags;
+              if you are using <application>Emacs</application> with psgml
+              mode, you can also use menu command
+          <menuchoice>
+             <guimenu>Modify</guimenu>
+             <guimenuitem>Normalize</guimenuitem>
+          </menuchoice>.
+         </para> 
+	    </listitem>
+	    </varlistentry>
+	  <varlistentry>
+	    <term> <emphasis>Self-closing tags</emphasis></term> 
+	    <listitem>
+ 
+         <para>
+            Also, in SGML some tags are allowed not to have closing
+            tags.  For example, it is legal for
+            <sgmltag>&lt;xref></sgmltag> not to have a closing tag: 
+            <literal><sgmltag>&lt;xref 
+                   linkend="someid"></sgmltag></literal>. In
+            XML, it is illegal; instead, you should use  
+            <literal><sgmltag>&lt;xref 
+                   linkend="someid"/></sgmltag></literal> (note the
+            slash!).
+          </para> 
+  </listitem>
+  </varlistentry>
+
+	<varlistentry>
+	    <term> <emphasis>Case sensitive tags</emphasis></term> 
+	    <listitem>
+	    <para>
+	      In XML, unlike SGML, tags are case-senstive
+	      <sgmltag>&lt;title></sgmltag> and
+	      <sgmltag>&lt;TITLE></sgmltag> are different tags!
+	      Therefore, please always use lowercase tags (except for
+	      things like <literal>DOCTYPE, CDATA</literal> and
+	      <literal>ENTITY</literal>, which are not DocBook tags). 
+	    </para>
+	  </listitem>
+	</varlistentry>
+
+
+
+</variablelist> 
+</sect2>
+
+
+
+    <!-- ####### DocBook Basics | Structure Elements ####### -->
+
+    
+    <sect2 id="structure"> <title> Structure Elements</title>
+
+      <sect3 id="section">
+        <title>Sections and paragraphs</title>
+        <para>
+          Top-level element of a book body must be
+          <sgmltag>&lt;chapter></sgmltag>; it may contain one or more
+          <sgmltag>&lt;sect1></sgmltag>, each of them may contain
+          <sgmltag>&lt;sect2></sgmltag> and so on up to
+          <sgmltag>&lt;sect5></sgmltag>. The top-level element of an
+          article body is always
+          <sgmltag>&lt;sect1></sgmltag>. Regardless of which elements
+          you use, give each structural element a unique id, so that
+          you can link to it. For usage example, see the template.
+        </para>
+        <para> Please try to avoid using deeply nested sections; for
+          most situations, <sgmltag>&lt;sect1></sgmltag> and
+          <sgmltag>&lt;sect2></sgmltag> should be sufficient. If not,
+          you probably should split your <sgmltag>&lt;sect1></sgmltag>
+          into several smaller ones.
+        </para>
+        <para> Use the tag <sgmltag>&lt;para></sgmltag> for
+          paragraphs, even if there is only one paragraph in a
+          section&mdash;see template for examples.
+        </para>
+      </sect3>
+
+      <sect3 id="notes">
+        <title>Notes, Warnings, And Tips</title>
+        <para>
+          For notes, tips, warnings, and important information, which
+          should be set apart from the main text (usually as a
+          paragraph with some warning sign on the margin), use tags
+          <sgmltag>&lt;note></sgmltag>, <sgmltag>&lt;tip></sgmltag>,
+          <sgmltag>&lt;warning></sgmltag>,
+          <sgmltag>&lt;important></sgmltag> respectively. For example:
+          <programlisting>
+<![CDATA[
+<tip>
+ <title>TIP</title>
+ <para>
+  To speed up program compilation, use <application>gcc</application>
+  compiler with Pentium optimization.
+ </para>
+</tip>]]> </programlisting>  produces
+        </para>
+        <tip id="extip">
+          <title>TIP</title>
+          <para>
+            To speed up program compilation, use
+            <application>gcc</application> compiler with Pentium
+            optimization.  </para>
+        </tip>
+        <para>
+          Note that this should not be inside a
+          <sgmltag>&lt;para></sgmltag> but between paragraphs.
+        </para>
+      </sect3>
+      <sect3 id="figures">
+        <title> Screenshots and other figures</title>
+        <para>
+          To include screenshots and other figures, use the following
+          tags:
+          
+          <programlisting>
+<![CDATA[
+<figure id="shot1">
+ <title>Screenshot</title>
+ <screenshot>
+  <screeninfo>Screenshot of a program</screeninfo>
+  <graphic format="PNG"  fileref="figures/example_screenshot" srccredit="ME">
+  </graphic>
+ </screenshot>
+</figure>]]>
+          </programlisting>
+          replacing <filename>example_screenshot</filename> with the
+          actual file name (without extension). The result will look like this:
+          
+          <figure id="shot1">
+            <title>Screenshot</title>
+            <screenshot>
+              <screeninfo>Screenshot of a program</screeninfo>
+              <graphic format="PNG"
+		       fileref="figures/example_screenshot" srccredit="ME"/>
+              
+            </screenshot>
+          </figure>
+        </para>
+        <note>
+          <title>NOTE</title>
+          <para>
+            Notice in this example that the screenshot file name does
+            not include the file type extension &mdash; to find out
+            why, please read <xref linkend="jadeimages" />.
+          </para>
+        </note>          
+      </sect3>
+      <sect3 id="listing">
+        <title>Program listings and terminal session</title> <para>
+          To show a file fragment&mdash;for example, program
+          listing&mdash;use <sgmltag>&lt;programlisting></sgmltag> tag:
+          <programlisting>
+<![CDATA[
+<programlisting>
+[Desktop Entry] 
+Name=Gnumeric spreadsheet
+Exec=gnumeric 
+Icon=gnome-gnumeric.png 
+Terminal=0
+Type=Application
+</programlisting>]]>
+          </programlisting>
+          which produces
+          <programlisting>
+[Desktop Entry] 
+Name=Gnumeric spreadsheet 
+Exec=gnumeric
+Icon=gnome-gnumeric.png 
+Terminal=0 
+Type=Application
+          </programlisting>
+          As a matter of fact, all examples in this document were
+          produced using <sgmltag>&lt;programlisting></sgmltag>.
+        </para>
+        <para>
+          To show a record of terminal session&mdash;i.e., sequence of
+          commands entered at the command line&mdash;use
+          <sgmltag>&lt;screen></sgmltag> tag:
+          <programlisting>
+<![CDATA[
+<screen>
+<prompt>bash$</prompt><userinput>make love</userinput> 
+make: *** No rule to make target `love'. Stop.
+</screen>]]>
+          </programlisting>
+          which produces
+          <screen>
+<prompt>bash$</prompt><userinput>make love</userinput>  
+make: *** No rule to make target `love'.  Stop.
+          </screen>
+          Note the use of tags <sgmltag>&lt;prompt></sgmltag> and
+          <sgmltag>&lt;userinput></sgmltag> for marking system prompt
+          and commands entered by user.
+          <note>
+            <title>NOTE</title>
+            <para>
+              Note that both <sgmltag>&lt;programlisting></sgmltag>
+              and <sgmltag>&lt;screen></sgmltag> preserve linebreaks,
+              but interpret SGML tags (unlike LaTeX
+              <markup>verbatim</markup> environment). Take a look at
+              the source of this document to see how you can have SGML
+              tags literally shown but not interpreted,
+            </para>
+          </note>
+        </para>
+      </sect3>
+      <sect3 id="lists">
+	<title> Lists</title>
+	<para>
+	  The most common list types  in DocBook are
+	  <sgmltag>&lt;itemizedlist></sgmltag>,
+	  <sgmltag>&lt;orderedlist></sgmltag>, and 
+	  <sgmltag>&lt;variablelist></sgmltag>.
+	</para>
+	<variablelist>
+	  <varlistentry>
+	    <term> <sgmltag>&lt;itemizedlist></sgmltag></term> 
+	    <listitem><para> 
+		This is the simplest unnumbered list, parallel to
+	    <sgmltag>&lt;ul></sgmltag> in HTML. Here is an example: 
+		<programlisting>
+<![CDATA[
+<itemizedlist>
+  <listitem>
+    <para>
+      <guilabel>Show backup files</guilabel> &mdash; This will
+      show any backup file that might be on your system.
+    </para>
+  </listitem>
+  <listitem>
+    <para>
+      <guilabel>Show hidden files</guilabel> &mdash; This will
+      show all "dot files" or files that begin with a dot.  This
+      files typically include configuration files and directories.
+    </para>
+  </listitem>
+  <listitem>
+    <para>
+      <guilabel>Mix files and directories</guilabel> &mdash; This
+      option will  display files and directories in the order you
+      sort them instead of 
+      always having directories shown above files.
+    </para>
+   </listitem>
+</itemizedlist> 
+]]>
+		</programlisting>
+		and output:
+                </para>
+		<itemizedlist>
+		  <listitem>
+		    <para>
+		      <guilabel>Show backup files</guilabel> &mdash;
+		      This will show any backup file that might be on
+		      your system.
+		    </para>
+		  </listitem>
+
+		  <listitem>
+		    <para>
+		      <guilabel>Show hidden files</guilabel> &mdash;
+		      This will show all "dot files" or files that
+		      begin with a dot.  This files typically include
+		      configuration files and directories.
+		    </para>
+		  </listitem>
+
+		  <listitem>
+		    <para>
+		      <guilabel>Mix files and directories</guilabel>
+		      &mdash; This option will display files and
+		      directories in the order you sort them instead
+		      of always having directories shown above files.
+		    </para>
+		  </listitem>
+		</itemizedlist>
+              <para> Note the use of <sgmltag>&amp;mdash;</sgmltag>
+              for long dash (see <xref linkend="specsymb" />). Also,
+              please note that the result looks much nicer because the
+              terms being explained (<guilabel>Show backup
+              files</guilabel>, etc.) are set in a different font. In
+              this case, it was achieved by using <link
+              linkend="gui"><sgmltag>&lt;guilabel></sgmltag></link>
+              tag. In other cases, use appropriate tags such as
+              <link linkend="gui"><sgmltag>&lt;guimenuitem></sgmltag></link>,
+              <link
+              linkend="filenames"><sgmltag>&lt;command></sgmltag></link>,
+              or &mdash; if none of
+              this applies &mdash; use
+              <link linkend="gui"><sgmltag>&lt;emphasis></sgmltag></link>.
+	      </para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term> <sgmltag>&lt;orderedlist></sgmltag></term> 
+	    <listitem><para>
+		This list is completely analogous to
+		<sgmltag>&lt;itemizedlist></sgmltag> and has the same
+		syntax, but  it produces numbered list. By default,
+		this list uses Arabic numerals for numbering entries;
+		you can override this using <sgmltag>numeration</sgmltag>,
+		for example <sgmltag>&lt;orderedlist
+		  numeration="lowerroman"></sgmltag>. Possible values of
+		these attribute are <sgmltag>arabic</sgmltag>,
+		<sgmltag>upperalpha</sgmltag>,
+		<sgmltag>loweralpha</sgmltag>,
+		<sgmltag>upperroman</sgmltag>,
+		<sgmltag>lowerroman</sgmltag>.
+	      </para></listitem>
+	  </varlistentry>
+
+	  <varlistentry>
+	    <term> <sgmltag>&lt;variablelist></sgmltag></term>
+	    <listitem><para> This list is used when each entry is
+	    rather long, so it should be formatted as a block of text
+	    with some subtitle, like a small subsection.  The
+	    <sgmltag>&lt;variablelist></sgmltag> is more complicated
+	    than itemizedlists, but for larger blocks of text, or when
+	    you're explaining or defining something, it's best to use
+	    them.  Their greatest advantage is that it's easier for a
+	    computer to search.  The lines you are reading now were
+	    produced by <sgmltag>&lt;variablelist></sgmltag>. The
+	    source looked liked this:
+		<programlisting>
+<![CDATA[
+<variablelist>
+  <varlistentry>
+    <term> <sgmltag>&lt;itemizedlist></sgmltag></term> 
+    <listitem><para> 
+	This is the simplest unnumbered list, parallel to
+        <sgmltag>&lt;ul></sgmltag> in HTML. Here is an example:...
+    </para></listitem>
+    </varlistentry>
+    <varlistentry>		 
+	<term> <sgmltag>&lt;orderedlist></sgmltag></term>
+     <listitem><para>	
+	This list is completely analogous to
+	<sgmltag>&lt;itemizedlist></sgmltag> 
+    </para></listitem>
+    </varlistentry>
+    <varlistentry>		 
+	<term> <sgmltag>&lt;variablelist></sgmltag></term>
+     <listitem><para>	
+		This list is used when each entry is rather long,...
+    </para></listitem>
+    </varlistentry>
+</variablelist>        
+]]>
+		</programlisting>		
+		</para>
+	    </listitem>
+	  </varlistentry>
+	</variablelist>
+	<para>
+	Lists can be nested; in this case, the stylesheets
+	are smart enough to change the numeration (for
+	<sgmltag>&lt;orderedlist></sgmltag>) or marks of each entry
+	(in  <sgmltag>&lt;itemizedlist></sgmltag>) for sub-lists
+	</para>
+      </sect3>
+
+    </sect2>
+
+<!-- ####### DocBook Basics | Inline Elements ####### -->
+
+    <sect2 id="inline">
+      <title>Inline Elements</title>
+
+      <sect3 id="gui">
+        <title>GUI elements</title>
+        <itemizedlist>
+          <listitem>
+            <para>
+              <sgmltag>&lt;guibutton></sgmltag> &mdash; used for
+              buttons, including checkbuttons and radio buttons
+            </para>
+          </listitem>
+          
+          <listitem>
+            <para>
+              <sgmltag>&lt;guimenu></sgmltag>, 
+              <sgmltag>&lt;guisubmenu></sgmltag> &mdash;used for 
+	      top-level menus and submenus
+              respectively, for example <literal><![CDATA[
+              <guisubmenu>Utilities</guisubmenu> submenu of the
+              <guimenu>Main Menu</guimenu>]]></literal>
+            </para>
+          </listitem>
+          
+          <listitem>
+            <para>
+              <sgmltag>&lt;guimenuitem></sgmltag>&mdash;an entry in a
+              menu
+            </para>
+          </listitem>
+          
+          <listitem>
+            <para>
+              <sgmltag>&lt;guiicon></sgmltag>&mdash;an icon
+            </para>
+          </listitem>
+          
+          <listitem>
+            <para>
+              <sgmltag>&lt;guilabel></sgmltag>&mdash;for items which have
+              labels, like tabs, or bounding boxes. 
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <sgmltag>&lt;interface></sgmltag>&mdash; for most everything
+              else... a window, a dialog box, the Panel, etc.
+            </para>
+          </listitem>
+        </itemizedlist>
+        <para>
+          If you need to refer to a sequence of menu choices, such as
+          <menuchoice>
+            <guimenu>Main Menu</guimenu>
+            <guisubmenu>Utilities</guisubmenu> <guimenuitem>GNOME
+            terminal</guimenuitem>
+          </menuchoice>
+          there is a special construction for this, too:
+          <programlisting>
+<![CDATA[
+<menuchoice>
+ <guimenu>Main Menu</guimenu> <guisubmenu>Utilities</guisubmenu>
+ <guimenuitem>GNOME terminal</guimenuitem> </menuchoice>]]>
+          </programlisting>
+        </para>
+      </sect3>
+
+      <sect3 id="links">
+        <title>Links and references</title>
+        <para>
+          To refer to another place in the same document, you can use
+          tags <sgmltag>&lt;xref></sgmltag> and
+          <sgmltag>&lt;link></sgmltag>. The first of them
+          automatically inserts the full name of the element you refer
+          to (section, figure, etc.), while the second just creates a
+          link (in HTML output). Here is an example:
+          <programlisting>
+<![CDATA[An example of a <link linkend="extip">tip</link> was given in
+<xref linkend="notes" />.  ]]>
+          </programlisting>
+          which produces: An example of a <link
+          linkend="extip">tip</link> was given in  <xref
+          linkend="notes" />.
+        </para>
+        <para>
+          Here <sgmltag>notes</sgmltag> and <sgmltag>extip</sgmltag>
+          are the id attributes of <xref linkend="notes" /> and of the
+          example of a tip in it.
+        </para>
+        <para>  To produce a link  to an external source, such as a
+          Web page or a local file, use <sgmltag>&lt;ulink></sgmltag>
+          tag, for example:
+          <programlisting>
+<![CDATA[ To find more about GNOME, please visit <ulink type="http"
+url="http://www.gnome.org">GNOME Web page</ulink> ]]>
+          </programlisting>
+          which produces:  To find more about GNOME, please visit
+          <ulink type="http" url="http://www.gnome.org">The GNOME Web
+          Site</ulink> You can use any of the standard URL types, such
+          as <literal>http, ftp, file, telnet, mailto</literal> (in
+          most cases, however, use of <literal>mailto</literal> is
+          unnecessary&mdash;see discussion of
+          <sgmltag>&lt;email></sgmltag> tag).
+        </para>
+      </sect3>
+
+      <sect3 id="filenames">  <title>Filenames, commands, and other
+        computer-related things</title>
+        <para>
+          Here are some tags used to describe operating system-related
+          things:  
+        </para>
+	<itemizedlist>
+          <listitem>
+            <para>  <sgmltag>&lt;filename></sgmltag> &mdash; used
+              for filenames,
+              e.g.<sgmltag>&lt;filename></sgmltag>
+                    foo.sgml
+                  <sgmltag>&lt;/filename></sgmltag> 
+              produces: <filename>foo.sgml</filename>.
+            </para>
+          </listitem>
+          <listitem>
+            <para>  <sgmltag>&lt;filename
+              class="directory"></sgmltag> &mdash; used for
+              directories, e.g.<sgmltag>&lt;filename
+              class="directory"></sgmltag>/usr/bin
+                  <sgmltag>&lt;/filename></sgmltag>
+              produces: <filename
+              class="directory">/usr/bin</filename>.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <sgmltag>&lt;application></sgmltag> &mdash; used for
+              application names,
+              e.g. <sgmltag>&lt;application></sgmltag>Gnumeric
+              <sgmltag>&lt;/application></sgmltag> produces:
+              <application>Gnumeric</application>.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+	      <sgmltag>&lt;envar></sgmltag> &mdash; used for
+	      environment variables, e.g. 
+              <sgmltag>&lt;envar></sgmltag>PATH<sgmltag>&lt;/envar></sgmltag>. 
+            </para>
+          </listitem>
+  
+          <listitem>
+            <para>
+              <sgmltag>&lt;command></sgmltag> &mdash; used for
+              commands entered on command line, e.g.
+              <sgmltag>&lt;command></sgmltag>make install
+              <sgmltag>&lt;/command></sgmltag> produces:
+              <command>make install</command>.
+            </para>
+          </listitem>
+          <listitem>
+            <para>
+              <sgmltag>&lt;replaceable></sgmltag> &mdash; used for
+              replaceable text, e.g.
+              <sgmltag>&lt;command></sgmltag>db2html<sgmltag>&lt;replaceable></sgmltag>
+              foo.sgml
+              <sgmltag>&lt;/replaceable></sgmltag><sgmltag>&lt;/command></sgmltag>
+              produces: <command>db2html
+              <replaceable>foo.sgml</replaceable></command>.
+            </para>
+          </listitem>
+        </itemizedlist>  
+      </sect3>
+
+      <sect3 id="keys">   
+        <title>Keyboard input</title> 
+        <para> To mark up text input by the user, use
+        <sgmltag>&lt;userinput></sgmltag>.
+        </para>
+        <para>  To mark keystrokes such as shortcuts and other
+          commands, use <sgmltag>&lt;keycap></sgmltag>. 
+          This is used for marking up what is printed on the top 
+          of the physical key on the keyboard. There are a couple of
+          other tags for keys, too: <sgmltag>&lt;keysym&gt;</sgmltag>
+          and <sgmltag>&lt;keycode&gt;</sgmltag>. However you are
+          unlikely to need these for most documentation. For reference,
+          <sgmltag>&lt;keysym&gt;</sgmltag> is for the <quote>symbolic
+          name</quote> of a key. <sgmltag>&lt;keycode&gt;</sgmltag> is
+          for the <quote>scan code</quote> of a key. These are not
+          terms commonly required in <acronym>GNOME</acronym> documentation,
+          although <sgmltag>&lt;keysym&gt;</sgmltag> is useful for marking
+          up control codes.
+       </para>
+       <para>
+          To mark up a combination of keystrokes, use the
+          <sgmltag>&lt;keycombo></sgmltag> wrapper:
+          <programlisting>
+<![CDATA[
+<keycombo>
+ <keycap>Ctrl</keycap>
+ <keycap>Alt</keycap>
+ <keycap>F1</keycap>
+</keycombo>]]>
+          </programlisting>
+        </para>
+        <para>
+          Finally, if you want to show a shortcut for some menu
+          command, here are the appropriate tags (rather long):
+          <programlisting>
+<![CDATA[
+<menuchoice>
+ <shortcut>
+  <keycombo><keycap>Ctrl</keycap><keycap>q</keycap></keycombo>
+ </shortcut> 
+ <guimenuitem> Quit</guimenuitem> 
+</menuchoice>]]>
+          </programlisting>
+          which produces simply
+          <menuchoice>
+            <shortcut>   <keysym>Ctrl-q</keysym> </shortcut>
+            <guimenuitem> Quit</guimenuitem>
+          </menuchoice>
+        </para>
+      </sect3>
+
+      <sect3 id="email">
+        <title>E-mail addresses</title> <para>  To mark up e-mail
+        address, use <sgmltag>&lt;email></sgmltag>:
+          <programlisting>
+<![CDATA[ The easiest way to get in touch with me is by e-mail
+(<email>me@mydomain.com</email>)]]>
+          </programlisting>
+          which produces: The easiest way to get in touch with me is
+          by e-mail  (<email>me@mydomain.com</email>) Note that
+          <sgmltag>&lt;email></sgmltag> automatically produces a link
+          in html version.
+        </para>
+      </sect3>
+
+      <sect3 id="specsymb">
+	<title> Special symbols </title>
+	<para> 
+	  DocBook also provides special means for entering
+	typographic symbols which can not be entered directly
+	form the keyboard (such as copyright sign). This is done using
+	<emphasis>entities</emphasis>, which is SGML analogue of
+	macros, or commands, of LaTeX. They generally have the form 
+	  <sgmltag>&amp;entityname;</sgmltag>. Note that the semicolon
+	is required. 
+	</para>
+	<para>
+	  here is partial list of most commonly used enitites:
+	</para>
+	<itemizedlist>
+	  <listitem><para>
+             <sgmltag>&amp;amp;</sgmltag> &mdash; ampersend (&amp;)
+	  </para></listitem>
+	  <listitem><para>
+             <sgmltag>&amp;lt;</sgmltag> &mdash; left angle bracket (&lt;)
+	  </para></listitem>
+	  <listitem><para>
+             <sgmltag>&amp;copy;</sgmltag> &mdash; copyright sign (&copy;)
+	  </para></listitem>
+	  <listitem><para>
+             <sgmltag>&amp;mdash;</sgmltag> &mdash; long dash (&mdash;)
+	  </para></listitem>
+	  <listitem><para>
+             <sgmltag>&amp;hellip;</sgmltag> &mdash; ellipsis (&hellip;)
+	  </para></listitem>
+	</itemizedlist>
+	<para>
+	  Note that the actual look of the resulting symbols depends
+	  on the fonts used by your browser; for example, it might
+	  happen that long dash (<sgmltag>&amp;mdash;</sgmltag>) looks
+	  exactly like the usual dash (-). However, in the PostScript
+	  (and thus, in print) the output will look markedly better if
+	  you use appropriate tags. 
+	</para>
+      </sect3>
+    </sect2>
+  </sect1>
+  
+<!-- ################# GDP Documentation Conventions ############### -->
+ 
+  <sect1 id="conventions">
+    <title>GDP Documentation Conventions </title> 
+
+<!-- ####### GDP Documentation Conventions | All Documentation ####### -->
+
+    <sect2 id="conventionsalldocs">
+      <title>Conventions for All GDP Documentation</title>
+      <sect3 id="xmlcomp">
+	<title> XML compatibility </title>
+	<para>
+	  All GNOME documentation  should conform to XML syntax
+	  requirements, which are stricter than SGML ones &mdash; see
+	  <xref linkend="xml" /> for more informaion.
+	</para>
+      </sect3> 
+
+      <sect3 id="authorsnames"> 
+	<title> Authors' names</title>
+	<para> 
+	  All GNOME documentation should contain the names of both the
+	  application authors and documentation authors, as well as a
+	  link to the application web page (if it exists) and
+	  information for bug submission &mdash; see templates for an
+	  example. 
+	  </para>
+      </sect3>
+    </sect2>
+
+<!-- ####### GDP Documentation Conventions | All Documentation ####### -->
+
+    <sect2 id="conventionsappdocs">
+      <title>Conventions for Application Documentation</title>
+
+      <sect3 id="applicationversionid">
+        <title>Application Version Identification</title>
+        <para>
+          Application documentation should identify the version of the
+          application for which the documentation is written:
+          <programlisting>
+<![CDATA[
+<sect1 id="intro">
+ <title>Introduction</title>
+ <para>
+  blah-blah-blah This document describes version 1.0.53 of gfoo.
+ </para>
+</sect1>]]>
+          </programlisting>
+        </para>
+      </sect3>
+      <sect3 id="license">
+	<title> Copyright information </title> 
+        <para> Application
+        documentation should contain a copyright notice, stating the
+        licensing terms. It is suggested that you use the GNU Free
+        Documentation License.  You could also use some other license
+        allowing free redistribution, such as GPL or Open Content
+        license.  If documentation uses some trademarks (such as UNIX,
+        Linux, Windows, etc.), proper legal junk should also be
+        included (see templates).
+	</para>
+      </sect3>
+      <sect3 id="license2">
+       <title>Software license</title>
+       <para> 
+         All GNOME applications must contain information about the
+       license (for software, not for documentation), either in the
+       "About" box or in the manual. 
+       </para>
+      </sect3>
+
+      <sect3 id="bugtraq">
+	<title> Bug reporting</title> 	
+        <para> 
+	  Application documentation should give an address for
+        reporting bugs and for submitting comments about the
+        documentaion (see templates for an example). 
+       </para>
+      </sect3>
+    </sect2>
+  </sect1>
+  
+<!-- ################# Writing Application Manuals ###############-->
+  
+  <sect1 id="writingapplicationmanuals">
+    <title>Writing Application and Applet Manuals</title>
+    <para>
+       Every GNOME application or applet should have a manual specific
+      to that particular application. This manual should be a complete
+      and authoritative guide.  The manual should describe what the
+      program does and how to use it.  Manuals will typically describe
+      each window or panel presented to the user using screenshots (in
+      PNG format only) when appropriate.  They should also describe
+      each feature and preference option available.
+    </para>
+    <note>
+      <title>Documentation Availability</title>
+      <para>
+        Applications and applets should not rely on documentation
+        which is only available on the internet.  All manuals and
+        other documentation should be packaged with the application or
+        applet and be made available to the user through the standard
+        GNOME help system methods described below.
+      </para>
+    </note>
+    <para> Application manuals should be based on the template in
+    <xref linkend="template1" />.  Applet manuals should be based on
+    the templates in <xref linkend="template2-1x" /> for GNOME
+    versions 1.x and the templates in <xref linkend="template2-2x" />
+    for GNOME versions 2.x.
+    </para>
+    <note>
+      <title>Manuals For Large Applications</title>
+      <para>
+        Manuals for very large applications, such as GNOME Workshop
+        components should be a <sgmltag>&lt;book></sgmltag> (and thus
+        use <sgmltag>&lt;chapter></sgmltag> for each primary section)
+        , instead of <sgmltag>&lt;article></sgmltag> which most
+        applications use(with each primary section being a
+        <sgmltag>&lt;sect1></sgmltag>).
+      </para>
+    </note>
+    <note>
+      <title>Applet Manuals in GNOME 2.0</title>
+      <para>
+        Note that applet manuals in GNOME 2.0 are treated in a special
+        way.  The manuals for all applets are merged into a single
+        virtual document by Nautilus.  For this reason, the header
+        information for applet manuals is omitted and the  first
+        section of each applet is
+        <sgmltag>&lt;sect1></sgmltag>. Applet manuals will typically
+        have several sections, each of which is
+        <sgmltag>&lt;sect2></sgmltag>.
+      </para>
+    </note>
+    <para>
+      Application manuals should be made available by having a
+      "Manual" entry in the <guimenu>Help</guimenu> pull-down menu
+      at the top of the 
+      application, as described in <xref linkend="listingdocsinhelpmenu" />.
+      Applets should make their manuals available by
+      right-clicking on the applet. 
+    </para>
+  </sect1>
+  
+
+<!-- ############### Listing Documents in the Help Menu ############# -->
+
+  <sect1 id="listingdocsinhelpmenu">
+    <title>Listing Documents in the Help Menu</title>
+
+    <note>
+      <title>Developer Information</title>
+      <para>
+        This section is for developers.  Documentation authors
+        generally do not need to know this material.
+      </para>
+    </note>
+    <para>
+      Typically the application manual and possibly additional help
+      documents will be made available to the user under the
+      <guimenu>Help</guimenu> menu at the top right of the
+      application. To do this, you must first write a
+      <filename>topic.dat</filename> file. The format for this file is:
+      <programlisting>
+One line for each 'topic'.
+
+Two columns, as defined by perl -e 'split(/\s+/,$aline,2)'
+
+First column is the HTML file (and optional section) for the topic,
+relative to the app's help file dir.
+
+Second column is the user-visible topic name.
+      </programlisting>
+      For example, <application>Gnumeric</application>'s
+      <filename>topic.dat</filename> file is:
+      <programlisting>
+gnumeric.html   Gnumeric manual
+function-reference.html Gnumeric function reference
+      </programlisting>
+      When the application is installed, the
+      <filename>topic.dat</filename> file should be placed in the
+      <filename
+      class="directory">$prefix/share/gnome/help/<replaceable>appname</replaceable>/C/</filename> directory
+      where <replaceable>appname</replaceable> is replaced by the
+      application's name.  The application documentation (converted
+      from SGML into HTML with <command>db2html</command>) should be
+      placed in this directory too.
+    </para>
+    <note>
+      <para>
+       If the help files are not present in the correct directory, the
+       menu items will NOT appear when the program is run. 
+      </para>
+    </note>
+    <para>
+      The <filename>topic.dat</filename> file is used by the GNOME
+      menu building code to generate the <guimenu>Help</guimenu>
+      menu. When you define your menu:  
+<programlisting>
+GnomeUIInfo helpmenu[] = {
+              {GNOME_APP_UI_ITEM, 
+               N_("About"), N_("Info about this program"),
+               about_cb, NULL, NULL, 
+               GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ABOUT,
+               0, 0, NULL},
+               GNOMEUIINFO_SEPARATOR,
+               GNOMEUIINFO_HELP("<emphasis>appname</emphasis>"),
+               GNOMEUIINFO_END
+        };
+</programlisting>
+      the line specifying <varname>GNOMEUIINFO_HELP</varname> causes
+      GNOME to create a menu entry which is tied to the documentation
+      in the directory mentioned above. Also, all the topics in the
+      <filename>topic.dat</filename> file will get menu entries in the
+      <guimenu>Help</guimenu> menu. When the user selects any of these
+      topics from the <guimenu>Help</guimenu> menu, a help browser
+      will be started with the associated HTML documentation.
+    </para>
+  </sect1>
+
+
+<!-- ################# Application Help Buttons ############### -->
+
+  <sect1 id="applicationhelpbuttons">
+    <title>Application Help Buttons</title>
+
+    <note>
+      <title>Developer Information</title>
+      <para>
+        This section is for developers.  Documentation authors
+        generally do not need to know this material.
+      </para>
+    </note>
+    <para>
+      Most GNOME applications will have <guibutton>Help</guibutton>
+      buttons.  These are most often seen in Preference windows. (All
+      Preference windows should have <guibutton>Help</guibutton>
+      buttons.) Most <guibutton>Help</guibutton> buttons will connect
+      to the application manual, although some may connect to special
+      documents.  Because the <guibutton>Help</guibutton> buttons do
+      not generally have their own special documentation, the
+      documentation author(s) do not need to do very much.  However,
+      the application author must be careful to guarantee that the
+      application correctly opens the help documentation when the
+      <guibutton>Help</guibutton> buttons are pressed.  
+    </para>
+    <para>
+      To make the Help buttons call the correct document in the GNOME Help
+      Browser the developer should add code based on the following example:
+    </para>
+    <programlisting>
+gchar *tmp;
+tmp = gnome_help_file_find_file ("module", "page.html");
+if (tmp) {
+  gnome_help_goto(0, tmp);
+  g_free(tmp);
+}
+    </programlisting>
+    <note>
+      <title>NOTE</title>
+      <para>
+        The example above is in the C language, please refer to other
+        documentation or forums for other GNOME language bindings.
+      </para>
+    </note>
+ </sect1>
+
+<!-- ################# Packaging Applet Documentation ############### -->
+
+  <sect1 id="packagingappletdocs">
+    <title>Packaging Applet Documentation</title>
+    <sect2 id="appletfiles">
+      <title>Applet Documentation Files</title>
+      <para>
+        In GNOME 2.0 each applet will have its own documentation
+        installed separately, and the GNOME 2.0 help
+        browser (<application>Nautilus</application>) will dynamically
+        merge the applet documents into a single virtual book
+        called <citetitle>GNOME Applets</citetitle>. During the
+        transitionary stage between GNOME 1.0 and GNOME 2.0, each
+        applet in the gnome-applets package has its own manual(stored
+        with the applet in CVS), but they are merged together manually
+        to create the <citetitle>GNOME Applets</citetitle> book before
+        distribution.  Telsa 
+        <email>hobbit@aloss.ukuu.org.uk</email> is the maintainer of
+        this document.  Applet documentation should be sent to Telsa
+        (or placed in CVS) who will make sure they are correctly
+        packaged with the applets.  The applet author should be
+        contacted to modify the menu items and help buttons to bind to
+        the applet documentation if necessary.
+      </para>
+      <para>
+        Images which are part of the applet documentation should be in
+        PNG format and should reside in the same directory as the SGML
+        document file in CVS(gnome-applets/APPLETNAME/help/C).
+      </para>
+      <para>
+        Applets which are not part of the gnome-applets package must
+        package their documentation with the particular applet
+        package. They should use the same applet template as other
+        applets.  However, the <sgmltag>&lt;xref></sgmltag> links to
+        the introductory chapter of the <citetitle>GNOME
+        Applets</citetitle>  book must be removed (as the 1.x
+        <application>GNOME Help Browser</application> does not allow
+        you to create links between separate documents) and replaced
+        with suitable text.  Note that since this document is not part
+        of the <citetitle>GNOME Applets</citetitle> book, you must
+        remember to add <sgmltag>&lt;legalnotice></sgmltag> and
+        <sgmltag>&lt;copyright></sgmltag> sections.
+      </para>
+    </sect2>
+
+    <sect2 id="appletmenu">
+      <title>Adding Documentation to an Applet Menu</title>
+      <note>
+        <title>Developer Information</title>
+        <para>
+          This section is for developers.  Documentation authors
+          generally do not need to know this material.
+        </para>
+      </note> 
+      <para>
+        Applets should have <guimenu>About</guimenu> and
+        <guimenu>Manual</guimenu> menu items, typically as the first
+        and second top-most items in the menu respectively.  This
+        section describes how the developer creates these menu items
+        and links them to the documentation.
+      </para>
+      <para>
+        To add an applet's manual to its applet menu, use:
+<programlisting>
+/* add an item to the applet menu */
+applet_widget_register_callback(APPLET_WIDGET(applet), "manual",
+_("Manual"), &amp;open_manual, NULL);
+</programlisting>
+        Here the second argument is an arbitrary name for the
+        callback, the third argument is the label which will appear
+        when the user right clicks on the applet, and the fourth
+        argument is the callback function.
+      </para>
+      <para>
+        You will need to write a simple callback function to open the
+        help browser to the appropriate document.  This is done using
+        the <function>gnome_help_file_find_file</function> function,
+        as described in <xref linkend="applicationhelpbuttons" />.
+      </para>
+      <para>
+        You will also want to add an <guimenu>About</guimenu> menu
+        item to the applet's menu.  This is a
+        stock menu item and is done:
+<programlisting>
+applet_widget_register_stock_callback (APPLET_WIDGET(applet), "about",
+       GNOME_STOCK_MENU_ABOUT, _("About"), &amp;my_applet_cb_about,
+       NULL);
+</programlisting>
+      </para>
+      <para>
+        More information can be found at <ulink type="http"
+        url="http://developer.gnome.org/doc/tutorials/applet/index.html">Writing
+        GNOME panel applets using the GTK+/GTK-- widget set</ulink>.
+      </para>
+    </sect2>
+ </sect1>
+
+
+<!-- ################# Writing Context Sensitive Help ###############
+-->
+
+  <sect1 id="writingcontextsensitivehelp">
+    <title>Writing Context Sensitive Help (coming in GNOME-2.0)</title>
+    <para>
+      Context sensitive help, also known as "pop-up" help, will allow
+      a user to obtain help information about specific buttons or
+      parts of an application.
+    </para>
+    <para>
+      Context sensitive help is still under development and not all
+      the details are available at this time. However, the basics can
+      be shown here so that you can understand how the system will
+      work.
+    </para>
+    <para>
+      The Context Sensitive Help system is designed to allow the
+      developer to give an id to a particular portion of the User
+      Interface, for example, a button. Once the interface is complete
+      a Perl script can then be run against the interface code to
+      create a "map" file. This map file allows the developer or
+      writer to associate particular paragraph sections from an XML
+      document to the interface items.
+    </para>
+    <para>
+      The XML used for the document is a small XML DTD that is being
+      developed to use the same tags (albeit, much fewer) as DocBook
+      so that writers do not have to re-learn a new DTD.
+    </para>
+    <para>
+      Once the document is written and map file is complete, when the
+      user launches context sensitive help on the interface (either by
+      pressing a button and then clicking on the interface item they
+      want information on, or by right mouse clicking on the interface
+      item and selecting a pop-up menu item like "What's This") a
+      small transient window will appear with brief but detailed
+      information on the interface item.
+    </para>
+  </sect1>
+
+<!-- ################# Referring to Other GNOME Documentation
+############# -->
+
+  <sect1 id="referring">
+    <title>Referring to Other GNOME Documentation (coming in
+    GNOME-2.0)</title>
+    <para>
+      In the GNOME 2.0 Help System, you will be able to create links
+      from one document to another.  The exact mechanism for doing
+      this is in development.
+    </para>
+  </sect1>
+  
+  
+<!-- ################# Basics of Documentation Style ############### -->
+
+  <sect1 id="basics">
+    <title>Basics of Documentation Style</title>
+    <para>
+       Most people have never enjoyed reading a software manual, and
+       they probably never will.  Many times, they'll read the
+       documentation only when they run into problems, and they'll be
+       frustrated and upset before they even read a word.  On the
+       other hand, some readers will read the manual all the way
+       through, or at least look at the introduction before they
+       start. Your document might serve as a reference for an expert
+       or a guide to a beginner, and it must have enough depth to
+       satisfy the first without overwhelming the second.  Ideally, it
+       will serve beginners as they <emphasis>become</emphasis>
+       experts. Remember, your goal is to produce <emphasis>complete,
+       intuitive and clear</emphasis> documentation.
+    </para>
+    <para>
+       In order to write useful documentation, you'll have to know who
+       your audience is likely to be.  Then, you can look for the
+       problems they're likely to run into, and solve them.  It will
+       also help if you focus on the tasks users will perform, and
+       group features accordingly, rather than simply describing
+       features at random.  
+    </para>
+
+<!--  *********** Basics of Documentation Style: planning -->
+
+    <sect2 id="styleplanning">
+      <title>Planning</title>
+      <para>
+         Begin documenting by learning how to use the application and
+         reading over any existing documentation.  Pay attention to
+         places where your document will differ from the template.  It
+         may help to develop a document skeleton: a valid XML or SGML
+         document that has little or no content.  For very large
+         applications, you will need to make significant departures
+         from the templates, since you'll be using the
+         <sgmltag>&lt;book></sgmltag> tag instead of
+         <sgmltag>&lt;chapter></sgmltag> or
+         <sgmltag>&lt;article></sgmltag>.
+      </para>
+    </sect2>
+
+
+<!-- ####### Basics of Documentation Style | Balance ####### -->
+    <sect2 id="balance">
+      <title>Achieving a Balanced Style</title>
+
+      <para> 
+         Just as you need to juggle expert and novice readers,
+         you'll have to juggle a number of other extremes as you write:
+         <itemizedlist>
+          <listitem>
+	    <para>
+              Documents should be complete, yet concise.  You should
+              describe every feature, but you'll have decide how much
+              detail is really necessary.  It's not, for example,
+              necessary to describe every button and form field in a
+              dialog box, but you should make sure that your readers
+              know how to bring up the dialog and what it does.  If
+              you spend fewer words on the obvious, you can spend more
+              time clarifying the ambiguous labels and explaining
+              items that are more complex.
+            </para>
+          </listitem>
+	  <listitem>
+	    <para>
+              Be engaging and friendly, yet professional. Games
+              documents may be less formal than productivity
+              application documents (people don't
+              <emphasis>use</emphasis> games, they
+              <emphasis>play</emphasis> them), but all of them should
+              maintain a standard of style which holds the reader's
+              interest without resorting to jokes and untranslatable
+              allusions or puns.
+           </para>
+	  </listitem>
+	  
+   	  <listitem>
+	    <para>
+              Examples, tips, notes, and screenshots are useful to
+              break up long stretches of text, but too many can get in
+              the way, and make your documents too choppy to read.
+              It's good to provide a screenshot of any dialog windows
+              a user might run into, but if a dialog box has several
+              tabs, it's not usually necessary to have one for each.
+           </para>
+	  </listitem>
+
+   	  <listitem>
+	    <para>
+              The GDP strives to have all of its documentation conform
+              to certain standards of style and content, but every
+              document (and every writer) is different.  You will need
+              to use your judgement, and write documents to fit with
+              the rest of the project, without compromising the
+              individual needs of your subject, or your own
+              individuality as a writer.
+           </para>
+	  </listitem>
+
+	</itemizedlist>
+       </para>
+    </sect2>
+
+
+<!-- ####### Basics of Documentation Style | Structure ####### -->
+
+    <sect2 id="stylestructure">
+      <title>Structure</title>
+      <para>
+         In general, you won't have to worry too much about structure,
+         because the templates provide you with an excellent example.
+         As a general rule, try to follow that structural example.
+         That means using links, hierarchical nesting, and, if
+         necessary, a glossary or index.  You probably won't need to
+         use every available structural tag, but take advantage of
+         what DocBook provides you.
+      </para>
+      <para>
+         As to linking, there's some disagreement about whether to use
+         <sgmltag>&lt;xref></sgmltag> <sgmltag>&lt;link></sgmltag>
+         when you make links within your documents.  You'll have to
+         decide, based on the different ways that they are presented
+         in output, which is more appropriate given the context.
+         Regardless of which you use, you should not forget to use
+         them.  Help your readers find information that relevant to
+         the issue at hand.
+      </para>
+      <para>
+         The table of contents will be generated automatically, but
+         you will probably have to develop your own index if you wish
+         to have one.  The Nautilus Help Browser will have new, and
+         currently unknown, indexing capabilities, so index style and
+         structure are still under discussion.  The GNOME User's Guide
+         will contain a glossary in its next versions; unless you're
+         writing a<sgmltag>&lt;book></sgmltag>, it will probably be best to
+         contribute to that rather than developing your own.
+      </para>
+    </sect2>
+<!-- ####### Basics of Documentation Style | Grammar & Spelling ####### -->
+
+    <sect2 id="stylegrammar">
+      <title>Grammar and Spelling</title>
+      <para>
+        Nobody expects you to be perfect; they just expect the
+        documentation for their software to be error-free.  That means
+        that, in the same way that developers look for bugs and accept
+        bug reports, writers must check for errors in their documents.
+        Poor grammar, bad spelling, and gross technical errors in
+        draft documents are fine.  However, if those problems show up
+        in a "real" release, they can count against the credibility of
+        GNOME and Linux.  They'll also make you look bad.
+      </para>
+      <para>
+        There is no substitute for a human proofreader; use a
+        spell-check program, then read it over yourself, and then find
+        someone else to help you.  Other GDP members are, of course,
+        willing and able to help you, but non-writers are often at
+        least as helpful.
+      </para>
+      <para>
+        Proofreading documents is both a also a good way to
+        familiarize yourself with documentation, and it certainly
+        makes you valuable to the GDP. Help other writers proof their
+        documents, and they will help you with yours.
+      </para>
+    </sect2>
+  </sect1>
+  
+<!-- ################# Teamwork ############### -->
+
+  <sect1 id="teamwork">
+    <title>Teamwork</title>  <!-- ####### Teamwork | Working With The
+GDP Team ####### -->
+
+    <sect2 id="teamworkgdp">
+      <title>Working With The GDP Team</title>
+      <para>
+        The GDP team is a valuable resource for any documentation
+        author.  GDP members can answer most questions documentation
+        authors have during the course of their work. It is also
+        important to make sure you are not duplicating work of other
+        GDP members by visiting the <citetitle>GDP Documentation
+        Status Table</citetitle> (<ulink
+        url="http://www.gnome.org/gdp/doctable/"
+        type="http">http://www.gnome.org/gdp/doctable/</ulink>) and
+        assigning a documentation item to yourself.  This table also
+        provides a forum for making suggestions and announcements for
+        each documentation item.  The best way to get in touch with
+        GDP members is on the #docs IRC channel at irc.gnome.org or
+        else by emailing the <ulink type="http"
+        url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+        <citetitle>gnome-doc-list mailing list</citetitle></ulink>.
+      </para>
+      <para>
+        After an author has finished a document (or even a draft
+        version of the document), it is a good idea to ask a member of
+        the GDP team to read the document, checking it for grammar,
+        proper DocBook markup, and clarity.  One may typically find
+        another author to do this by either asking on the #docs IRC
+        channel at irc.gnome.org or by emailing the <ulink type="http"
+        url="http://mail.gnome.org/mailman/listinfo/gnome-doc-list/">
+        <citetitle>gnome-doc-list mailing list</citetitle></ulink>.
+      </para>
+    </sect2>
+
+<!-- ####### Teamwork | Working With Developers ####### -->
+
+    <sect2 id="teamworkdevelopers">
+      <title>Working With Developers</title>
+      <para>
+        Writing documentation typically involves a certain amount of
+        interaction with the developers of GNOME or the application
+        which is being documented.  Often a document author will need
+        to ask the developer technical questions during the course of
+        writing a document. After the document is finished, it is good
+        idea to ask the developer to read the document to make sure it
+        is technically correct.  The documentation author should also
+        make sure that the application author correctly binds and
+        packages the documentation with the application.
+      </para>
+    </sect2>
+
+<!-- ####### Teamwork | Working With Users #######
+
+    <sect2 id="teamworkusers">
+      <title>Working With Users</title>
+      <para>
+        Some document authors may wish to get feedback on their
+        documents directly from users.  This may be done by ...
+      </para>
+    </sect2>-->
+  </sect1>
+  
+<!-- ################# Finishing a Document ############### -->
+
+  <sect1 id="finishing">
+    <title>Finishing A Document</title>
+
+<!-- ####### Finishing a Document | Editting the Document ####### -->
+
+    <sect2 id="editting">
+      <title>Editing The Document</title>
+      <para>
+        When the document is finished, the document should be edited
+        by another member of the GDP for spelling, clarity, and
+        DocBook markup. It should also be read by an application
+        author to make sure the document is technically accurate.
+      </para>
+    </sect2>
+
+<!-- ####### Finishing a Document | Submitting the Document ####### -->
+
+    <sect2 id="submitting">
+      <title>Submitting The Document</title>
+      <para>
+        After the document has been edited and checked for technical
+        accuracy, it is ready to be combined with the application or
+        documentation package.  This is typically done by passing the
+        document to the application or package developer.  In some
+        cases, the documents can be committed directly into CVS,
+        however this should only be done after obtaining permission to
+        make CVS commits from the developer.  Note that in many cases,
+        the application may need to be modified to correctly link to
+        the documentation.  The packaging system (tarballs and binary
+        packages) may also need to be modified to include the
+        documentation in the package.  Generally, this should be done
+        by the developers.
+      </para>
+      <para>
+        The final step is to email the GNOME Translation Team at
+        <email>gnome-i18n@nuclecu.unam.mx</email> to notify them that
+        there is a new document for them to translate.
+      </para>
+    </sect2>
+  </sect1>
+  
+<!-- ################# Resources ############### -->
+
+  <sect1 id="resources">
+    <title>Resources</title> 
+<!-- ####### Resources | Resources on the Web ####### -->
+
+    <sect2 id="resourcesweb">
+      <title>Resources On The Web</title> <para>  The <ulink
+      type="http" url="http://developer.gnome.org/projects/gdp/">GNOME
+      Documentation Project Web page</ulink> lists current GDP 
+      projects and members.
+      </para>
+      <para>
+        The <ulink url="http://www.gnome.org/gdp/doctable/"
+        type="http">GDP Documentation Status Table</ulink> tracks the
+        status of all the various documentation components of GNOME.
+      </para>
+      <para>
+        Norman Walsh's  <ulink url="http://www.docbook.org"
+        type="http"> <citetitle>DocBook: The Definitive
+        Guide</citetitle></ulink> in an excellent book on DocBook,
+        available both online and in print.
+      </para>
+    </sect2>
+
+<!-- ####### Resources | Books ####### -->
+
+    <sect2 id="resourcesbooks">
+      <title>Books</title>
+      <para>
+        Docbook: The Definitive Guide is available in both printed
+        form and on the web at:
+        <ulink url="http://www.docbook.org/tdg/index.html">
+        <citetitle>Docbook: The Definitive Guide</citetitle>
+        </ulink>
+      </para>
+    </sect2>
+
+<!-- ####### Resources | Mailing Lists ####### -->
+
+    <sect2 id="mailinglists">
+      <title>Mailing Lists</title>
+      <para>
+        The <emphasis>gnome-docs-list</emphasis> mailing list is the
+        main discussion area for all contributors to the GNOME
+        Documentation Project. You can find out how to subscribe to
+        this list on <ulink
+        url="http://www.gnome.org/resources/mailing-lists.html"
+        type="http">GNOME Mailing Lists</ulink>.  This is a rather
+        low-volume list, so you will not be flooded with messages.
+      </para>
+    </sect2>
+
+<!-- ####### Resources | IRC ####### -->
+
+    <sect2 id="irc">
+      <title>IRC</title>
+      <para>
+        Internet Relay Chat (IRC) is a fast and easy way to get in
+        touch with other GDP members.  There are generally at least a
+        few members here who can answer questions or discuss
+        documentation issues.  The IRC channel is #docs at
+        irc.gnome.org.
+      </para>
+    </sect2>
+  </sect1>
+  
+<!-- ################# Example Docs ###############
+
+  <appendix id="exampledocs">
+    <title>Example Docs</title> 
+
+####### Example Docs | Example 1: Application Manual ####### 
+
+    <sect1 id="ex1">
+      <title>Example 1: Application Manual</title>
+      <programlisting>
+<![CDATA[ (Put sgml here.)]]> </programlisting>
+    </sect1>
+
+####### Example Docs | Example 2: Applet Manual ####### 
+
+    <sect1 id="ex2">
+      <title>Example 2: Applet Manual</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]> </programlisting>
+    </sect1>
+
+##### Example Docs | Example 3: Application Context Sensitive Help ####
+
+    <sect1 id="ex3">
+      <title>Example 3: Application Context Sensitive Help</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]> </programlisting>
+    </sect1>
+
+####### Example Docs | Example 4: Complete Application: gnome-hello  #######
+
+    <sect1 id="ex4">
+      <title>Example 4: Complete Application: gnome-hello</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]> </programlisting>
+    </sect1>
+
+####### Example Docs | Example 5: Tutorial #######
+
+    <sect1 id="ex5">
+      <title>Example 5: Tutorial</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]> </programlisting>
+    </sect1>
+  </appendix>-->
+  
+<!-- ################# Document Templates ############### -->
+
+  <appendix id="templates">
+    <title>Document Templates</title> 
+<!-- ####### Document Templates | Templates 1: Application Manual ####### -->
+
+    <sect1 id="template1">
+      <title>Template 1: Application Manual</title>
+      <para>
+        The following template should be used for all application
+        manuals.  You can always get the latest copy of this
+        template from  <ulink type="http"
+        url="http://developer.gnome.org/projects/gdp/templates.html">GDP
+        Documentation Templates</ulink>.
+        <programlisting>
+
+<![CDATA[
+<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
+        <!-- if not using PNG graphic, replace reference above with
+             .....PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
+         -->
+<!ENTITY version "1.0.53">
+        <!-- replace version above with actual application version number-->
+	<!--  Template Version: 1.0.1  (do not remove this line) -->
+]>
+
+
+<!-- This is a GNOME documentation template, designed by the GNOME
+  Documentation Project Team. Please use it for writing GNOME
+  documentation, making obvious changes. In particular, all the words
+  written in UPPERCASE (with the exception of GNOME) should be
+  replaced. As for "legalnotice", please leave the reference
+  unchanged.
+
+  Remember that this is a guide, rather than a perfect model to follow
+  slavishly. Make your manual logical and readable.  And don't forget
+  to remove these comments in your final documentation!  ;-)
+  -->
+
+<!-- =============Document Header ============================= -->
+
+<article id="index"> <!-- please do not change the id -->
+
+  <artheader>
+    <title>MY-GNOME-APP</title>
+    <copyright>
+      <year>2000</year>
+      <holder>ME-THE-AUTHOR</holder>
+    </copyright>
+
+  <!-- translators: uncomment this:
+
+  <copyright>
+   <year>2000</year>
+   <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
+  </copyright>
+
+   -->
+
+  <!-- do not put authorname in the header except in copyright - use
+  section "authors" below -->
+
+    <legalnotice>
+      <para>
+        Permission is granted to copy, distribute and/or modify this
+        document under the terms of the <citetitle>GNU Free
+        Documentation License</citetitle>, Version 1.1 or any later
+        version published by the Free Software Foundation with no
+        Invariant Sections, no Front-Cover Texts, and no Back-Cover
+        Texts. You may obtain a copy of the <citetitle>GNU Free
+        Documentation License</citetitle> from the Free Software
+        Foundation by visiting <ulink type="http"
+        url="http://www.fsf.org">their Web site</ulink> or by writing
+        to: Free Software Foundation, Inc., 59 Temple Place - Suite
+        330, Boston, MA 02111-1307, USA.
+      </para>
+      <para>
+        Many of the names used by companies to distinguish their
+        products and services are claimed as trademarks. Where those
+        names appear in any GNOME documentation, and those trademarks
+        are made aware to the members of the GNOME Documentation
+        Project, the names have been printed in caps or initial caps.
+      </para>
+    </legalnotice>
+
+  <!-- this is the version of manual, not application --> 
+    <releaseinfo>
+       This is version 1.0 of MY-GNOME-APP manual.
+    </releaseinfo>
+
+  </artheader>
+
+ <!-- ============= Document Body ============================= -->
+
+ <!-- ============= Introduction ============================== -->
+  <sect1 id="intro">
+    <title>Introduction</title>
+
+    <para>
+     <application>MY-GNOME-APP</application> is an application which
+     proves mathematical theorems.  It has all the basic features
+     expected from a mathematical theorem prover, as well as a number
+     of advanced ones, such as proof by confusion.  In fact, many of
+     the proofs produced by <application>MY-GNOME-APP</application>
+     are so complex that they are capable of proving almost anything
+     with a virtually null likelihood of being disproven.  It also has
+     the very popular predecessor of proof by confusion, proof by
+     dialog, first implemented by Plato.
+    </para>
+    <para>
+      It also allows you to save and print theorem proofs and to add
+      comments to the proofs it produces.
+    </para>
+
+    <para>
+      To run <application>MY-GNOME-APP</application>, select
+      <menuchoice>
+	<guisubmenu>SUBMENU</guisubmenu>
+	<guimenuitem>MY-GNOME-APP</guimenuitem>
+      </menuchoice>
+      from the <guimenu>Main Menu</guimenu>, or type
+      <command>MYGNOMEAPP</command> on the command line.
+  </para>
+
+    <para>
+      <application>MY-GNOME-APP</application> is included in the
+      <filename>GNOME-PACKAGE</filename> package, which is part of the
+      GNOME desktop environment. This document describes version
+      &version; of <application>MY-GNOME-APP</application>.
+    </para>
+  </sect1>
+
+
+ <!-- ================ Usage ================================ -->
+ <!-- This section should describe basic usage of the application. -->
+
+  <sect1 id="usage">
+    <title>Using MY-GNOME-APP</title>
+    <para>
+      <application>MY-GNOME-APP</application> can be used to produce a
+      perfect proof of <emphasis>any</emphasis> mathematical theorem
+      (provided, of course, that this theorem is correct), thus
+      providing for new users an easy-to-use graphical interface to
+      modern mathematics. This section describes basic usage of
+      <application>MY-GNOME-APP</application>.
+    </para>
+
+    <!-- ========= Basic Usage =========================== -->
+    <sect2 id="mainwin">
+      <title>Basic usage</title>
+      <para>
+        Starting <application>MY-GNOME-APP</application> opens the
+        <interface>Main window</interface>, shown in <xref
+        linkend="mainwindow-fig">. The window is at first empty.
+
+        <!-- ==== Figure ==== -->
+        <figure id="mainwindow-fig">
+	  <title>MY-GNOME-APP Main Window</title>
+	  <screenshot>
+	    <screeninfo>MY-GNOME-APP Main Window</screeninfo>
+	    <graphic fileref="SCREENSHOT" format="png" srccredit="ME">
+            </graphic>
+	  </screenshot>
+	</figure>
+    <!-- ==== End of Figure ==== -->
+      </para> 
+
+
+ <!-- For this app, one could put "proving" or "edit" (probably even
+      both of them) as sect2's seperate from the main window
+      section. Since they were both so closely involved with the main
+      window, I decided to have them as sect3's isntead. Judgement
+      call. -->
+
+      <sect3 id="proving">
+	<title>Proving a Theorem</title>
+	<para>
+          To get a proof of a theorem, select
+          <menuchoice>
+	    <guisubmenu>File</guisubmenu>
+	    <guimenuitem>New</guimenuitem>
+	  </menuchoice>,
+            which will
+	    bring up the <interface>New Proof</interface> dialog box.
+	    Enter the statement of the theorem in the
+	    <guilabel>Theorem statement</guilabel> field, select your
+	    desired proof type from the drop-down menu, and and press
+	    <guibutton>Prove!</guibutton>.
+        </para>
+	<para>
+          If <application>MY-GNOME-APP</application> cannot prove the
+          theorem by the method you have chosen, or if you have not
+          selected a proof type at all,
+          <application>MY-GNOME-APP</application> will attempt to
+          choose the one that it thinks is most conclusive.  In order,
+          it will attempt to prove the theorem with the following techniques: 
+     
+                <variablelist>
+	    <varlistentry>
+	      <term>Deduction</term>
+	      <listitem>
+		<para>
+                  This is a proof method that is generally accepted
+                  for full credit by Logic professors.
+                </para>
+	      </listitem>
+	    </varlistentry>
+	    <varlistentry>
+            <term>Induction</term>
+	    <listitem>
+	      <para>
+                This logical style will also earn you full credit on
+                your homework.
+             </para>
+	    </listitem>
+            </varlistentry>
+	    <varlistentry>
+	      <term>Dialog</term>
+	      <listitem>
+	      <para>
+                This logical method is best for Philosophy classes,
+                and will probably only merit partial credit on Logic
+                or Mathematics homework.
+              </para>
+	    </listitem>
+            </varlistentry>
+            <varlistentry>
+	      <term>Confusion</term>
+	      <listitem>
+	      <para>
+                Suitable only for political debates, battles of wits
+                against the unarmed, and Philosophy classes focusing
+                on the works of Kant. Use with caution.
+              </para>
+	      </listitem>
+	    </varlistentry>
+	  </variablelist>
+          </para>
+
+   <!-- You might want to include a note, warning, or tip, e.g. -->
+	
+	<warning>
+	  <title>Proving Incorrect Theorms</title>
+	  <para>
+            <application>MY-GNOME-APP</application> cannot prove
+            incorrect theorems. If the theorem you have entered is not
+            demonstrably true, you will get a message to that effect
+            in the main window.  To disprove a theorem, ask
+            <application>MY-GNOME-APP</application> to prove its
+            logical inverse.
+          </para>
+	</warning>
+      </sect3>
+      <sect3 id="editing">
+	<title>Editing Proofs</title>
+	<para>
+          Once you have proven the theorem, it will be displayed in
+          the <interface>main window</interface>.  There, you can read
+          it over, choose text styles for different portions of it,
+          and make comments on it. This section will guide you through
+          that process.
+        </para>
+	<para>
+          To alter text styles, first select the statement you wish to
+          change by clicking on it once.  You can select several
+          statements by Then, choose the style you want to apply from
+          the <guisubmenu>Style</guisubmenu> submenu of the
+          <guimenu>Edit</guimenu> menu.
+          <application>MY-GNOME-APP</application> will convert the
+          text to that style.
+        </para>
+        <para>
+          You can also enter comments on a statement by selecting that
+          statement, and then beginning to type.  Comments will appear
+          after the statement you have selected.
+        </para>
+
+	<note>
+	  <title>Altering The Proofs Themselves</title>
+          <para>
+            <application>MY-GNOME-APP</application> does not allow you
+            to alter a proof it has produced itself.  You can, save
+            your proof as a plain text file (using the
+            <guimenuitem>Save as...</guimenuitem> menu), and alter it
+            that way.  Be aware, however, that
+            <application>MY-GNOME-APP</application> uses its own file
+            format for saved proofs, and cannot re-open a file unless
+            it is in the .mga format.
+          </para>
+	</note>
+      </sect3>
+
+
+  <!-- If there are other functions performed from the main window,
+       they belong here.   -->
+
+    </sect2>
+ 
+    <!-- ========================================================= 
+      Additional Sect2's should describe additional windows, such as
+      larger dialog boxes, or functionality that differs significantly
+      from the most immediate functions of the application. Make the
+      structure logical.
+      =============================================================  -->
+
+
+    <sect2 id="toolbar">
+      <title>Toolbar</title>
+      <para>
+        The toolbar (shown in <xref linkend="figure-usage-toolbar">)
+        provides access to several commonly used routines.
+        <figure id="figure-usage-toolbar">
+	  <title>MY-GNOME-APP Toolbar</title>
+	  <screenshot>
+	    <screeninfo>MY-GNOME-APP Toolbar</screeninfo>
+	    <graphic fileref="usage-toolbar.png" format="png"></graphic>
+	  </screenshot>
+	</figure>
+        <variablelist>
+	  <varlistentry>
+	    <term>New</term>
+	    <listitem>
+	      <para>
+                Brings up the <interface>New Theorem</interface>
+                dialog.
+              </para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term>Open</term>
+	    <listitem>
+	      <para>
+                 Open an exisiting theorem you want to prove, or a
+                 completed proof you wish to print or format.
+               </para>
+	    </listitem>
+	  </varlistentry>
+	  <varlistentry>
+	    <term>Save</term>
+	    <listitem>
+	      <para>
+	         Save the current theorem permanently in a
+	         file.
+               </para>
+	    </listitem> 
+	  </varlistentry>
+	</variablelist>
+       </para>
+    </sect2>
+    <!-- ========= Menus =========================== --> 
+
+    <sect2 id="menubar">
+
+       <!-- Describing the menubar ensures comprehensive feature
+       coverage. Nest itemizedlists inside variablelists so that each
+       menu is easily located by indexing software. Proper indentation
+       makes it easier! -->
+
+      <title>Menus</title>
+      <para>
+	The menu bar, located at the top of the <interface>Main
+	Window</interface>, contains the following menus:
+       </para>
+      <variablelist>
+	<varlistentry>
+	  <term><guimenu>File</guimenu></term>
+	  <listitem>
+	    <para>
+	       This menu contains:
+	       <itemizedlist>
+		<listitem>
+		  <para>
+	            <menuchoice>
+		      <shortcut>
+			<keycap>F3</keycap>
+		      </shortcut>
+		      <guimenuitem>Open</guimenuitem>
+		     </menuchoice>
+	             &mdash; This opens a file which is saved on your computer.
+	           </para>
+		</listitem>
+		<listitem>
+		  <para>
+	             <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>S</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Save</guimenuitem>
+		    </menuchoice>
+	            &mdash; This saves your file.
+	          </para>
+		</listitem>
+		<listitem>
+		  <para>
+	             <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>W</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Close</guimenuitem>
+		    </menuchoice>
+	            &mdash; This closes your file.
+	          </para>
+		</listitem>
+		<listitem>
+		  <para>
+	            <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>Q</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Exit</guimenuitem>
+		    </menuchoice>
+	            &mdash; This quits the application.
+	          </para>
+		</listitem>
+	      </itemizedlist>
+	  </para>
+	  </listitem>
+	</varlistentry>
+	
+	<varlistentry>
+	  <term><guimenu>Edit</guimenu></term>
+	  <listitem>
+	    <para>
+	   This menu contains:
+	   <itemizedlist>
+		<listitem>
+		  <para>
+	            <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>X</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Cut</guimenuitem>
+		    </menuchoice>
+	            &mdash; This removes any text or data which is selected and
+	            places it in the buffer.
+	          </para>
+		</listitem>
+		<listitem>
+		  <para>
+	            <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>C</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Copy</guimenuitem>
+		    </menuchoice>
+	            &mdash; This copies any text or data which is selected into
+	            the buffer.
+	          </para>
+		</listitem>
+		<listitem>
+		  <para>
+	           <menuchoice>
+		      <shortcut>
+			<keycombo><keycap>Ctrl</keycap><keycap>V</keycap></keycombo>
+		      </shortcut>
+		      <guimenuitem>Paste</guimenuitem>
+		    </menuchoice>
+	            &mdash; This pastes any text or data which is copied into
+	            the buffer.
+	        </para>
+		</listitem>
+		<listitem>
+		  <para>
+	             <guimenuitem>COMMAND1&hellip;</guimenuitem>
+	             &mdash; This opens the <interface>COMMAND1</interface>
+	             dialog, which is used to ....
+	          </para>
+		</listitem>
+		<listitem>
+		  <para>
+	            <guimenuitem>COMMAND2</guimenuitem>
+	            &mdash; This ....
+	          </para>
+		</listitem>
+	      </itemizedlist>
+	    </para>
+	  </listitem>
+	</varlistentry>
+	
+
+	<varlistentry>
+	  <term><guimenu>Settings</guimenu></term>
+	  <listitem>
+	    <para>
+	   This menu contains:
+	   <itemizedlist>
+		<listitem>
+		  <para>
+	      <guimenuitem>Preferences&hellip;</guimenuitem>
+	       &mdash; This opens the <link
+	       linkend="prefs"><interface>Preferences
+	       Dialog</interface></link>, which allows you to configure
+	       many settings.
+	     </para>
+		</listitem>
+		<listitem>
+		  <para>
+	            <guimenuitem>COMMAND3</guimenuitem> &mdash;
+    	            This command does something.
+    	    	   </para>
+		</listitem>
+	      </itemizedlist>
+	    </para>
+	  </listitem>
+	</varlistentry>
+	
+	<varlistentry>
+	  <term><guimenu>Help</guimenu></term>
+	  <listitem>
+	    <para>
+	      This menu contains:
+	       <itemizedlist>
+		<listitem>
+		  <para>
+	             <guimenuitem>Manual</guimenuitem> &mdash; This
+    	              opens the <application>GNOME Help
+    	              Browser</application> and displays this manual.
+	          </para>
+		</listitem>
+		
+		<listitem>
+		  <para>
+	            <guimenuitem>About</guimenuitem> &mdash; This
+    	            opens the <interface>About</interface> dialog
+    	            which shows basic information about
+    	            <application>MY-GNOME-APP</application>, such as
+    	            the author's name, the application version number,
+    	            and the URL for the application's Web page if one
+    	            exists.
+	          </para>
+		</listitem>
+	      </itemizedlist>
+            </para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </sect2>
+  </sect1>
+
+
+
+ <!-- ============= Customization ============================= -->
+
+ <sect1 id="prefs">
+  <title>Customization</title>
+  <para>
+   To change the application settings, select
+   <menuchoice>
+    <guimenu>Settings</guimenu>
+    <guimenuitem>Preferences...</guimenuitem>
+   </menuchoice>.  This opens the
+   <interface>Preferences</interface> dialog, shown in <xref
+   linkend="preferences-fig">.
+  </para>
+
+  <figure id="preferences-fig">
+   <title>Preferences Dialog</title>
+   <screenshot>
+    <screeninfo>Preferences Dialog</screeninfo>
+    <graphic fileref="SCREENSHOT" format="png"
+     srccredit="ME">
+    </graphic>
+   </screenshot>
+  </figure>
+
+  <para>
+   The properties in the <guilabel>PREFSTABNAME</guilabel> tab are:
+   
+   <!--many people use itemizedlists in cases like this. Variablelists
+   are more appropriate -->
+
+      <variablelist>
+	<varlistentry>
+	  <term> <guilabel>Default Text Style</guilabel></term>
+	  <listitem>
+	    <para>
+              Select the default text style for statements in your
+              proof.  You can still change the style for individual
+              proofs or sections of a proof at a later date.
+            </para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>(Configuration Item Label)</term>
+	  <listitem>
+	    <para>
+             (Description of Configuration)
+             </para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>(Configuration Item Label)</term>
+	  <listitem>
+	    <para>
+             (Description of Configuration)
+             </para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </para>
+
+    <para>
+     The properties in the <guilabel>SECONDTABNAME</guilabel> tab are:
+       <variablelist>
+	<varlistentry>
+	  <term>(Configuration Item Label)</term>
+	  <listitem>
+	    <para>
+             (Description of Configuration)
+             </para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>(Configuration Item Label)</term>
+	  <listitem>
+	    <para>
+             (Description of Configuration)
+             </para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </para>
+
+  <para>
+    After you have made all the changes you want, click on
+    <guibutton>OK</guibutton> to apply the changes and close the
+    <interface>Properties</interface> dialog. To cancel the changes
+    and return to previous values, click the
+    <guibutton>Close</guibutton> button.
+  </para>
+
+ </sect1>
+
+
+ <!-- ============= Various Sections ============================= -->
+
+ <!-- Here you should add, if necessary, several more sect1's,
+ describing other windows (besides the main one), file formats,
+ preferences dialogs,  etc. as appropriate. Try not to make any of
+ these sections too long. -->
+
+
+ <!-- ============= Bugs ================================== -->
+ <!-- This section should describe known bugs and limitations of
+      the program if there are any - please be frank and list all
+      problems you know of. -->
+ <sect1 id="bugs">
+  <title>Known Bugs and Limitations</title>
+  <para>
+   This application has no known bugs.
+  </para>
+ </sect1>
+
+
+<!-- ============= Authors ================================ -->
+
+ <sect1 id="authors">
+  <title>Authors</title>
+  <para>
+   <application>MY-GNOME-APP</application> was written by GNOME-HACKER
+   (<email>hacker@gnome.org</email>). To find more information about
+   <application>MY-GNOME-APP</application>, please visit the <ulink
+   url="http://www.my-gnome-app.org" type="http">MY-GNOME-APP Web
+   page</ulink>.  Please send all comments, suggestions, and bug
+   reports to the <ulink url="http://bugs.gnome.org" type="http">GNOME
+   bug tracking database</ulink>. (Instructions for submitting bug
+   reports can be found <ulink
+   url="http://bugs.gnome.org/Reporting.html" type="http">
+   on-line</ulink>.)  You can also use <application>Bug Report
+   Tool</application> (<command>bug-buddy</command>), available in the
+   <guisubmenu>Utilities</guisubmenu> submenu of <guimenu>Main
+   Menu</guimenu>, for submitting bug reports.
+  </para>
+
+  <para>
+   This manual was written by ME
+   (<email>MYNAME@MYADDRESS</email>). Please send all comments and
+   suggestions regarding this manual to the <ulink type="http"
+   url="http://developer.gnome.org/projects/gdp">GNOME Documentation 
+   Project</ulink> by sending an email to 
+   <email>docs@gnome.org</email>. You can also add your comments online 
+   by using the <ulink type="http" 
+   url="http://www.gnome.org/gdp/doctable/">GNOME Documentation Status
+   Table</ulink>.
+  </para>
+
+  <!-- For translations: uncomment this:
+
+  <para>
+   Latin translation was done by ME
+   (<email>MYNAME@MYADDRESS</email>). Please send all  comments  and
+   suggestions regarding this translation to SOMEWHERE.
+  </para>
+
+  -->
+
+ </sect1>
+
+
+ <!-- ============= Application License ============================= -->
+
+ <sect1 id="license">
+  <title>License</title>
+  <para>
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the <citetitle>GNU General Public
+   License</citetitle> as published by the Free Software Foundation;
+   either version 2 of the License, or (at your option) any later
+   version.
+  </para>
+  <para>
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   <citetitle>GNU General Public License</citetitle> for more details.
+  </para>
+  <para>
+   A copy of the <citetitle>GNU General Public License</citetitle> is
+   included as an appendix to the <citetitle>GNOME Users
+   Guide</citetitle>.  You may also obtain a copy of the
+   <citetitle>GNU General Public License</citetitle> from the Free
+   Software Foundation by visiting <ulink type="http"
+   url="http://www.fsf.org">their Web site</ulink> or by writing to
+   <address>
+    Free Software Foundation, Inc.
+    <street>59 Temple Place</street> - Suite 330
+    <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
+    <country>USA</country>
+   </address>
+  </para>
+ </sect1>
+</article>
+
+
+
+
+
+
+
+
+
+]]>
+
+
+</programlisting>
+      </para>
+    </sect1>
+
+<!-- ####### Document Templates | Templates 2-1.x: Applet Manual ####### -->
+
+    <sect1 id="template2-1x">
+      <title>Template 2: Applet Manual For GNOME 1.x</title>
+      <para>
+        The following templates should be used for all applet
+        manuals in GNOME 1.x releases.  You can always get the latest
+        copy of these templates from  <ulink type="http"
+        url="http://developer.gnome.org/projects/gdp/templates.html">GDP
+        Documentation Templates</ulink>.  Note that the template
+        consists of two files; the first file calls the second as an
+        entity. You should name the first file
+        <filename><replaceable>appletname</replaceable>-applet.sgml</filename>
+        and the second file should be named
+        <filename><replaceable>appletname</replaceable>.sgml</filename>,
+        where
+        <filename><replaceable>appletname</replaceable></filename> is
+        the name of the applet.
+        <programlisting>
+
+<![CDATA[
+<!DOCTYPE Article PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
+ <!entity APPLETNAME.sgml SYSTEM "applet_template_1.sgml">
+        <!--  Template Version: 1.0.1  (do not remove this line) -->
+]>
+
+<!-- This is a GNOME documentation template, designed by the GNOME
+  Documentation Project Team. Please use it for writing GNOME
+  documentation, making obvious changes. In particular, all the words
+  written in UPPERCASE (with the exception of GNOME) should be
+  replaced. As for "legalnotice", please leave the reference
+  unchanged,make sure to add/remove trademarks to the list as
+  appropriate for your document.
+
+  Please don't forget to remove these comments in your final documentation,
+  thanks ;-).
+-->
+
+<article id="index"> <!-- please do not change the id -->
+
+ <!-- ============= Document Header ============================= -->
+ <artheader> 
+  <title>APPLETNAME Applet</title>
+  <copyright>
+   <year>2000</year>
+   <holder>YOURFULLNAME</holder>
+  </copyright>
+
+  <!-- translators: uncomment this:
+
+  <copyright>
+   <year>2000</year>
+   <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
+  </copyright>
+
+   -->
+
+  <!-- do not put authorname in the header except in copyright - use
+  section "authors" below -->
+
+  <legalnotice>
+   <para>
+    Permission is granted to copy, distribute and/or modify this
+    document under the terms of the <citetitle>GNU Free Documentation
+    License</citetitle>, Version 1.1 or any later version published
+    by the Free Software Foundation with no Invariant Sections, no
+    Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
+    of the <citetitle>GNU Free Documentation License</citetitle> from
+    the Free Software Foundation by visiting <ulink type="http"
+    url="http://www.fsf.org">their Web site</ulink> or by writing to:
+    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+   </para>
+   <para>
+    Many of the names used by companies to distinguish their products and
+    services are claimed as trademarks. Where those names appear in any
+    GNOME documentation, and those trademarks are made aware to the members
+    of the GNOME Documentation Project, the names have been printed in caps
+    or initial caps.
+   </para>
+  </legalnotice>
+
+  <releaseinfo>
+   This is version XXX of the APPLETNAME applet manual.
+  </releaseinfo>
+ </artheader>
+
+ <!-- ============= Document Body ============================= -->
+
+ &APPLETNAME.sgml;
+
+</article>
+
+
+]]>
+
+
+</programlisting>
+        <programlisting>
+<![CDATA[
+        <!--  Template Version: 1.0.1  (do not remove this line) -->
+
+ <sect1 id="APPLET">
+  <title>APPLET Applet</title>
+
+  <para>
+   <application>APPLET</application> applet, shown in <xref
+   linkend="APPLETapplet-fig">, allows you to &hellip;.  To add this
+   applet to a <interface>Panel</interface>, 
+   right-click on the <interface>Panel</interface> and choose
+   <menuchoice>
+    <guimenu>Panel</guimenu>
+    <guisubmenu>Add to panel</guisubmenu>
+    <guisubmenu>Applet</guisubmenu>
+    <guisubmenu>SECTION</guisubmenu>
+    <guimenuitem>APPLET</guimenuitem>
+   </menuchoice>.
+  </para>
+
+  <figure id="APPLETapplet-fig">
+   <title>APPLET Applet</title>
+   <screenshot>
+    <screeninfo>APPLET Applet</screeninfo>
+    <graphic format="png" fileref="APPLET_applet" 
+    srccredit="YOURNAME">
+    </graphic>
+   </screenshot>
+  </figure>
+
+  <!-- ============= Usage  ================================ -->
+  <sect2 id="APPLET-usage">
+   <title>Usage</title>
+   <para>
+    (Place a short description of how to use the applet here.)
+   </para>
+
+   <para>
+    Right-clicking on the applet brings up a menu containing the
+    following items:
+    <itemizedlist>
+
+     <listitem>
+      <para>
+       <guimenuitem>Properties&hellip;</guimenuitem> &mdash;
+       opens the <link linkend="APPLET-prefs">
+       <guilabel>Properties</guilabel></link> dialog.
+      </para>
+     </listitem>
+
+     <listitem>
+      <para>
+       <guimenuitem>Help</guimenuitem> &mdash;
+       displays this document.
+      </para>
+     </listitem>
+
+     <listitem>
+      <para>
+       <guimenuitem>About&hellip;</guimenuitem> &mdash;
+       shows basic information about <application>APPLET
+       Applet</application>, including the applet's version and the
+       author's name.
+      </para>
+     </listitem>
+
+    </itemizedlist>
+   </para>
+  </sect2>
+
+
+  <!-- ============= Customization ============================= -->
+  <sect2 id="APPLET-prefs">
+    <title>Customization</title>
+    <para>
+      You can customize <application>APPLET</application>
+      applet by right-clicking on it and choosing
+      <guimenuitem>Properties&hellip;</guimenuitem>. This will open the
+      <interface>Properties</interface> dialog(shown in <xref
+      linkend="APPLET-settings-fig">), which allows you to
+      change various settings.
+    </para>
+
+    <figure id="APPLET-settings-fig">
+     <title>Properties dialog</title>
+     <screenshot>
+      <screeninfo>Properties dialog</screeninfo>
+      <graphic format="png" fileref="APPLET_settings"
+      srccredit="YOURNAME">
+      </graphic>
+     </screenshot>
+    </figure>
+
+    <para>
+     The properties are:
+     <itemizedlist>
+
+      <listitem>
+       <para>
+        (Configuration Item Label) &mdash; If this button is
+        checked&hellip;(description)
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        (Configuration Item Label) &mdash; Selecting this
+        button&hellip;(description)
+       </para>
+      </listitem>
+
+      <listitem>
+       <para>
+        (Configuration Item Label) &mdash; Enter the name of
+        &hellip;(description)
+       </para>
+      </listitem>
+     </itemizedlist>
+    </para>
+
+    <para> 
+      After you have made all the changes you want, click on
+      <guibutton>OK</guibutton> to apply the changes and close the
+      <interface>Properties</interface> dialog. To cancel the changes
+      and return to previous values, click the
+      <guibutton>Close</guibutton> button.
+    </para>
+  </sect2>
+
+
+  <!-- ============= Bugs ================================== -->
+  <!-- This section should describe known bugs and limitations of
+       the program if there are any - please be frank and list all
+       problems you know of -->
+  <sect2 id="bugs">
+   <title>Known Bugs and Limitations</title>
+   <para>
+    This applet has no known bugs.
+   </para>
+  </sect2>
+
+
+  <!-- ============= Authors ================================ -->
+
+  <sect2 id="authors">
+   <title>Authors</title>
+   <para>
+    <application>APPLET</application> was written by GNOME-HACKER
+    (<email>hacker@gnome.org</email>).  Please send all comments,
+    suggestions, and bug 
+    reports to the <ulink url="http://bugs.gnome.org" type="http">GNOME
+    bug tracking database</ulink>. (Instructions for submitting bug
+    reports can be found <ulink
+    url="http://bugs.gnome.org/Reporting.html" type="http">
+    on-line</ulink>.  You can also use <application>Bug Report
+    Tool</application> (<command>bug-buddy</command>), available in the
+    <guisubmenu>Utilities</guisubmenu> submenu of <guimenu>Main
+    Menu</guimenu>, for submitting bug reports.
+   </para>
+
+   <para>
+    This manual was written by ME
+    (<email>MYNAME@MYADDRESS</email>). Please send all comments and
+    suggestions regarding this manual to the <ulink type="http"
+    url="http://developer.gnome.org/projects/gdp">GNOME Documentation
+    Project</ulink>  by sending an email to
+    <email>docs@gnome.org</email>. You can also submit comments online
+    by using the <ulink type="http"
+    url="http://www.gnome.org/gdp/doctable/">GNOME Documentation
+    Status Table</ulink>.
+   </para>
+
+   <!-- For translations: uncomment this:
+
+   <para>
+    Latin translation was done by ME
+    (<email>MYNAME@MYADDRESS</email>). Please send all  comments  and
+    suggestions regarding this translation to SOMEWHERE.
+   </para>
+
+   -->
+
+  </sect2>
+
+
+  <!-- ============= Application License ============================= -->
+
+  <sect2 id="license">
+   <title>License</title>
+   <para>
+    This program is free software; you can redistribute it and/or
+    modify it under the terms of the <citetitle>GNU General Public
+    License</citetitle> as published by the Free Software Foundation;
+    either version 2 of the License, or (at your option) any later
+    version.
+   </para>
+   <para>
+    This program is distributed in the hope that it will be useful, but
+    WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    <citetitle>GNU General Public License</citetitle> for more details.
+   </para>
+   <para>
+    A copy of the <citetitle>GNU General Public License</citetitle> is
+    included as an appendix to the <citetitle>GNOME Users
+    Guide</citetitle>.  You may also obtain a copy of the
+    <citetitle>GNU General Public License</citetitle> from the Free
+    Software Foundation by visiting <ulink type="http"
+    url="http://www.fsf.org">their Web site</ulink> or by writing to
+    <address>
+     Free Software Foundation, Inc.
+     <street>59 Temple Place</street> - Suite 330
+     <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
+     <country>USA</country>
+    </address>
+   </para>
+  </sect2>
+
+ </sect1>
+
+
+
+
+]]>
+
+
+
+</programlisting>
+      </para>
+    </sect1>
+
+<!-- ####### Document Templates | Templates 2-2.x: Applet Manual ####### -->
+
+    <sect1 id="template2-2x">
+      <title>Template 2: Applet Manual For GNOME 2.x</title>
+      <para>
+        The following templates should be used for all applet
+        manuals in GNOME 2.x releases.  You can always get the latest
+        copy of these templates from  <ulink type="http"
+        url="http://developer.gnome.org/projects/gdp/templates.html">GDP
+        Documentation Templates</ulink>.
+      </para>
+      <para>
+        Note that this template consists of two files.  The first file
+        is an introductory chapter. You should not modify this
+        chapter. The second file is the actual applet document, which
+        you should modify to describe the applet you are documenting.
+        You can name the first file whatever you like, such as
+        <filename>gnome-applets.sgml</filename>.  Name the second file
+        according to the applet's name:
+        <filename><replaceable>appletname</replaceable>-applet.sgml</filename>.
+        Make sure you update the entity
+        at the top of the shell document to reflect the new name of
+        the applet document.
+      </para>
+      <para>
+        <programlisting>
+<![CDATA[
+<!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.1//EN"[
+<!ENTITY TEMPLATE-APPLET SYSTEM "gnome-applet-template.sgml.part">
+
+]>
+
+<book id="gnome-applets">
+
+ <bookinfo>
+  <title>GNOME Applets</title>
+  <authorgroup>
+   <author><firstname>Telsa</firstname><surname>Gwynne</surname></author>
+   <author><firstname>John</firstname><surname>Fleck</surname></author>
+   <author><firstname>David</firstname><surname>Mason</surname>
+      <affiliation><orgname>Red Hat, Inc.</orgname></affiliation>
+    </author>
+    <author><firstname>Dan</firstname><surname>Mueth</surname></author>
+    <author><firstname>Alexander</firstname><surname>Kirillov</surname></author>
+  </authorgroup>
+  <edition>GNOME Applets version 0.1 for GNOME 1.1.5</edition>
+  <pubdate>2000</pubdate>
+  <copyright>
+   <year>2000</year>
+   <holder>Telsa Gwynne, John Fleck, Red Hat Inc., Dan Mueth, and
+    Alexander Kirillov</holder> 
+  </copyright>
+  <legalnotice>
+   <para>
+    Permission is granted to make and distribute verbatim copies of this
+    manual provided the copyright notice and this permission notice are
+    preserved on all copies.
+   </para>
+   <para>
+    Permission is granted to copy and distribute modified versions of
+    this manual under the conditions for verbatim copying, provided that
+    the entire resulting derived work is distributed under the terms of a
+    permission notice identical to this one.
+   </para>
+   <para>
+    Permission is granted to copy and distribute translations of this
+    manual into another language, under the above conditions for modified
+    versions, except that this permission notice may be stated in a
+    translation approved by the Free Software Foundation.
+   </para>
+   <para>
+    Many of the names used by companies to distinguish their products and
+    services are claimed as trademarks. Where those names appear in any
+    GNOME documentation, and those trademarks are made aware to the members
+    of the GNOME Documentation Project, the names have been printed in caps
+    or initial caps.
+   </para>
+  </legalnotice>
+ </bookinfo>
+
+ <!-- #### Introduction ###### -->
+ <chapter id="applets-intro">
+  <title>Introduction</title> 
+
+  <!-- #### Intro | What Are Applets? ###### -->
+  <sect1 id="applets-what-are">
+   <title>What Are Applets?</title> 
+   <para>
+    Applets are one of the most popular and useful objects you can add
+    to your <interface>Panel</interface> to customize your desktop.
+    An applet is a small application which runs inside a small area of
+    your <interface>Panel</interface>. Applets have been written for
+    a wide range of purposes.  Some are very powerful interactive
+    tools, such as the <application>Tasklist</application> Applet
+    which allows you to easily 
+    control all of your main applications.  Others are simple system
+    monitors, displaying information such as the amount of power left
+    in the battery on your laptop (see <application>Battery Charge
+    Monitor</application>) or weather
+    information(see <application>GNOME Weather</application>).  Some
+    are simply for amusement(see <application>Fish</application>).
+   </para>
+
+   <para>
+    Applets are similar to swallowed applications in that both of them
+    reside within the <interface>Panel</interface>. However, 
+    swallowed applications are generally applications which were
+    not designed to run within the <interface>Panel</interface>.
+    Typically one will swallow an application which already exists in
+    the main <interface>desktop</interface> area, putting it into your
+    <interface>Panel</interface>.  The application will continue to
+    run in the <interface>Panel</interface> until you end the
+    application or  unswallow it,  placing it back onto the main part of
+    your desktop when you need to.
+   </para>
+
+   <para>
+    <figure id="example-applets-fig">
+     <title>Example Applets</title>
+     <screenshot>
+      <screeninfo>Example Applets</screeninfo>
+       <graphic fileref="example_applets" format="png"
+       srccredit="muet">
+       </graphic>
+     </screenshot>
+    </figure>
+    Several example applets are shown in <xref
+    linkend="example-applets-fig">.  From left to right, they are: (1)
+    <application>Mixer Applet</application>, which allows you to turn
+    on/off sound and control its volume by clicking on the applet.  (2)
+    <application>Sound Monitor</application> Applet, which displays
+    the current volume of sound being played and allows you to control
+    various sound features.  (3) <application>GTCD</application>
+    Applet, a CD player which has all its controls
+    available in the applet and displays the track and time. (4)
+    <application>Drive Mount</application> Applet, used to mount and
+    unmount drives with a single click of the mouse. (5)
+    <application>Desk Guide</application> which allows you to view
+    and control multiple virtual screens. (6)
+    <application>Tasklist</application> Applet which allows you to
+    control your various windows and applications.
+   </para>
+   <para>
+    There are many other applets to choose from.  The rest of this
+    chapter will explain the basic information to get you started
+    adding, moving, and removing applets from your
+    <interface>Panels</interface> and using them. The following
+    chapters go through each of the standard GNOME applets describing
+    them in detail.  There are also additional applets which can be
+    downloaded off the Web.   See <ulink type="http"
+     url="http://www.gnome.org/applist/list-martin.phtml">The GNOME
+    Software Map</ulink> for lists of additional GNOME applications
+    and applets. 
+   </para>
+   <para>
+    As you read through the the rest of this chapter, you should try
+    adding and removing applets from your <interface>Panel</interface> and
+    experiment with them freely.  
+   </para>
+  </sect1>
+
+  <!-- #### Intro | Adding, Moving, and Removing Applets ###### -->
+  <sect1 id="applet-add-move-replace">
+   <title>Adding, Moving, and Removing Applets</title>
+
+   <sect2 id="adding-applets">   
+    <title>Adding Applets to a Panel</title>
+    <para>
+     To add an applet to a <interface>Panel</interface>, right-click
+     on the <interface>Panel</interface> and select 
+     <menuchoice><guimenu>Panel</guimenu><guisubmenu>Add to panel</guisubmenu>
+     <guisubmenu>Applet</guisubmenu></menuchoice>. This will show you
+     the menu of all the applets on your system, divided into
+     categories. Choosing any applet from this menu will add it to the
+     <interface>Panel</interface>.
+    </para>
+   </sect2>
+
+   <sect2 id="moving-applets">
+    <title>Moving Applets In or Between Panels</title>
+    <para>
+     It is easy to move applets in a <interface>Panel</interface> or
+     between two <interface>Panels</interface>. If you have a
+     three-button mouse, just move the mouse over the applet, depress
+     the middle mouse button and drag the applet to its new location,
+     releasing the middle mouse button when you are finished.  Note
+     that you can drag applets within a <interface>Panel</interface>
+     or between two <interface>Panels</interface> this way. If you
+     don't have a three-button mouse, just 
+     right-click on the applet and choose
+     <guimenuitem>Move</guimenuitem>. The cursor will turn into a
+     cross and the applet will move with your mouse until you press
+     any mouse button to indicate you are finished moving it.
+     If, in the course of this movement, it hits
+     other objects, the behavior depends on the global preferences
+     you have set for your <interface>Panels</interface> in the
+     <application>GNOME Control Center</application>: the applet you are
+     moving can switch places with other objects, "push" all objects
+     it meets, or "jump" over all other objects without disturbing
+     them. You can also override the default behavior by holding
+     <keycap>Shift</keycap> button (for "push" mode),
+     <keycap>Ctrl</keycap> (for "switched" mode), or
+     <keycap>Alt</keycap> (for "free" mode, i.e. jumping other other
+     objects without disturbing them) button while dragging.
+    </para>
+    <para>
+     To change the global Panel preferences, right-click on any applet
+     or <interface>Panel</interface> and select 
+     <menuchoice>
+      <guimenu>Panel</guimenu>
+      <guimenuitem>Global Preferences...</guimenuitem>
+     </menuchoice>.
+     The <guilabel>Default movement mode</guilabel> is set under the
+     <guilabel>Applets</guilabel> tab.
+    </para>
+   </sect2>
+
+   <sect2 id="removing-applets">
+    <title>Removing Applets from a Panel</title> 
+    <para>  
+     To remove an applet from a <interface>Panel</interface>,
+     right-click on the applet and select <guimenuitem>Remove from
+     panel...</guimenuitem>. 
+    </para>
+   </sect2>
+  </sect1>
+
+
+  <!-- #### Intro | The Right-Click Pop-Up Menu ###### -->
+  <sect1 id="right-click-pop-up-menu">
+   <title>The Right-Click Pop-Up Menu</title>
+   <para>
+    Clicking the right mouse button on any applet brings up
+    a <guimenu>pop-up menu</guimenu>. This 
+    menu always has certain standard menu items in it and
+    often has additional items which vary depending on the particular
+    applet. 
+   </para>
+   <sect2 id="standard-right-click-items"> 
+    <title>Standard Pop-Up Items</title>
+    <para>
+     All applets should have the following items in their right-click
+     <guimenu>pop-up menu</guimenu>:
+     <variablelist>
+      <varlistentry>
+       <term>Remove from panel</term>
+       <listitem>
+        <para>
+         The <guimenuitem>Remove from panel</guimenuitem> menu item
+         removes the applet from the <interface>Panel</interface>. 
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>Move</term>
+       <listitem>
+        <para>
+         After selecting <guimenuitem>Move</guimenuitem>, your mouse
+         pointer will change appearance (typically to a cross with
+         arrows in each direction). As you move your mouse, the applet
+         will move with it.  When you have finished moving the applet,
+         click any mouse button and the applet will anchor in its
+         current position.  Note that applets can be moved between two
+         <interface>Panels</interface> this way.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>Panel</term>
+       <listitem>
+        <para>
+         The <guisubmenu>Panel</guisubmenu> submenu contains various
+         items and submenus for adding and removing
+         <interface>Panels</interface> and applets and for changing
+         the configuration.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>About</term>
+       <listitem>
+        <para>
+         The <guimenuitem>About...</guimenuitem> menu item brings up a 
+         dialogue box containing various information about the applet,
+         typically including the applet's  name, version, author,
+         copyright, license and desciption. 
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>Help</term>
+       <listitem>
+        <para>
+         The <guimenuitem>Help</guimenuitem> menu item brings up the help
+         manual for the applet. 
+        </para>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+    </para>
+   </sect2>
+
+   <sect2 id="applet-properties-dialog"> 
+    <title>The Applet Properties Dialog</title>
+    <para>
+     Many applets have customizable properties.  These applets will
+     have a <guimenuitem>Properties...</guimenuitem> menu item in their
+     right-click <guimenu>pop-up menu</guimenu> which brings up the
+     <interface>Properties</interface> dialog where you can alter the 
+     appearance or behaviour of the applet.
+     <figure id="example-props-dialog-fig">
+      <title>An Example Applet Properties Dialog</title>
+      <screenshot>
+       <screeninfo>An Example Applets Properties Dialog</screeninfo>
+       <graphic fileref="applet_props_dialog" format="png"
+        srccredit="muet">
+       </graphic>
+      </screenshot>
+     </figure>
+     All <interface>Properties</interface> dialogs have the following
+     buttons at the bottom of the dialog:
+     <itemizedlist>
+      <listitem>
+       <para>
+        <guibutton>OK</guibutton> &mdash;
+        Pressing <guibutton>OK</guibutton> will activate any changes
+        in the properties you have made and close the
+        <interface>Properties</interface> dialog.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+        <guibutton>Apply</guibutton> &mdash;
+        Pressing <guibutton>Apply</guibutton> at any time will
+        make your changes active without closing the
+        <interface>Properties</interface> dialog.  This is helpful if
+        you would like to test the effects of the changes you have
+        made but may want to continue changing the properties.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+        <guibutton>Close</guibutton> &mdash;
+        Pressing <guibutton>Close</guibutton> will close the
+        <interface>Properties</interface> dialog.  Only changes in the
+        configuration which were previously applied with the
+        <guibutton>Apply</guibutton> button will persist.  Other
+        changes will not be made active.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+        <guibutton>Help</guibutton> &mdash;
+        Pressing <guibutton>Help</guibutton> brings up the manual for
+        the application, opening it to the page describing the
+        <interface>Properties</interface> dialog.
+       </para>
+      </listitem>
+     </itemizedlist>
+    </para>
+   </sect2>
+ 
+   <sect2 id="common-right-click-items"> 
+    <title>Other Common Pop-Up Items</title>
+    <para>
+     Many applets also have one or more of the following items in their
+     right-click pop-up menu:
+     <variablelist>
+      <varlistentry>
+       <term>Run...</term>
+       <listitem>
+        <para>
+         The <guimenuitem>Run...</guimenuitem> menu item generally
+         invokes a program  which is related to the applet in some way
+         but which runs in its own window rather than in the
+         panel. For example: 
+        </para>
+        <orderedlist>
+         <listitem>
+          <para>
+           The <application>CPU Load</application> applet, which monitors
+           what programs are running, has a <guimenuitem>Run
+           gtop...</guimenuitem>  menu item. Selecting this menu item
+           starts <application>GTop</application>, which allows you to
+           view and control programs which are running.
+          </para>
+         </listitem>
+         <listitem>
+          <para>
+           The <application>CD Player</application> applet has a
+           <guimenuitem>Run gtcd...</guimenuitem> menu item which
+           starts the GNOME <application>CD Player</application> when
+           selected, which has more capabilities than the applet.
+          </para>
+         </listitem>
+        </orderedlist>
+       </listitem>
+      </varlistentry>
+     </variablelist>
+    </para>
+   </sect2>
+  </sect1>
+  
+  <sect1 id="feedback">
+   <title>Feedback</title>
+   <sect2 id="reporting-bugs"> 
+    <title>Reporting Applet Bugs</title>
+    <para>
+     GNOME users are encouraged to report bugs to <ulink type="http"
+     url="http://bugs.gnome.org">The GNOME Bug Tracking
+     System</ulink>.  The easiest way to submit bugs is to use the
+     <application>Bug Report Tool</application> program by selecting
+     <menuchoice>
+      <guimenu>Main Menu</guimenu> <guisubmenu>Utilities</guisubmenu>
+      <guimenuitem>Bug Report Tool</guimenuitem> 
+     </menuchoice>.
+     Be sure to be complete in describing what you did to cause the
+     bug to surface and, if possible, describe how the developer can
+     reproduce the the scenario.
+    </para>
+   </sect2>
+   <sect2 id="documentation-feedback"> 
+    <title>Providing Feedback</title>
+    <para>
+     GNOME users are welcome to provide suggestions for how
+     applications and documentation can be improved.  Suggestions for
+     application changes should be submitted using the
+     <application>Bug Report Tool</application> discussed above.
+     Suggestions for documentation changes can be emailed directly to
+     the documentation author (whose email should be included in the
+     "Authors" section of the document) or by sending an email to
+     <email>docs@gnome.org</email>. 
+    </para>
+   </sect2>
+   <sect2 id="joining-gnome">  
+    <title>Joining GNOME</title>
+    <para>
+     GNOME is a community project, created by hundreds of programmers,
+     documentation writers, icon design artists, web masters, and
+     other people, most of whom work on a volunteer basis.  New GNOME
+     contributors are always welcome. To join the GNOME team, visit
+     these web sites: developers &mdash; <ulink type="http"
+     url="http://developer.gnome.org">The GNOME Development
+     Site</ulink>, documentation writers &mdash; <ulink type="http"
+     url="http://developer.gnome.org/projects/gdp">The GNOME Documentation
+     Project</ulink>, icon design artists &mdash; <ulink type="http"
+     url="http://gnome-icons.sourceforge.net/">Gnome Icon Web</ulink>,
+     general &mdash; <ulink type="http"
+     url="http://developer.gnome.org/helping/">Helping GNOME</ulink>,
+     or just join the gnome-list email list (see <ulink type="http"
+     url="http://www.gnome.org/resources/mailing-lists.html">GNOME Mailing
+     Lists</ulink>) to discuss what you are interested in doing.
+    </para>
+   </sect2>
+  </sect1>
+ </chapter>
+
+ <!-- ############### Template Applets ##################### -->
+ <chapter id="template-applets">
+  <title>Template Applets</title>
+
+  &TEMPLATE-APPLET
+
+ </chapter>
+
+</book>
+
+
+
+
+
+
+
+]]>
+	</programlisting>
+	
+        <programlisting>
+<![CDATA[
+
+  <!-- Please replace everywhere below GNOMEAPPLET with the name of -->
+  <!-- your applet. Most importantly, all id attributes should start -->
+  <!-- with the name of your applet - this is necessary to avoid name -->
+  <!-- conflict among different applets --> 
+  <!-- Please replace YOUR-NAME with your name and YOUR-EMAIL with your email-->
+  <!-- Please replace HACKER-NAME with the applet author's name and -->
+  <!-- HACKER-EMAIL with the applet author's email -->
+
+  <!-- You should name your file: GNOMEAPPLET-applet.sgml -->
+  <!-- Screenshots should be in PNG format and placed in the -->
+  <!-- same directory as GNOMEAPPLET-applet.sgml -->
+
+  <!-- Applet docs will be merged into <chapter>'s inside a -->
+  <!-- <book>. Thus, the indentation below (2 spaces before the <sect1>) is -->
+  <!-- correct.-->
+
+  <!-- Permission is granted to make and distribute verbatim copies of -->
+  <!-- this manual provided the copyright notice and this permission -->
+  <!-- notice are  preserved on all copies. -->
+  <!-- -->
+  <!-- Permission is granted to copy and distribute modified versions of -->
+  <!-- this manual under the conditions for verbatim copying, provided -->
+  <!-- that the entire resulting derived work is distributed under the -->
+  <!-- terms of a permission notice identical to this one. -->
+  <!-- -->
+  <!-- Permission is granted to copy and distribute translations of this -->
+  <!-- manual into another language, under the above conditions for -->
+  <!-- modified versions, except that this permission notice may be -->
+  <!-- stated in a translation approved by the Foundation. -->
+
+  <!-- ###############   GNOMEAPPLET   ############### -->
+  <sect1 id="GNOMEAPPLET">
+   <title>GNOMEAPPLET Applet</title> 
+
+   <para> 
+    <application>GNOMEAPPLET</application> applet, shown in <xref
+    linkend="GNOMEAPPLET-fig">, does this and that. To learn how to
+    add this applet to a <interface>Panel</interface>, see <xref
+    linkend="adding-applets">. 
+   </para>
+  
+ 
+   <figure id="GNOMEAPPLET-fig">
+   <title>GNOMEAPPLET</title>
+   <screenshot>
+    <screeninfo>GNOMEAPPLET</screeninfo>
+    <graphic format="png" fileref="GNOMEAPPLET-fig" srccredit="ME">
+    </graphic>
+   </screenshot>
+   </figure>
+
+   <sect2 id="GNOMEAPPLET-usage">
+    <title>Usage</title>
+    <para>
+     This applet does nothing. To use it, just
+     left-click on it and it will instantly do nothing.   
+    </para>
+   </sect2>
+
+   <sect2 id="GNOMEAPPLET-right-click">
+    <title>Right-Click Pop-Up Menu Items</title>
+    <para> 
+     In addition to the standard menu items (see <xref
+     linkend="standard-right-click-items">), the right-click pop-up menu has 
+     the following items: 
+     <itemizedlist> 	
+      <listitem>
+       <para>
+        <guimenuitem>Properties...</guimenuitem> &mdash; This menu
+        item opens the <interface>Properties</interface> dialog (see
+        <xref linkend="GNOMEAPPLET-properties">) which allows you to
+        customize the appearance and behavior of this applet.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+        <guimenuitem>Run Hello World...</guimenuitem> &mdash; This
+        menu item starts the program <application>Hello
+        World</application>, used to say "hello" to the world. 
+       </para>
+      </listitem>
+     </itemizedlist>
+    </para>
+   </sect2>
+
+   <sect2 id="GNOMEAPPLET-properties">
+    <title>Properties</title>
+    <para>
+     You can configure <application>GNOMEAPPLET</application> applet by
+     right-clicking on the applet and choosing the
+     <guimenuitem>Properties...</guimenuitem> menu item. This will open the
+     <interface>Properties</interface> dialog, shown in <xref
+     linkend="GNOMEAPPLET-properties-fig">.
+    </para>
+    <figure id="GNOMEAPPLET-properties-fig">
+     <title>Properties Dialog</title>
+     <screenshot>
+      <screeninfo>Properties Dialog</screeninfo> 
+      <graphic format="png" fileref="GNOMEAPPLET-properties" srccredit="ME">
+      </graphic>
+     </screenshot>
+    </figure>
+    
+    <para> 
+     To change the color of the applet, click on the
+     <guibutton>color</guibutton> button. To change other properties,
+     click on other buttons. 
+    </para>
+
+    <para>
+     For more information on the <interface>Properties</interface>
+     dialog, including descriptions of the <guibutton>OK</guibutton>,
+     <guibutton>Apply</guibutton>, <guibutton>Cancel</guibutton>, and
+     <guibutton>Help</guibutton> buttons, see <xref
+     linkend="applet-properties-dialog">.
+    </para>
+   </sect2>
+  
+   <sect2 id="GNOMEAPPLET-bugs">
+    <title> Known Bugs and Limitations</title>
+    <para>
+     There are no known bugs in the
+     <application>GNOMEAPPLET</application> applet. 
+    </para>
+   </sect2>
+
+   <sect2 id="GNOMEAPPLET-authors">
+    <title>Authors</title>
+    <para>
+     This applet was writen by HACKER-NAME
+     <email>HACKER-EMAIL</email>.  The documentation for this applet
+     which you are reading now was written by
+     YOUR-NAME <email>YOUR-EMAIL</email>. For information on submitting
+     bug reports and suggestions for improvements, see <xref
+     linkend="feedback">. 
+    </para>
+   </sect2>
+
+  </sect1>
+
+
+
+
+
+]]>
+
+
+</programlisting>
+      </para>
+    </sect1>
+
+<!-- ####### Document Templates | Templates 3: Application Help ####### 
+
+    <sect1 id="template3">
+      <title>Template 2: Application Help</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]> </programlisting>
+    </sect1>
+
+####### Document Templates | Templates 4: Application Context Sensitive Help #######
+
+    <sect1 id="template4">
+      <title>Template 3: Application Context Sensitive Help</title>
+      <para>
+        Context sensitive help is still in development.
+      </para>
+    </sect1>
+
+####### Document Templates | Templates 5: Complete Application: gnome-hello  ####### 
+
+    <sect1 id="template5">
+      <title>Template 4: Complete Application: gnome-hello</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]>
+      </programlisting>  
+    </sect1>
+
+####### Document Templates | Templates 6: Tutorial ####### 
+
+    <sect1 id="template6">
+      <title>Template 5: Tutorial</title>
+      <programlisting>
+<![CDATA[(Put sgml here.)]]>
+      </programlisting>  
+    </sect1>-->
+  </appendix>
+
+</article>
diff --git a/test/relaxng/proofsystem.rng b/test/relaxng/proofsystem.rng
new file mode 100644
index 0000000..7fe6bd3
--- /dev/null
+++ b/test/relaxng/proofsystem.rng
@@ -0,0 +1,96 @@
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"

+         ns="http://relaxng.org/ns/proofsystem">

+

+<start>

+  <element name="proofSystem">

+    <oneOrMore>

+      <element name="rule">

+        <attribute name="name"/>

+	<zeroOrMore>

+	  <ref name="antecedent"/>

+	</zeroOrMore>

+	<ref name="consequent"/>

+      </element>

+    </oneOrMore>

+  </element>

+</start>

+

+<define name="formula">

+  <element name="formula">

+    <choice>

+      <ref name="judgement"/>

+      <ref name="expr"/>

+    </choice>

+  </element>

+</define>

+

+<define name="consequent">

+  <ref name="judgement"/>

+</define>

+

+<define name="antecedent">

+  <ref name="judgement"/>

+</define>

+

+<define name="judgement">

+  <choice>

+    <element name="judgement">

+      <attribute name="name"/>

+      <zeroOrMore>

+	<ref name="expr"/>

+      </zeroOrMore>

+    </element>

+    <element name="not">

+      <ref name="judgement"/>

+    </element>

+  </choice>

+</define>

+

+<define name="expr">

+  <choice>

+    <element name="var">

+      <attribute name="range"/>

+      <optional>

+	<attribute name="index"/>

+      </optional>

+      <optional>

+	<attribute name="sub"/>

+      </optional>

+    </element>

+    <element name="function">

+      <attribute name="name"/>

+      <zeroOrMore>

+        <ref name="expr"/>

+      </zeroOrMore>

+    </element>

+    <element name="element">

+      <attribute name="name"/>

+      <zeroOrMore>

+        <element name="attribute">

+          <attribute name="name"/>

+          <ref name="expr"/> 

+        </element>

+      </zeroOrMore>

+      <optional>

+        <ref name="context"/>

+      </optional>

+      <zeroOrMore>

+        <ref name="expr"/>

+      </zeroOrMore>

+    </element>

+    <element name="group">

+      <zeroOrMore>

+        <ref name="expr"/>

+      </zeroOrMore>

+    </element>

+    <element name="string"><text/></element>

+  </choice>

+</define>

+

+<define name="context">

+  <element name="context">

+    <ref name="expr"/>

+  </element>

+</define>

+

+</grammar>

diff --git a/test/relaxng/spec.rng b/test/relaxng/spec.rng
new file mode 100644
index 0000000..9650f71
--- /dev/null
+++ b/test/relaxng/spec.rng
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="iso-8859-1"?>

+<!-- $Id: spec.rng,v 1.3 2001/10/23 05:54:24 jjc Exp $ -->

+<grammar xmlns="http://relaxng.org/ns/structure/1.0"

+         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"

+          xmlns:p="http://relaxng.org/ns/proofsystem">

+

+<start>

+  <grammar>

+    <include href="docbook.rng"/>

+    <define name="synop.class" combine="choice">

+      <choice>

+        <parentRef name="rngref"/>

+        <parentRef name="grammarref"/>

+        <grammar>

+          <include href="proofsystem.rng"/>

+          <start combine="choice">

+            <ref name="formula"/>

+          </start>

+        </grammar>

+      </choice>

+    </define>

+    <define name="tech.char.class" combine="choice">

+      <parentRef name="terms"/>

+    </define>

+  </grammar>

+</start>

+

+<define name="rngref">

+  <element name="rngref">

+    <attribute name="src">

+      <data type="anyURI"/>

+    </attribute>

+  </element>

+</define>

+

+<define name="grammarref">

+  <element name="grammarref">

+    <attribute name="src">

+      <data type="anyURI"/>

+    </attribute>

+  </element>

+</define>

+

+<define name="terms">

+  <grammar>

+     <include href="proofsystem.rng">

+       <start>

+         <choice>

+           <ref name="expr"/>

+           <ref name="judgement"/>

+           <ref name="context"/>

+         </choice>

+       </start>

+     </include>

+  </grammar>

+</define>

+

+</grammar>

+

+ 

diff --git a/test/relaxng/spec_0.xml b/test/relaxng/spec_0.xml
new file mode 100644
index 0000000..cb8f7be
--- /dev/null
+++ b/test/relaxng/spec_0.xml
@@ -0,0 +1,3589 @@
+<?xml version="1.0" encoding="iso-8859-1"?>

+<!DOCTYPE article [

+<!-- ELEMENT declarations work around MSXML bug. -->

+<!ELEMENT section ANY>

+<!ATTLIST section id ID #IMPLIED>

+<!ELEMENT appendix ANY>

+<!ATTLIST appendix id ID #IMPLIED>

+<!ELEMENT bibliomixed ANY>

+<!ATTLIST bibliomixed id ID #IMPLIED>

+]>

+<article status="Committee Specification" xmlns:p="http://relaxng.org/ns/proofsystem">

+

+<articleinfo>

+<releaseinfo>$Id: spec.xml,v 1.159 2001/12/02 12:12:12 jjc Exp $</releaseinfo>

+<title>RELAX NG Specification</title>

+<authorgroup>

+<editor>

+  <firstname>James</firstname><surname>Clark</surname>

+  <affiliation>

+    <address><email>jjc@jclark.com</email></address>

+  </affiliation>

+</editor>

+<editor>

+  <surname>MURATA</surname><firstname>Makoto</firstname>

+  <affiliation>

+    <address><email>EB2M-MRT@asahi-net.or.jp</email></address>

+  </affiliation>

+</editor>

+</authorgroup>

+<pubdate>3 December 2001</pubdate>

+<releaseinfo role="meta">

+$Id: spec.xml,v 1.159 2001/12/02 12:12:12 jjc Exp $

+</releaseinfo>

+

+<copyright><year>2001</year><holder>OASIS</holder></copyright>

+

+<legalnotice>

+

+<para>Copyright &#169; The Organization for the Advancement of

+Structured Information Standards [OASIS] 2001. All Rights

+Reserved.</para>

+

+<para>This document and translations of it may be copied and furnished

+to others, and derivative works that comment on or otherwise explain

+it or assist in its implementation may be prepared, copied, published

+and distributed, in whole or in part, without restriction of any kind,

+provided that the above copyright notice and this paragraph are

+included on all such copies and derivative works. However, this

+document itself may not be modified in any way, such as by removing

+the copyright notice or references to OASIS, except as needed for the

+purpose of developing OASIS specifications, in which case the

+procedures for copyrights defined in the OASIS Intellectual Property

+Rights document must be followed, or as required to translate it into

+languages other than English.</para>

+

+<para>The limited permissions granted above are perpetual and will not

+be revoked by OASIS or its successors or assigns.</para>

+

+<para>This document and the information contained herein is provided

+on an <quote>AS IS</quote> basis and OASIS DISCLAIMS ALL WARRANTIES,

+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE

+USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY

+IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR

+PURPOSE.</para>

+

+</legalnotice>

+

+<legalnotice role="status"><title>Status of this Document</title>

+

+<para>This Committee Specification was approved for publication by the

+OASIS RELAX NG technical committee. It is a stable document which

+represents the consensus of the committee. Comments on this document

+may be sent to <ulink

+url="mailto:relax-ng-comment@lists.oasis-open.org"

+>relax-ng-comment@lists.oasis-open.org</ulink>.</para>

+

+<para>A list of known errors in this document is available at <ulink

+url="http://www.oasis-open.org/committees/relax-ng/spec-20011203-errata.html"

+>http://www.oasis-open.org/committees/relax-ng/spec-20011203-errata.html</ulink

+>.</para>

+

+</legalnotice>

+

+<abstract>

+<para>This is the definitive specification of RELAX NG, a simple

+schema language for XML, based on <xref linkend="relax"/> and <xref

+linkend="trex"/>. A RELAX NG schema specifies a pattern for the

+structure and content of an XML document. A RELAX NG schema is itself

+an XML document.</para>

+</abstract>

+

+<revhistory>

+<revision>

+  <revnumber>Committee Specification</revnumber>

+  <date>3 December 2001</date>

+</revision>

+<revision>

+  <revnumber>Committee Specification</revnumber>

+  <date>11 August 2001</date>

+</revision>

+</revhistory>

+</articleinfo>

+

+

+<section>

+<title>Introduction</title>

+

+<para>This document specifies</para>

+

+<itemizedlist>

+

+<listitem><para>when an XML document is a correct RELAX NG

+schema</para></listitem>

+

+<listitem><para>when an XML document is valid with respect to a

+correct RELAX NG schema</para></listitem>

+

+</itemizedlist>

+

+<para>An XML document that is being validated with respect to a RELAX NG

+schema is referred to as an instance.</para>

+

+<para>The structure of this document is as follows.  <xref

+linkend="data-model"/> describes the data model, which is the

+abstraction of an XML document used throughout the rest of the

+document.  <xref linkend="full-syntax"/> describes the syntax of a

+RELAX NG schema; any correct RELAX NG schema must conform to this

+syntax.  <xref linkend="simplification"/> describes a sequence of

+transformations that are applied to simplify a RELAX NG schema;

+applying the transformations also involves checking certain

+restrictions that must be satisfied by a correct RELAX NG

+schema. <xref linkend="simple-syntax"/> describes the syntax that

+results from applying the transformations; this simple syntax is a

+subset of the full syntax.  <xref linkend="semantics"/> describes the

+semantics of a correct RELAX NG schema that uses the simple syntax;

+the semantics specify when an element is valid with respect to a RELAX

+NG schema.  <xref linkend="restriction"/> describes restrictions in

+terms of the simple syntax; a correct RELAX NG schema must be such

+that, after transformation into the simple form, it satisfies these

+restrictions. Finally, <xref linkend="conformance"/> describes

+conformance requirements for RELAX NG validators.</para>

+

+<para>A tutorial is available separately (see <xref

+linkend="tutorial"/>).</para>

+

+</section>

+

+<section id="data-model">

+<title>Data model</title>

+

+<para>RELAX NG deals with XML documents representing both schemas and

+instances through an abstract data model.  XML documents representing

+schemas and instances must be well-formed in conformance with <xref

+linkend="xml-rec"/> and must conform to the constraints of <xref

+linkend="xml-names"/>.</para>

+

+<para>An XML document is represented by an element.  An element consists

+of</para>

+

+<itemizedlist>

+

+<listitem><para>a name</para></listitem>

+

+<listitem><para>a context</para></listitem>

+

+<listitem><para>a set of attributes</para></listitem>

+

+<listitem><para>an ordered sequence of zero or more children; each

+child is either an element or a non-empty string; the sequence never contains

+two consecutive strings</para></listitem>

+

+</itemizedlist>

+

+<para>A name consists of</para>

+

+<itemizedlist>

+<listitem><para>a string representing the namespace URI; the empty

+string has special significance, representing the absence of any

+namespace</para></listitem>

+

+<listitem><para>a string representing the local name; this string matches the NCName

+production of <xref linkend="xml-names"/></para></listitem>

+</itemizedlist>

+

+<para>A context consists of</para>

+

+<itemizedlist>

+<listitem><para>a base URI</para></listitem>

+<listitem><para>a namespace map; this maps prefixes to namespace URIs,

+and also may specify a default namespace URI (as declared

+by the <literal>xmlns</literal> attribute)</para></listitem>

+</itemizedlist>

+

+<para>An attribute consists of</para>

+

+<itemizedlist>

+<listitem><para>a name</para></listitem>

+<listitem><para>a string representing the value</para></listitem>

+</itemizedlist>

+

+<para>A string consists of a sequence of zero or more characters,

+where a character is as defined in <xref linkend="xml-rec"/>.</para>

+

+<para>The element for an XML document is constructed from an instance

+of the <xref linkend="infoset"/> as follows.  We use the notation

+[<replaceable>x</replaceable>] to refer to the value of the

+<replaceable>x</replaceable> property of an information item. An

+element is constructed from a document information item by

+constructing an element from the [document element].  An element is

+constructed from an element information item by constructing the name

+from the [namespace name] and [local name], the context from the [base

+URI] and [in-scope namespaces], the attributes from the [attributes],

+and the children from the [children].  The attributes of an element

+are constructed from the unordered set of attribute information items

+by constructing an attribute for each attribute information item.  The

+children of an element are constructed from the list of child

+information items first by removing information items other than

+element information items and character information items, and then by

+constructing an element for each element information item in the list

+and a string for each maximal sequence of character information items.

+An attribute is constructed from an attribute information item by

+constructing the name from the [namespace name] and [local name], and

+the value from the [normalized value].  When constructing the name of

+an element or attribute from the [namespace name] and [local name], if

+the [namespace name] property is not present, then the name is

+constructed from an empty string and the [local name]. A string is

+constructed from a sequence of character information items by

+constructing a character from the [character code] of each character

+information item.</para>

+

+<para>It is possible for there to be multiple distinct infosets for a

+single XML document.  This is because XML parsers are not required to

+process all DTD declarations or expand all external parsed general

+entities.  Amongst these multiple infosets, there is exactly one

+infoset for which [all declarations processed] is true and which does

+not contain any unexpanded entity reference information items.  This

+is the infoset that is the basis for defining the RELAX NG data

+model.</para>

+

+<section id="data-model-example">

+<title>Example</title>

+

+<para>Suppose the document

+<literal>http://www.example.com/doc.xml</literal> is as

+follows:</para>

+

+<programlisting><![CDATA[<?xml version="1.0"?>

+<foo><pre1:bar1 xmlns:pre1="http://www.example.com/n1"/><pre2:bar2

+  xmlns:pre2="http://www.example.com/n2"/></foo>

+]]></programlisting>

+

+<para>The element representing this document has</para>

+

+<itemizedlist>

+<listitem><para>a name which has</para>

+<itemizedlist>

+

+<listitem><para>the empty string as the namespace URI, representing

+the absence of any namespace</para></listitem>

+

+<listitem><para><literal>foo</literal> as the local

+name</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>a context which has</para>

+

+<itemizedlist>

+<listitem><para><literal>http://www.example.com/doc.xml</literal> as the base

+URI</para></listitem>

+

+<listitem><para>a namespace map which</para>

+

+<itemizedlist>

+

+<listitem><para>maps the prefix <literal>xml</literal> to the

+namespace URI

+<literal>http://www.w3.org/XML/1998/namespace</literal>

+(the <literal>xml</literal> prefix is implicitly declared

+by every XML document)</para></listitem>

+

+<listitem><para>specifies the empty string as the default namespace

+URI</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>an empty set of attributes</para></listitem>

+

+<listitem><para>a sequence of children consisting

+of an element which has</para>

+

+<itemizedlist>

+<listitem><para>a name which has</para>

+<itemizedlist>

+

+<listitem><para><literal>http://www.example.com/n1</literal> as the

+namespace URI</para></listitem>

+

+<listitem><para><literal>bar1</literal> as the local

+name</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>a context which has</para>

+

+<itemizedlist>

+<listitem><para><literal>http://www.example.com/doc.xml</literal> as the base

+URI</para></listitem>

+

+<listitem><para>a namespace map which</para>

+

+<itemizedlist>

+

+<listitem><para>maps the prefix <literal>pre1</literal> to the

+namespace URI

+<literal>http://www.example.com/n1</literal></para></listitem>

+

+<listitem><para>maps the prefix <literal>xml</literal> to the

+namespace URI

+<literal>http://www.w3.org/XML/1998/namespace</literal></para></listitem>

+

+<listitem><para>specifies the empty string as the default namespace

+URI</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>an empty set of attributes</para></listitem>

+

+<listitem><para>an empty sequence of children</para></listitem>

+

+</itemizedlist>

+

+<para>followed by an element which has</para>

+ 

+<itemizedlist>

+<listitem><para>a name which has</para>

+<itemizedlist>

+

+<listitem><para><literal>http://www.example.com/n2</literal> as the

+namespace URI</para></listitem>

+

+<listitem><para><literal>bar2</literal> as the local

+name</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>a context which has</para>

+

+<itemizedlist>

+<listitem><para><literal>http://www.example.com/doc.xml</literal> as the base

+URI</para></listitem>

+

+<listitem><para>a namespace map which</para>

+

+<itemizedlist>

+

+<listitem><para>maps the prefix <literal>pre2</literal> to the

+namespace URI

+<literal>http://www.example.com/n2</literal></para></listitem>

+

+<listitem><para>maps the prefix <literal>xml</literal> to the

+namespace URI

+<literal>http://www.w3.org/XML/1998/namespace</literal></para></listitem>

+

+<listitem><para>specifies the empty string as the default namespace

+URI</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+

+</itemizedlist>

+

+</listitem>

+

+<listitem><para>an empty set of attributes</para></listitem>

+

+<listitem><para>an empty sequence of children</para></listitem>

+

+</itemizedlist>

+

+</listitem>

+</itemizedlist>

+

+</section>

+

+</section>

+

+<section id="full-syntax">

+<title>Full syntax</title>

+

+<para>The following grammar summarizes the syntax of RELAX NG.

+Although we use a notation based on the XML representation of an RELAX

+NG schema as a sequence of characters, the grammar must be understood

+as operating at the data model level.  For example, although the

+syntax uses <literal><![CDATA[<text/>]]></literal>, an instance or

+schema can use <literal><![CDATA[<text></text>]]></literal> instead,

+because they both represent the same element at the data model level.

+All elements shown in the grammar are qualified with the namespace

+URI:</para>

+

+<programlisting>http://relaxng.org/ns/structure/1.0</programlisting>

+

+<para>The symbols QName and NCName are defined in <xref

+linkend="xml-names"/>.  The anyURI symbol has the same meaning as the

+anyURI datatype of <xref linkend="xmlschema-2"/>: it indicates a

+string that, after escaping of disallowed values as described in

+Section 5.4 of <xref linkend="xlink"/>, is a URI reference as defined

+in <xref linkend="rfc2396"/> (as modified by <xref

+linkend="rfc2732"/>).  The symbol string matches any string.</para>

+

+<para>In addition to the attributes shown explicitly, any element can

+have an <literal>ns</literal> attribute and any element can have a

+<literal>datatypeLibrary</literal> attribute. The

+<literal>ns</literal> attribute can have any value.  The value of the

+<literal>datatypeLibrary</literal> attribute must match the anyURI

+symbol as described in the previous paragraph; in addition, it must

+not use the relative form of URI reference and must not have a

+fragment identifier; as an exception to this, the value may be the

+empty string.</para>

+

+<para>Any element can also have foreign attributes in addition to the

+attributes shown in the grammar. A foreign attribute is an attribute

+with a name whose namespace URI is neither the empty string nor the

+RELAX NG namespace URI.  Any element that cannot have string children

+(that is, any element other than <literal>value</literal>, <literal>param</literal>

+and <literal>name</literal>) may have foreign child elements in addition

+to the child elements shown in the grammar. A foreign element is an

+element with a name whose namespace URI is not the RELAX NG namespace

+URI.  There are no constraints on the relative position of foreign

+child elements with respect to other child elements.</para>

+

+<para>Any element can also have as children strings that consist

+entirely of whitespace characters, where a whitespace character is one

+of #x20, #x9, #xD or #xA. There are no constraints on the relative

+position of whitespace string children with respect to child

+elements.</para>

+

+<para>Leading and trailing whitespace is allowed for value of each

+<literal>name</literal>, <literal>type</literal> and

+<literal>combine</literal> attribute and for the content of each

+<literal>name</literal> element.</para>

+

+<grammarref src="full.rng"/>

+

+<section id="full-syntax-example">

+<title>Example</title>

+

+<para>Here is an example of a schema in the full syntax for the

+document in <xref linkend="data-model-example"/>.</para>

+

+<programlisting><![CDATA[<?xml version="1.0"?>

+<element name="foo"

+         xmlns="http://relaxng.org/ns/structure/1.0"

+         xmlns:a="http://relaxng.org/ns/annotation/1.0"

+         xmlns:ex1="http://www.example.com/n1"

+         xmlns:ex2="http://www.example.com/n2">

+  <a:documentation>A foo element.</a:document>

+  <element name="ex1:bar1">

+    <empty/>

+  </element>

+  <element name="ex2:bar2">

+    <empty/>

+  </element>

+</element>]]></programlisting>

+

+</section>

+

+</section>

+

+<section id="simplification">

+<title>Simplification</title>

+

+<para>The full syntax given in the previous section is transformed

+into a simpler syntax by applying the following transformation rules

+in order. The effect must be as if each rule was applied to all

+elements in the schema before the next rule is applied.  A

+transformation rule may also specify constraints that must be

+satisfied by a correct schema. The transformation rules are applied

+at the data model level.  Before the transformations are applied, the

+schema is parsed into an instance of the data model.</para>

+

+<section>

+<title>Annotations</title>

+

+<para>Foreign attributes and elements are removed.</para>

+

+<note><para>It is safe to remove <literal>xml:base</literal>

+attributes at this stage because <literal>xml:base</literal>

+attributes are used in determining the [base URI] of an element

+information item, which is in turn used to construct the base URI of

+the context of an element.  Thus, after a document has been parsed

+into an instance of the data model, <literal>xml:base</literal>

+attributes can be discarded.</para></note>

+

+</section>

+

+<section>

+<title>Whitespace</title>

+

+<para>For each element other than <literal>value</literal> and

+<literal>param</literal>, each child that is a string containing only

+whitespace characters is removed.</para>

+

+<para>Leading and trailing whitespace characters are removed from the

+value of each <literal>name</literal>, <literal>type</literal> and

+<literal>combine</literal> attribute and from the content of each

+<literal>name</literal> element.</para>

+

+</section>

+

+<section>

+<title><literal>datatypeLibrary</literal> attribute</title>

+

+<para>The value of each <literal>datatypeLibary</literal> attribute is

+transformed by escaping disallowed characters as specified in Section

+5.4 of <xref linkend="xlink"/>.</para>

+

+<para>For any <literal>data</literal> or <literal>value</literal>

+element that does not have a <literal>datatypeLibrary</literal>

+attribute, a <literal>datatypeLibrary</literal> attribute is

+added. The value of the added <literal>datatypeLibrary</literal>

+attribute is the value of the <literal>datatypeLibrary</literal>

+attribute of the nearest ancestor element that has a

+<literal>datatypeLibrary</literal> attribute, or the empty string if

+there is no such ancestor. Then, any <literal>datatypeLibrary</literal>

+attribute that is on an element other than <literal>data</literal> or

+<literal>value</literal> is removed.</para>

+

+</section>

+

+<section>

+<title><literal>type</literal> attribute of <literal>value</literal> element</title>

+

+<para>For any <literal>value</literal> element that does not have a

+<literal>type</literal> attribute, a <literal>type</literal> attribute

+is added with value <literal>token</literal> and the value of the

+<literal>datatypeLibrary</literal> attribute is changed to the empty

+string.</para>

+

+</section>

+

+<section id="href">

+<title><literal>href</literal> attribute</title>

+

+<para>The value of the <literal>href</literal> attribute on an

+<literal>externalRef</literal> or <literal>include</literal> element

+is first transformed by escaping disallowed characters as specified in

+Section 5.4 of <xref linkend="xlink"/>.  The URI reference is then

+resolved into an absolute form as described in section 5.2 of <xref

+linkend="rfc2396"/> using the base URI from the context of the element

+that bears the <literal>href</literal> attribute.</para>

+

+<para>The value of the <literal>href</literal> attribute will be used

+to construct an element (as specified in <xref

+linkend="data-model"/>). This must be done as follows.  The URI

+reference consists of the URI itself and an optional fragment

+identifier. The resource identified by the URI is retrieved.  The

+result is a MIME entity: a sequence of bytes labeled with a MIME

+media type.  The media type determines how an element is constructed

+from the MIME entity and optional fragment identifier.  When the media

+type is <literal>application/xml</literal> or

+<literal>text/xml</literal>, the MIME entity must be parsed as an XML

+document in accordance with the applicable RFC (at the term of writing

+<xref linkend="rfc3023"/>) and an element constructed from the result

+of the parse as specified in <xref linkend="data-model"/>.  In

+particular, the <literal>charset</literal> parameter must be handled

+as specified by the RFC. This specification does not define the

+handling of media types other than <literal>application/xml</literal>

+and <literal>text/xml</literal>. The <literal>href</literal> attribute

+must not include a fragment identifier unless the registration of the

+media type of the resource identified by the attribute defines the

+interpretation of fragment identifiers for that media type.</para>

+

+<note><para><xref linkend="rfc3023"/> does not define the

+interpretation of fragment identifiers for

+<literal>application/xml</literal> or

+<literal>text/xml</literal>.</para></note>

+

+</section>

+

+<section>

+<title><literal>externalRef</literal> element</title>

+

+<para>An <literal>externalRef</literal> element is transformed as

+follows.  An element is constructed using the URI reference that is

+the value of <literal>href</literal> attribute as specified in <xref

+linkend="href"/>. This element must match the syntax for pattern.  The

+element is transformed by recursively applying the rules from this

+subsection and from previous subsections of this section. This must

+not result in a loop. In other words, the transformation of the

+referenced element must not require the dereferencing of an

+<literal>externalRef</literal> attribute with an

+<literal>href</literal> attribute with the same value.</para>

+

+<para>Any <literal>ns</literal> attribute on the

+<literal>externalRef</literal> element is transferred to the

+referenced element if the referenced element does not already have an

+<literal>ns</literal> attribute.  The <literal>externalRef</literal>

+element is then replaced by the referenced element.</para>

+

+</section>

+

+<section>

+<title><literal>include</literal> element</title>

+

+<para>An <literal>include</literal> element is transformed as follows.

+An element is constructed using the URI reference that is the value of

+<literal>href</literal> attribute as specified in <xref

+linkend="href"/>.  This element must be a <literal>grammar</literal>

+element, matching the syntax for grammar.</para>

+

+<para>This <literal>grammar</literal> element is transformed by

+recursively applying the rules from this subsection and from previous

+subsections of this section.  This must not result in a loop. In other

+words, the transformation of the <literal>grammar</literal> element

+must not require the dereferencing of an <literal>include</literal>

+attribute with an <literal>href</literal> attribute with the same

+value.</para>

+

+<para>Define the <firstterm>components</firstterm> of an element to

+be the children of the element together with the components of any

+<literal>div</literal> child elements.  If the

+<literal>include</literal> element has a <literal>start</literal>

+component, then the <literal>grammar</literal> element must have a

+<literal>start</literal> component.  If the <literal>include</literal>

+element has a <literal>start</literal> component, then all

+<literal>start</literal> components are removed from the

+<literal>grammar</literal> element.  If the <literal>include</literal>

+element has a <literal>define</literal> component, then the

+<literal>grammar</literal> element must have a

+<literal>define</literal> component with the same name.  For every

+<literal>define</literal> component of the <literal>include</literal>

+element, all <literal>define</literal> components with the same name

+are removed from the <literal>grammar</literal> element.</para>

+

+<para>The <literal>include</literal> element is transformed into a

+<literal>div</literal> element.  The attributes of the

+<literal>div</literal> element are the attributes of the

+<literal>include</literal> element other than the

+<literal>href</literal> attribute.  The children of the

+<literal>div</literal> element are the <literal>grammar</literal>

+element (after the removal of the <literal>start</literal> and

+<literal>define</literal> components described by the preceding

+paragraph) followed by the children of the <literal>include</literal>

+element.  The <literal>grammar</literal> element is then renamed to

+<literal>div</literal>.</para>

+

+</section>

+

+<section>

+<title><literal>name</literal> attribute of <literal>element</literal>

+and <literal>attribute</literal> elements</title>

+

+<para>The <literal>name</literal> attribute on an

+<literal>element</literal> or <literal>attribute</literal> element is

+transformed into a <literal>name</literal> child element.</para>

+

+<para>If an <literal>attribute</literal> element has a

+<literal>name</literal> attribute but no <literal>ns</literal>

+attribute, then an <literal>ns=""</literal> attribute is added to the

+<literal>name</literal> child element.</para>

+

+</section>

+

+<section>

+<title><literal>ns</literal> attribute</title>

+

+<para>For any <literal>name</literal>, <literal>nsName</literal> or

+<literal>value</literal> element that does not have an

+<literal>ns</literal> attribute, an <literal>ns</literal> attribute is

+added. The value of the added <literal>ns</literal> attribute is the

+value of the <literal>ns</literal> attribute of the nearest ancestor

+element that has an <literal>ns</literal> attribute, or the empty

+string if there is no such ancestor. Then, any <literal>ns</literal>

+attribute that is on an element other than <literal>name</literal>,

+<literal>nsName</literal> or <literal>value</literal> is

+removed.</para>

+

+<note><para>The value of the <literal>ns</literal> attribute is

+<emphasis role="strong">not</emphasis> transformed either by escaping

+disallowed characters, or in any other way, because the value of the

+<literal>ns</literal> attribute is compared against namespace URIs in

+the instance, which are not subject to any

+transformation.</para></note>

+

+<note><para>Since <literal>include</literal> and

+<literal>externalRef</literal> elements are resolved after

+<literal>datatypeLibrary</literal> attributes are added but before

+<literal>ns</literal> attributes are added, <literal>ns</literal>

+attributes are inherited into external schemas but

+<literal>datatypeLibrary</literal> attributes are not.</para></note>

+

+</section>

+

+<section>

+<title>QNames</title>

+

+<para>For any <literal>name</literal> element containing a prefix, the

+prefix is removed and an <literal>ns</literal> attribute is added

+replacing any existing <literal>ns</literal> attribute. The value of

+the added <literal>ns</literal> attribute is the value to which the

+namespace map of the context of the <literal>name</literal> element

+maps the prefix.  The context must have a mapping for the

+prefix.</para>

+

+</section>

+

+<section>

+<title><literal>div</literal> element</title>

+

+<para>Each <literal>div</literal> element is replaced by its

+children.</para>

+

+</section>

+

+<section id="number-child-elements">

+<title>Number of child elements</title>

+

+<para>A <literal>define</literal>, <literal>oneOrMore</literal>,

+<literal>zeroOrMore</literal>, <literal>optional</literal>, <literal>list</literal> or

+<literal>mixed</literal> element is transformed so that it has exactly

+one child element.  If it has more than one child element, then its

+child elements are wrapped in a <literal>group</literal>

+element. Similarly, an <literal>element</literal> element is transformed so

+that it has exactly two child elements, the first being a name class

+and the second being a pattern. If it has more than two child elements,

+then the child elements other than the first are wrapped in a

+<literal>group</literal> element.</para>

+

+<para>A <literal>except</literal> element is transformed

+so that it has exactly one child element. If it has more

+than one child element, then its child elements are wrapped

+in a <literal>choice</literal> element.</para>

+

+<para>If an <literal>attribute</literal> element has only one child

+element (a name class), then a <literal>text</literal> element is

+added.</para>

+

+<para>A <literal>choice</literal>, <literal>group</literal> or

+<literal>interleave</literal> element is transformed so that it has

+exactly two child elements. If it has one child element, then it is

+replaced by its child element.  If it has more than two child

+elements, then the first two child elements are combined into a new

+element with the same name as the parent element and with the first

+two child elements as its children.  For example,</para>

+

+<programlisting>&lt;choice&gt; <replaceable>p1</replaceable> <replaceable>p2</replaceable> <replaceable>p3</replaceable> &lt;/choice&gt;</programlisting>

+

+<para>is transformed to</para>

+

+<programlisting>&lt;choice&gt; &lt;choice&gt; <replaceable>p1</replaceable> <replaceable>p2</replaceable> &lt;/choice&gt; <replaceable>p3</replaceable> &lt;/choice&gt;</programlisting>

+

+<para>This reduces the number of child elements by one. The

+transformation is applied repeatedly until there are exactly two child

+elements.</para>

+

+</section>

+

+<section>

+<title><literal>mixed</literal> element</title>

+

+<para>A <literal>mixed</literal> element is transformed into an

+interleaving with a <literal>text</literal> element:</para>

+

+<programlisting>&lt;mixed> <replaceable>p</replaceable> &lt;/mixed></programlisting>

+

+<para>is transformed into</para>

+

+<programlisting>&lt;interleave> <replaceable>p</replaceable> &lt;text/> &lt;/interleave></programlisting>

+

+</section>

+

+<section>

+<title><literal>optional</literal> element</title>

+

+<para>An <literal>optional</literal> element is transformed into

+a choice with <literal>empty</literal>:</para>

+

+<programlisting>&lt;optional> <replaceable>p</replaceable> &lt;/optional></programlisting>

+

+<para>is transformed into</para>

+

+<programlisting>&lt;choice> <replaceable>p</replaceable> &lt;empty/> &lt;/choice></programlisting>

+

+</section>

+

+<section>

+<title><literal>zeroOrMore</literal> element</title>

+

+<para>A <literal>zeroOrMore</literal> element is transformed into a choice

+between <literal>oneOrMore</literal> and

+<literal>empty</literal>:</para>

+

+<programlisting>&lt;zeroOrMore> <replaceable>p</replaceable> &lt;/zeroOrMore></programlisting>

+

+<para>is transformed into</para>

+

+<programlisting>&lt;choice> &lt;oneOrMore> <replaceable>p</replaceable> &lt;/oneOrMore> &lt;empty/> &lt;/choice></programlisting>

+

+</section>

+

+<section id="constraints">

+<title>Constraints</title>

+

+<para>In this rule, no transformation is performed, but various

+constraints are checked.</para>

+

+<note><para>The constraints in this section, unlike the constraints

+specified in <xref linkend="restriction"/>, can be checked without

+resolving any <literal>ref</literal> elements, and are accordingly

+applied even to patterns that will disappear during later stages of

+simplification because they are not reachable (see <xref

+linkend="define-ref"/>) or because of <literal>notAllowed</literal>

+(see <xref linkend="notAllowed"/>).</para></note>

+

+<para>An <literal>except</literal> element that is a child of an

+<literal>anyName</literal> element must not have any

+<literal>anyName</literal> descendant elements. An

+<literal>except</literal> element that is a child of an

+<literal>nsName</literal> element must not have any

+<literal>nsName</literal> or <literal>anyName</literal> descendant

+elements.</para>

+

+<para>A <literal>name</literal> element that occurs as the first child

+of an <literal>attribute</literal> element or as the descendant of the

+first child of an <literal>attribute</literal> element and that has an

+<literal>ns</literal> attribute with value equal to the empty string

+must not have content equal to <literal>xmlns</literal>.</para>

+

+<para>A <literal>name</literal> or <literal>nsName</literal> element

+that occurs as the first child of an <literal>attribute</literal>

+element or as the descendant of the first child of an

+<literal>attribute</literal> element must not have an

+<literal>ns</literal> attribute with value

+<literal>http://www.w3.org/2000/xmlns</literal>.</para>

+

+<note><para>The <xref linkend="infoset"/> defines the namespace URI of

+namespace declaration attributes to be

+<literal>http://www.w3.org/2000/xmlns</literal>.</para></note>

+

+<para>A <literal>data</literal> or <literal>value</literal> element

+must be correct in its use of datatypes. Specifically, the

+<literal>type</literal> attribute must identify a datatype within the

+datatype library identified by the value of the

+<literal>datatypeLibrary</literal> attribute.  For a

+<literal>data</literal> element, the parameter list must be one that

+is allowed by the datatype (see <xref

+linkend="data-pattern"/>).</para>

+

+</section>

+

+<section>

+<title><literal>combine</literal> attribute</title>

+

+<para>For each <literal>grammar</literal> element, all

+<literal>define</literal> elements with the same name are combined

+together.  For any name, there must not be more than one

+<literal>define</literal> element with that name that does not have a

+<literal>combine</literal> attribute.  For any name, if there is a

+<literal>define</literal> element with that name that has a

+<literal>combine</literal> attribute with the value

+<literal>choice</literal>, then there must not also be a

+<literal>define</literal> element with that name that has a

+<literal>combine</literal> attribute with the value

+<literal>interleave</literal>. Thus, for any name, if there is more

+than one <literal>define</literal> element with that name, then there

+is a unique value for the <literal>combine</literal> attribute for

+that name.  After determining this unique value, the

+<literal>combine</literal> attributes are removed.  A pair of

+definitions</para>

+

+<programlisting>&lt;define name="<replaceable>n</replaceable>"&gt;

+  <replaceable>p1</replaceable>

+&lt;/define>

+&lt;define name="<replaceable>n</replaceable>"&gt;

+  <replaceable>p2</replaceable>

+&lt;/define></programlisting>

+

+<para>is combined into</para>

+

+<programlisting>&lt;define name="<replaceable>n</replaceable>">

+  &lt;<replaceable>c</replaceable>&gt;

+    <replaceable>p1</replaceable>

+    <replaceable>p2</replaceable>

+  &lt;/<replaceable>c</replaceable>&gt;

+&lt;/define></programlisting>

+

+<para>where <replaceable>c</replaceable> is the value of the

+<literal>combine</literal> attribute. Pairs of definitions are

+combined until there is exactly one <literal>define</literal> element

+for each name.</para>

+

+<para>Similarly, for each <literal>grammar</literal> element all

+<literal>start</literal> elements are combined together.  There must

+not be more than one <literal>start</literal> element that does not

+have a <literal>combine</literal> attribute.  If there is a

+<literal>start</literal> element that has a <literal>combine</literal>

+attribute with the value <literal>choice</literal>, there must not

+also be a <literal>start</literal> element that has a

+<literal>combine</literal> attribute with the value

+<literal>interleave</literal>.</para>

+

+</section>

+

+<section>

+<title><literal>grammar</literal> element</title>

+

+<para>In this rule, the schema is transformed so that its top-level

+element is <literal>grammar</literal> and so that it has no other

+<literal>grammar</literal> elements.</para>

+

+<para>Define the <firstterm>in-scope grammar</firstterm> for an

+element to be the nearest ancestor <literal>grammar</literal> element.  A

+<literal>ref</literal> element <firstterm>refers to</firstterm> a

+<literal>define</literal> element if the value of their

+<literal>name</literal> attributes is the same and their in-scope

+grammars are the same.  A <literal>parentRef</literal> element

+<firstterm>refers to</firstterm> a <literal>define</literal> element

+if the value of their <literal>name</literal> attributes is the same

+and the in-scope grammar of the in-scope grammar of the

+<literal>parentRef</literal> element is the same as the in-scope

+grammar of the <literal>define</literal> element. Every

+<literal>ref</literal> or <literal>parentRef</literal> element must

+refer to a <literal>define</literal> element.  A

+<literal>grammar</literal> must have a <literal>start</literal> child

+element.</para>

+

+<para>First, transform the top-level pattern

+<replaceable>p</replaceable> into

+<literal>&lt;grammar>&lt;start><replaceable>p</replaceable>&lt;/start>&lt;/grammar></literal>.

+Next, rename <literal>define</literal> elements so that no two

+<literal>define</literal> elements anywhere in the schema have the

+same name.  To rename a <literal>define</literal> element, change the

+value of its <literal>name</literal> attribute and change the value of

+the <literal>name</literal> attribute of all <literal>ref</literal>

+and <literal>parentRef</literal> elements that refer to that

+<literal>define</literal> element. Next, move all

+<literal>define</literal> elements to be children of the top-level

+<literal>grammar</literal> element, replace each nested

+<literal>grammar</literal> element by the child of its

+<literal>start</literal> element and rename each

+<literal>parentRef</literal> element to <literal>ref</literal>.</para>

+

+</section>

+

+

+<section id="define-ref">

+<title><literal>define</literal> and <literal>ref</literal> elements</title>

+

+<para>In this rule, the grammar is transformed so that every

+<literal>element</literal> element is the child of a

+<literal>define</literal> element, and the child of every

+<literal>define</literal> element is an <literal>element</literal>

+element.</para>

+

+<para>First, remove any <literal>define</literal> element that is not

+<firstterm>reachable</firstterm>.  A <literal>define</literal> element

+is reachable if there is reachable <literal>ref</literal> element

+referring to it.  A <literal>ref</literal> element is reachable if it

+is the descendant of the <literal>start</literal> element or of a

+reachable <literal>define</literal> element. Now, for

+each <literal>element</literal> element that is not the child of a

+<literal>define</literal> element, add a <literal>define</literal>

+element to the <literal>grammar</literal> element, and replace the

+<literal>element</literal> element by a <literal>ref</literal> element

+referring to the added <literal>define</literal> element. The value of

+the <literal>name</literal> attribute of the added

+<literal>define</literal> element must be different from value of the

+<literal>name</literal> attribute of all other

+<literal>define</literal> elements. The child of the added

+<literal>define</literal> element is the <literal>element</literal>

+element.</para>

+

+<para>Define a <literal>ref</literal> element to be

+<firstterm>expandable</firstterm> if it refers to a

+<literal>define</literal> element whose child is not an

+<literal>element</literal> element.  For each <literal>ref</literal>

+element that is expandable and is a descendant of a

+<literal>start</literal> element or an <literal>element</literal>

+element, expand it by replacing the <literal>ref</literal> element by

+the child of the <literal>define</literal> element to which it refers and

+then recursively expanding any expandable <literal>ref</literal>

+elements in this replacement.  This must not result in a loop.

+In other words expanding the replacement of a

+<literal>ref</literal> element having a <literal>name</literal> with

+value <replaceable>n</replaceable> must not require the expansion of

+<literal>ref</literal> element also having a <literal>name</literal>

+with value <replaceable>n</replaceable>.  Finally, remove any

+<literal>define</literal> element whose child is not an

+<literal>element</literal> element.</para>

+

+</section>

+

+<section id="notAllowed">

+<title><literal>notAllowed</literal> element</title>

+

+<para>In this rule, the grammar is transformed so that a

+<literal>notAllowed</literal> element occurs only as the child of

+a <literal>start</literal> or <literal>element</literal> element.  An

+<literal>attribute</literal>, <literal>list</literal>,

+<literal>group</literal>, <literal>interleave</literal>,

+or <literal>oneOrMore</literal> element that has a

+<literal>notAllowed</literal> child element is transformed into a

+<literal>notAllowed</literal> element.  A <literal>choice</literal>

+element that has two <literal>notAllowed</literal> child elements is

+transformed into a <literal>notAllowed</literal> element.  A

+<literal>choice</literal> element that has one

+<literal>notAllowed</literal> child element is transformed into its

+other child element. An <literal>except</literal> element that has a

+<literal>notAllowed</literal> child element is removed.

+The preceding transformations are applied

+repeatedly until none of them is applicable any more.

+Any <literal>define</literal> element that is no longer reachable

+is removed.</para>

+

+</section>

+

+<section>

+<title><literal>empty</literal> element</title>

+

+<para>In this rule, the grammar is transformed so that an

+<literal>empty</literal> element does not occur as a child of a

+<literal>group</literal>, <literal>interleave</literal>, or

+<literal>oneOrMore</literal> element or as the second child of

+a <literal>choice</literal> element. A <literal>group</literal>,

+<literal>interleave</literal> or <literal>choice</literal> element

+that has two <literal>empty</literal> child elements is transformed

+into an <literal>empty</literal> element.  A <literal>group</literal>

+or <literal>interleave</literal> element that has one

+<literal>empty</literal> child element is transformed into its other

+child element.  A <literal>choice</literal> element whose

+second child element is an <literal>empty</literal> element is

+transformed by interchanging its two child elements.  A

+<literal>oneOrMore</literal> element that has an

+<literal>empty</literal> child element is transformed into an

+<literal>empty</literal> element. The preceding transformations are applied

+repeatedly until none of them is applicable any more.</para>

+

+</section>

+

+</section>

+

+<section id="simple-syntax">

+<title>Simple syntax</title>

+

+<para>After applying all the rules in <xref

+linkend="simplification"/>, the schema will match the following

+grammar:</para>

+

+<grammarref src="simple.rng"/>

+

+<para>With this grammar, no elements or attributes are allowed other

+than those explicitly shown.</para>

+

+<section id="simple-syntax-example">

+<title>Example</title>

+

+<para>The following is an example of how the schema in <xref

+linkend="full-syntax-example"/> can be transformed into the simple

+syntax:</para>

+

+<programlisting><![CDATA[<?xml version="1.0"?>

+<grammar xmlns="http://relaxng.org/ns/structure/1.0">

+  <start>

+    <ref name="foo.element"/>

+  </start>

+

+  <define name="foo.element">

+    <element>

+      <name ns="">foo</name>

+      <group>

+        <ref name="bar1.element"/>

+        <ref name="bar2.element"/>

+      </group>

+    </element>

+  </define>

+

+  <define name="bar1.element">

+    <element>

+      <name ns="http://www.example.com/n1">bar1</name>

+      <empty/>

+    </element>

+  </define>

+

+  <define name="bar2.element">

+    <element>

+      <name ns="http://www.example.com/n2">bar2</name>

+      <empty/>

+    </element>

+  </define>

+</grammar>]]></programlisting>

+

+<note><para>Strictly speaking, the result of simplification is an

+instance of the data model rather than an XML document.  For

+convenience, we use an XML document to represent an instance of the

+data model.</para></note>

+

+</section>

+

+</section>

+

+<section id="semantics">

+<title>Semantics</title>

+

+<para>In this section, we define the semantics of a correct RELAX NG

+schema that has been transformed into the simple syntax.  The

+semantics of a RELAX NG schema consist of a specification of what XML

+documents are valid with respect to that schema.  The semantics are

+described formally.  The formalism uses axioms and inference rules.

+Axioms are propositions that are provable unconditionally.  An

+inference rule consists of one or more antecedents and exactly one

+consequent.  An antecedent is either positive or negative.  If all the

+positive antecedents of an inference rule are provable and none of the

+negative antecedents are provable, then the consequent of the

+inference rule is provable. An XML document is valid with respect to a

+RELAX NG schema if and only if the proposition that it is valid is

+provable in the formalism specified in this section.</para>

+

+<note><para>This kind of formalism is similar to a proof system.

+However, a traditional proof system only has positive

+antecedents.</para></note>

+

+<para>The notation for inference rules separates the antecedents from

+the consequent by a horizontal line: the antecedents are above the

+line; the consequent is below the line.  If an antecedent is of the

+form not(<replaceable>p</replaceable>), then it is a negative

+antecedent; otherwise, it is a positive antecedent.  Both axioms and

+inferences

+rules may use variables.  A variable has a name and optionally a

+subscript.  The name of a variable is italicized.  Each variable has a

+range that is determined by its name.  Axioms and inference rules are

+implicitly universally quantified over the variables they contain.  We

+explain this further below.</para>

+

+<para>The possibility that an inference rule or axiom may contain more

+than one occurrence of a particular variable requires that an identity

+relation be defined on each kind of object over which a variable can

+range.  The identity relation for all kinds of object is value-based.

+Two objects of a particular kind are identical if the constituents of

+the objects are identical.  For example, two attributes are considered

+the same if they have the same name and the same value. Two characters

+are identical if their Unicode character codes are the same.</para>

+

+<section id="name-classes">

+<title>Name classes</title>

+

+<para>The main semantic concept for name classes is that of a name

+belonging to a name class. A name class is an element that matches the

+production nameClass. A name is as defined in <xref

+linkend="data-model"/>: it consists of a namespace URI and a local

+name.</para>

+

+<para>We use the following notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:var range="name"/></term><listitem><para>is a variable

+that ranges over names</para></listitem></varlistentry>

+

+<varlistentry><term><p:var range="nameClass"/></term><listitem><para>ranges over name classes</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:var range="nameClass"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that name <p:var range="name"/> is a member of name class <p:var range="nameClass"/>

+

+</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>We are now ready for our first axiom, which is called "anyName

+1":</para>

+

+<p:proofSystem>

+  <p:rule name="anyName 1">

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:element name="anyName"/>

+    </p:judgement>

+  </p:rule>

+</p:proofSystem>

+

+<para>This says for any name <p:var range="name"/>, <p:var

+range="name"/> belongs to the name class <p:element name="anyName"/>,

+in other words <p:element name="anyName"/> matches any name. Note the

+effect of the implicit universal quantification over the variables in

+the axiom: this is what makes the axiom apply for any name <p:var

+range="name"/>.</para>

+

+<para>Our first inference rule is almost as simple:</para>

+

+<p:proofSystem>

+  <p:rule name="anyName 2">

+    <p:not>

+      <p:judgement name="belongs">

+	<p:var range="name"/>

+	<p:var range="nameClass"/>

+      </p:judgement>

+    </p:not>

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:element name="anyName">

+        <p:element name="except">

+  	  <p:var range="nameClass"/>

+        </p:element>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+<para>This says that for any name <p:var range="name"/>

+and for any name class 	<p:var range="nameClass"/>,

+if <p:var range="name"/> does not belong to <p:var range="nameClass"/>,

+then <p:var range="name"/> belongs to 

+      <p:element name="anyName">

+        <p:element name="except">

+  	  <p:var range="nameClass"/>

+        </p:element>

+      </p:element>. In other words,       <p:element name="anyName">

+        <p:element name="except">

+  	  <p:var range="nameClass"/>

+        </p:element>

+      </p:element> matches any name that does not match <p:var range="nameClass"/>.</para>

+

+<para>We now need the following additional notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:var range="ncname"/></term>

+

+<listitem><para>ranges over local names; a local name is a string that

+matches the NCName production of <xref linkend="xml-names"/>, that is,

+a name with no colons</para></listitem>

+</varlistentry>

+

+<varlistentry><term><p:var range="uri"/></term><listitem><para>ranges over URIs</para></listitem></varlistentry>

+

+<varlistentry>

+<term>

+  <p:function name="name">

+    <p:var range="uri"/>

+    <p:var range="ncname"/>

+  </p:function>

+</term>

+<listitem><para>constructs a name with URI <p:var range="uri"/> and local

+name <p:var range="ncname"/></para></listitem>

+</varlistentry>

+

+</variablelist>

+

+<para>The remaining axioms and inference rules for name classes are as

+follows:</para>

+

+<p:proofSystem>

+

+  <p:rule name="nsName 1">

+    <p:judgement name="belongs">

+      <p:function name="name">

+        <p:var range="uri"/>

+        <p:var range="ncname"/>

+      </p:function>

+      <p:element name="nsName">

+        <p:attribute name="ns">

+          <p:var range="uri"/>

+        </p:attribute>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="nsName 2">

+    <p:not>

+      <p:judgement name="belongs">

+	<p:function name="name">

+	  <p:var range="uri"/>

+	  <p:var range="ncname"/>

+	</p:function>

+	<p:var range="nameClass"/>

+      </p:judgement>

+    </p:not>

+    <p:judgement name="belongs">

+      <p:function name="name">

+        <p:var range="uri"/>

+        <p:var range="ncname"/>

+      </p:function>

+      <p:element name="nsName">

+        <p:attribute name="ns">

+          <p:var range="uri"/>

+        </p:attribute>

+        <p:element name="except">

+          <p:var range="nameClass"/>

+        </p:element>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="name">

+    <p:judgement name="belongs">

+      <p:function name="name">

+        <p:var range="uri"/>

+        <p:var range="ncname"/>

+      </p:function>

+      <p:element name="name">

+        <p:attribute name="ns">

+          <p:var range="uri"/>

+        </p:attribute>

+        <p:var range="ncname"/>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="name choice 1">

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:var range="nameClass" sub="1"/>

+    </p:judgement>

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:element name="choice">

+        <p:var range="nameClass" sub="1"/>

+        <p:var range="nameClass" sub="2"/>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="name choice 2">

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:var range="nameClass" sub="2"/>

+    </p:judgement>

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:element name="choice">

+        <p:var range="nameClass" sub="1"/>

+        <p:var range="nameClass" sub="2"/>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+</section>

+

+

+<section>

+<title>Patterns</title>

+

+<para>The axioms and inference rules for patterns use the following

+notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:var range="context"/></term><listitem><para>ranges

+over contexts (as defined in <xref

+linkend="data-model"/>)</para></listitem></varlistentry>

+

+<varlistentry><term><p:var range="att"/></term><listitem><para>ranges over

+sets of attributes; a set with a single member

+is considered the same as that member</para></listitem></varlistentry>

+

+<varlistentry><term><p:var

+range="mixed"/></term><listitem><para>ranges over sequences of

+elements and strings; a sequence with a single member is considered

+the same as that member; the sequences ranged over by <p:var

+range="mixed"/> may contain consecutive strings and may contain strings

+that are empty; thus, there are sequences ranged over by <p:var

+range="mixed"/> that cannot occur as the children of an

+element</para></listitem></varlistentry>

+

+<varlistentry><term><p:var range="pattern"/></term><listitem><para>ranges

+over patterns (elements matching the pattern

+production)</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that with respect to context <p:var range="context"/>, the

+attributes <p:var range="att"/> and the sequence of elements and

+strings <p:var range="mixed"/> matches the pattern <p:var

+range="pattern"/></para></listitem></varlistentry>

+

+</variablelist>

+

+<section id="choice-pattern">

+<title><literal>choice</literal> pattern</title>

+

+<para>The semantics of the <literal>choice</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="choice 1">

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern" sub="1"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:element name="choice">

+	<p:var range="pattern" sub="1"/>

+	<p:var range="pattern" sub="2"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+  <p:rule name="choice 2">

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern" sub="2"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:element name="choice">

+	<p:var range="pattern" sub="1"/>

+	<p:var range="pattern" sub="2"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+

+</p:proofSystem>

+

+</section>

+

+<section>

+<title><literal>group</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:function name="append">

+	<p:var range="mixed" sub="1"/>

+	<p:var range="mixed" sub="2"/>

+      </p:function></term><listitem>

+<para>represents the concatenation of the sequences <p:var range="mixed" sub="1"/> and <p:var range="mixed" sub="2"/>

+

+</para></listitem></varlistentry>

+

+<varlistentry><term><p:function name="union">

+	<p:var range="att" sub="1"/>

+	<p:var range="att" sub="2"/>

+      </p:function></term><listitem>

+<para>represents the union of <p:var range="att" sub="1"/>

+and <p:var range="att" sub="2"/></para>

+</listitem>

+</varlistentry>

+

+</variablelist>

+

+<para>The semantics of the <literal>group</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="group">

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="1"/>

+      <p:var range="mixed" sub="1"/>

+      <p:var range="pattern" sub="1"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="2"/>

+      <p:var range="mixed" sub="2"/>

+      <p:var range="pattern" sub="2"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="union">

+	<p:var range="att" sub="1"/>

+	<p:var range="att" sub="2"/>

+      </p:function>

+      <p:function name="append">

+	<p:var range="mixed" sub="1"/>

+	<p:var range="mixed" sub="2"/>

+      </p:function>

+      <p:element name="group">

+	<p:var range="pattern" sub="1"/>

+	<p:var range="pattern" sub="2"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+</p:proofSystem>

+

+<note><para>The restriction in <xref linkend="attribute-restrictions"/>

+ensures that the set of attributes constructed in the consequent will

+not have multiple attributes with the same name.</para></note>

+

+</section>

+

+

+<section id="empty-pattern">

+<title><literal>empty</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:function name="emptySequence"/></term><listitem><para>represents an empty sequence</para></listitem></varlistentry>

+

+<varlistentry><term><p:function name="emptySet"/></term><listitem><para>represents an empty set</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The semantics of the <literal>empty</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="empty">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:function name="emptySequence"/>

+      <p:element name="empty"></p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+</p:proofSystem>

+

+</section>

+

+

+<section id="text-pattern">

+<title><literal>text</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:var range="string"/></term><listitem><para>ranges

+over strings</para></listitem></varlistentry>

+</variablelist>

+

+<para>The semantics of the <literal>text</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="text 1">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:function name="emptySequence"/>

+      <p:element name="text"></p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="text 2">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="mixed"/>

+      <p:element name="text"></p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:function name="append">

+        <p:var range="mixed"/>

+        <p:var range="string"/>

+      </p:function>

+      <p:element name="text"></p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+<para>The effect of the above rule is that a <literal>text</literal>

+element matches zero or more strings.</para>

+

+</section>

+

+

+<section>

+<title><literal>oneOrMore</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:judgement name="disjoint">

+      <p:var range="att" sub="1"/>

+      <p:var range="att" sub="2"/>

+    </p:judgement></term><listitem><para>

+asserts that there is no name that is

+the name of both an attribute in <p:var range="att" sub="1"/>

+and of an attribute in <p:var range="att" sub="2"/>

+</para></listitem></varlistentry>

+</variablelist>

+

+<para>The semantics of the <literal>oneOrMore</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="oneOrMore 1">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:element name="oneOrMore">

+        <p:var range="pattern"/>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="oneOrMore 2">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="1"/>

+      <p:var range="mixed" sub="1"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="2"/>

+      <p:var range="mixed" sub="2"/>

+      <p:element name="oneOrMore">

+        <p:var range="pattern"/>

+      </p:element>

+    </p:judgement>

+

+    <p:judgement name="disjoint">

+      <p:var range="att" sub="1"/>

+      <p:var range="att" sub="2"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="union">

+	<p:var range="att" sub="1"/>

+	<p:var range="att" sub="2"/>

+      </p:function>

+      <p:function name="append">

+	<p:var range="mixed" sub="1"/>

+	<p:var range="mixed" sub="2"/>

+      </p:function>

+      <p:element name="oneOrMore">

+        <p:var range="pattern"/>

+      </p:element>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+</section>

+

+

+<section>

+<title><literal>interleave</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:judgement name="interleave">

+      <p:var range="mixed" sub="1"/>

+      <p:var range="mixed" sub="2"/>

+      <p:var range="mixed" sub="3"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that <p:var range="mixed" sub="1"/>

+is an interleaving of <p:var range="mixed" sub="2"/>

+and <p:var range="mixed" sub="3"/>

+</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The semantics of interleaving are defined by the following rules.</para>

+

+

+<p:proofSystem>

+  <p:rule name="interleaves 1">

+   

+    <p:judgement name="interleave">

+      <p:function name="emptySequence"/>

+      <p:function name="emptySequence"/>

+      <p:function name="emptySequence"/>

+    </p:judgement>

+

+  </p:rule>

+

+  <p:rule name="interleaves 2">

+   

+    <p:judgement name="interleave">

+      <p:var range="mixed" sub="1"/>

+      <p:var range="mixed" sub="2"/>

+      <p:var range="mixed" sub="3"/>

+    </p:judgement>

+

+    <p:judgement name="interleave">

+      <p:function name="append">

+        <p:var range="mixed" sub="4"/>

+        <p:var range="mixed" sub="1"/>

+      </p:function>

+      <p:function name="append">

+        <p:var range="mixed" sub="4"/>

+        <p:var range="mixed" sub="2"/>

+      </p:function>

+      <p:var range="mixed" sub="3"/>

+    </p:judgement>

+

+  </p:rule>

+

+  <p:rule name="interleaves 3">

+   

+    <p:judgement name="interleave">

+      <p:var range="mixed" sub="1"/>

+      <p:var range="mixed" sub="2"/>

+      <p:var range="mixed" sub="3"/>

+    </p:judgement>

+

+    <p:judgement name="interleave">

+      <p:function name="append">

+        <p:var range="mixed" sub="4"/>

+        <p:var range="mixed" sub="1"/>

+      </p:function>

+      <p:var range="mixed" sub="2"/>

+      <p:function name="append">

+        <p:var range="mixed" sub="4"/>

+        <p:var range="mixed" sub="3"/>

+      </p:function>

+    </p:judgement>

+

+  </p:rule>

+

+</p:proofSystem>

+

+<para>For example, the interleavings of

+<literal><![CDATA[<a/><a/>]]></literal> and

+<literal><![CDATA[<b/>]]></literal> are

+<literal><![CDATA[<a/><a/><b/>]]></literal>,

+<literal><![CDATA[<a/><b/><a/>]]></literal>, and

+<literal><![CDATA[<b/><a/><a/>]]></literal>.</para>

+

+<para>The semantics of the <literal>interleave</literal> pattern are

+as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="interleave">

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="1"/>

+      <p:var range="mixed" sub="1"/>

+      <p:var range="pattern" sub="1"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att" sub="2"/>

+      <p:var range="mixed" sub="2"/>

+      <p:var range="pattern" sub="2"/>

+    </p:judgement>

+

+    <p:judgement name="interleave">

+      <p:var range="mixed" sub="3"/>

+      <p:var range="mixed" sub="1"/>

+      <p:var range="mixed" sub="2"/>

+    </p:judgement>

+

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="union">

+	<p:var range="att" sub="1"/>

+	<p:var range="att" sub="2"/>

+      </p:function>

+      <p:var range="mixed" sub="3"/>

+      <p:element name="interleave">

+	<p:var range="pattern" sub="1"/>

+	<p:var range="pattern" sub="2"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+</p:proofSystem>

+

+<note><para>The restriction in <xref linkend="attribute-restrictions"/>

+ensures that the set of attributes constructed in the consequent will

+not have multiple attributes with the same name.</para></note>

+

+</section>

+

+<section id="element-pattern">

+<title><literal>element</literal> and <literal>attribute</literal> pattern</title>

+

+<para>The value of an attribute is always a single string, which may

+be empty.  Thus, the empty sequence is not a possible attribute value.

+On the hand, the children of an element can be an empty sequence and

+cannot consist of an empty string.  In order to ensure that validation

+handles attributes and elements consistently, we introduce a variant

+of matching called <firstterm>weak matching</firstterm>.  Weak

+matching is used when matching the pattern for the value of an

+attribute or for the attributes and children of an element.  We use

+the following notation to define weak matching.</para>

+

+<variablelist>

+

+<varlistentry><term><p:function

+name="emptyString"/></term><listitem><para>represents an empty

+string</para></listitem></varlistentry>

+

+<varlistentry><term><p:var

+range="whiteSpace"/></term><listitem><para>ranges over the empty

+sequence and strings that consist entirely of

+whitespace</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="weakMatch">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that with respect to context <p:var range="context"/>, the

+attributes <p:var range="att"/> and the sequence of elements and

+strings <p:var range="mixed"/> weakly matches the pattern <p:var

+range="pattern"/></para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The semantics of weak matching are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="weak match 1">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+    <p:judgement name="weakMatch">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+  </p:rule>

+  <p:rule name="weak match 2">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:function name="emptySequence"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+    <p:judgement name="weakMatch">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:var range="whiteSpace"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+  </p:rule>

+  <p:rule name="weak match 3">

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:function name="emptyString"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+    <p:judgement name="weakMatch">

+      <p:var range="context"/>

+      <p:var range="att"/>

+      <p:function name="emptySequence"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+  </p:rule>

+</p:proofSystem>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:function name="attribute">

+        <p:var range="name"/>

+        <p:var range="string"/>

+      </p:function></term><listitem><para>

+      

+constructs an attribute with name <p:var range="name"/>

+and value <p:var range="string"/>

+</para></listitem></varlistentry>

+

+<varlistentry><term><p:function name="element">

+	<p:var range="name"/>

+        <p:var range="context"/>

+	<p:var range="att"/>

+	<p:var range="mixed"/>

+      </p:function></term><listitem><para>

+      

+constructs an element with name <p:var range="name"/>,

+context <p:var range="context"/>,

+attributes <p:var range="att"/>

+and mixed sequence <p:var range="mixed"/> as children

+</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="okAsChildren">

+      <p:var range="mixed"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that the mixed sequence <p:var range="mixed"/> can occur as

+the children of an element: it does not contain any member that is an

+empty string, nor does it contain two consecutive members that are

+both strings</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="bind">

+      <p:var range="ncname"/>

+      <p:var range="nameClass"/>

+      <p:var range="pattern"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that the grammar contains

+<p:element name="define">

+  <p:attribute name="name">

+    <p:var range="ncname"/>

+  </p:attribute>

+  <p:element name="element">

+     <p:var range="nameClass"/>

+     <p:var range="pattern"/>

+  </p:element>

+</p:element>

+</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The semantics of the <literal>attribute</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="attribute">

+

+    <p:judgement name="weakMatch">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="string"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:var range="nameClass"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="attribute">

+        <p:var range="name"/>

+        <p:var range="string"/>

+      </p:function>

+      <p:function name="emptySequence"/>

+      <p:element name="attribute">

+        <p:var range="nameClass"/>

+	<p:var range="pattern"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+</p:proofSystem>

+

+<para>The semantics of the <literal>element</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="element">

+

+    <p:judgement name="weakMatch">

+      <p:var range="context" sub="1"/>

+      <p:var range="att"/>

+      <p:var range="mixed"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="belongs">

+      <p:var range="name"/>

+      <p:var range="nameClass"/>

+    </p:judgement>

+

+    <p:judgement name="okAsChildren">

+      <p:var range="mixed"/>

+    </p:judgement>

+

+    <p:judgement name="bind">

+      <p:var range="ncname"/>

+      <p:var range="nameClass"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context" sub="2"/>

+      <p:function name="emptySet"/>

+      <p:function name="append">

+        <p:var range="whiteSpace" sub="1"/>

+	<p:function name="element">

+	  <p:var range="name"/>

+	  <p:var range="context" sub="1"/>

+	  <p:var range="att"/>

+	  <p:var range="mixed"/>

+	</p:function>

+        <p:var range="whiteSpace" sub="2"/>

+      </p:function>

+      <p:element name="ref">

+        <p:attribute name="name">

+          <p:var range="ncname"/>

+        </p:attribute>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+

+</p:proofSystem>

+

+

+</section>

+

+<section id="data-pattern">

+<title><literal>data</literal> and <literal>value</literal> pattern</title>

+

+<para>RELAX NG relies on datatype libraries to perform datatyping.

+A datatype library is identified by a URI.  A datatype within a

+datatype library is identified by an NCName.  A datatype library

+provides two services.</para>

+

+<itemizedlist>

+

+<listitem><para>It can determine whether a string is a legal

+representation of a datatype. This service accepts a list of zero or

+more parameters. For example, a string datatype might have a parameter

+specifying the length of a string.  The datatype library determines

+what parameters are applicable for each datatype.</para></listitem>

+

+<listitem><para>It can determine whether two strings represent the

+same value of a datatype.  This service does not have any

+parameters.</para></listitem>

+

+</itemizedlist>

+

+<para>Both services may make use of the context of a string.  For

+example, a datatype representing a QName would use the namespace

+map.</para>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:judgement name="datatypeAllows">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="params"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that in the datatype library identified by URI <p:var range="uri"/>, the string <p:var range="string"/> interpreted with

+context <p:var range="context"/> is a legal

+value of datatype <p:var range="ncname"/> with parameters <p:var range="params"/></para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="2"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that in the datatype library identified by URI <p:var range="uri"/>, string <p:var range="string" sub="1"/> interpreted with

+context <p:var range="context" sub="1"/> represents the same value of

+the datatype <p:var range="ncname"/> as the string <p:var range="string" sub="2"/> interpreted in the context of <p:var range="context" sub="2"/>

+</para></listitem></varlistentry>

+

+<varlistentry><term><p:var range="params"/></term><listitem><para>ranges over sequences of parameters</para></listitem></varlistentry>

+

+<varlistentry><term><p:context>

+     <p:var range="context"/>

+   </p:context></term><listitem><para>

+   

+within the start-tag of a pattern refers to the context

+of the pattern element

+</para></listitem></varlistentry>

+

+<varlistentry>

+<term>

+  <p:function name="context">

+     <p:var range="uri"/>

+     <p:var range="context"/>

+  </p:function>

+</term>

+<listitem><para>constructs a context which is the same as <p:var range="context"/>

+except that the default namespace is <p:var range="uri"/>; if <p:var

+range="uri"/> is the empty string, then there is no default namespace

+in the constructed context</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The datatypeEqual function must be reflexive, transitive

+and symmetric, that is, the following inference rules must hold:</para>

+

+<p:proofSystem>

+  <p:rule name="datatypeEqual reflexive">

+    <p:judgement name="datatypeAllows">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="params"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+  </p:rule>

+  <p:rule name="datatypeEqual transitive">

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="2"/>

+    </p:judgement>

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="3"/>

+      <p:var range="string" sub="3"/>

+      <p:var range="context" sub="3"/>

+    </p:judgement>

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="3"/>

+      <p:var range="context" sub="3"/>

+    </p:judgement>

+  </p:rule>

+  <p:rule name="datatypeEqual symmetric">

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="2"/>

+    </p:judgement>

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="2"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+    </p:judgement>

+  </p:rule>

+</p:proofSystem>

+

+<para>The semantics of the <literal>data</literal> and

+<literal>value</literal> patterns are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="value">

+    <p:judgement name="datatypeEqual">

+      <p:var range="uri" sub="1"/>

+      <p:var range="ncname"/>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="2"/>

+      <p:function name="context">

+        <p:var range="uri" sub="2"/>

+        <p:var range="context" sub="2"/>

+      </p:function>

+    </p:judgement>

+    <p:judgement name="match">

+      <p:var range="context" sub="1"/>

+      <p:function name="emptySet"/>

+      <p:var range="string" sub="1"/>

+      <p:element name="value">

+        <p:attribute name="datatypeLibrary">

+          <p:var range="uri" sub="1"/>

+        </p:attribute>

+        <p:attribute name="type">

+          <p:var range="ncname"/>

+        </p:attribute>

+        <p:attribute name="ns">

+          <p:var range="uri" sub="2"/>

+        </p:attribute>

+        <p:context>

+          <p:var range="context" sub="2"/>

+        </p:context>

+        <p:var range="string" sub="2"/>

+      </p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="data 1">

+    <p:judgement name="datatypeAllows">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="params"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="string"/>

+      <p:element name="data">

+        <p:attribute name="datatypeLibrary">

+          <p:var range="uri"/>

+        </p:attribute>

+        <p:attribute name="type">

+          <p:var range="ncname"/>

+        </p:attribute>

+        <p:var range="params"/>

+      </p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="data 2">

+    <p:judgement name="datatypeAllows">

+      <p:var range="uri"/>

+      <p:var range="ncname"/>

+      <p:var range="params"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+    <p:not>

+      <p:judgement name="match">

+	<p:var range="context"/>

+	<p:var range="att"/>

+	<p:var range="string"/>

+        <p:var range="pattern"/>

+      </p:judgement>

+    </p:not>

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="string"/>

+      <p:element name="data">

+        <p:attribute name="datatypeLibrary">

+          <p:var range="uri"/>

+        </p:attribute>

+        <p:attribute name="type">

+          <p:var range="ncname"/>

+        </p:attribute>

+        <p:var range="params"/>

+        <p:element name="except">

+          <p:var range="pattern"/>

+        </p:element>

+      </p:element>

+      <p:function name="emptySet"/>

+      <p:function name="emptySet"/>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+</section>

+

+<section id="built-in-datatype">

+<title>Built-in datatype library</title>

+

+<para>The empty URI identifies a special built-in datatype library.

+This provides two datatypes, <literal>string</literal> and

+<literal>token</literal>.  No parameters are allowed for either of

+these datatypes.</para>

+

+<variablelist>

+<varlistentry><term>

+    <p:judgement name="equal">

+      <p:var range="string" sub="1"/>

+      <p:var range="string" sub="2"/>

+    </p:judgement></term>

+<listitem><para>asserts that <p:var range="string" sub="1"/>

+and <p:var range="string" sub="2"/> are identical</para></listitem>

+</varlistentry>

+

+<varlistentry><term>

+      <p:function name="normalizeWhiteSpace">

+        <p:var range="string"/>

+      </p:function>

+</term>

+<listitem><para>returns the string <p:var range="string"/>,

+with leading and trailing whitespace characters removed,

+and with each other maximal sequence of whitespace characters

+replaced by a single space character </para></listitem>

+</varlistentry>

+</variablelist>

+

+<para>The semantics of the two built-in datatypes are as

+follows:</para>

+

+<p:proofSystem>

+

+  <p:rule name="string allows">

+    <p:judgement name="datatypeAllows">

+      <p:function name="emptyString"/>

+      <p:string>string</p:string>

+      <p:function name="emptySequence"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="string equal">

+    <p:judgement name="datatypeEqual">

+      <p:function name="emptyString"/>

+      <p:string>string</p:string>

+      <p:var range="string"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string"/>

+      <p:var range="context" sub="2"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="token allows">

+    <p:judgement name="datatypeAllows">

+      <p:function name="emptyString"/>

+      <p:string>token</p:string>

+      <p:function name="emptySequence"/>

+      <p:var range="string"/>

+      <p:var range="context"/>

+    </p:judgement>

+  </p:rule>

+

+  <p:rule name="token equal">

+    <p:judgement name="equal">

+      <p:function name="normalizeWhiteSpace">

+        <p:var range="string" sub="1"/>

+      </p:function>

+      <p:function name="normalizeWhiteSpace">

+        <p:var range="string" sub="2"/>

+      </p:function>

+    </p:judgement>

+    <p:judgement name="datatypeEqual">

+      <p:function name="emptyString"/>

+      <p:string>token</p:string>

+      <p:var range="string" sub="1"/>

+      <p:var range="context" sub="1"/>

+      <p:var range="string" sub="2"/>

+      <p:var range="context" sub="2"/>

+    </p:judgement>

+  </p:rule>

+

+</p:proofSystem>

+

+</section>

+

+<section>

+<title><literal>list</literal> pattern</title>

+

+<para>We use the following additional notation:</para>

+

+<variablelist>

+<varlistentry><term><p:function name="split">

+        <p:var range="string"/>

+      </p:function></term><listitem><para>

+      

+returns a sequence of strings one for each whitespace delimited token

+of <p:var range="string"/>; each string in the returned sequence will

+be non-empty and will not contain any

+whitespace</para></listitem></varlistentry>

+

+</variablelist>

+

+<para>The semantics of the <literal>list</literal> pattern are as follows:</para>

+

+<p:proofSystem>

+  <p:rule name="list">

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:function name="split">

+        <p:var range="string"/>

+      </p:function>

+      <p:var range="pattern"/>

+    </p:judgement>

+

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="string"/>

+      <p:element name="list">

+	<p:var range="pattern"/>

+      </p:element>

+    </p:judgement>

+

+  </p:rule>

+</p:proofSystem>

+

+<note><para>It is crucial in the above inference rule that the

+sequence that is matched against a pattern can contain consecutive

+strings.</para></note>

+

+</section>

+

+</section>

+

+<section id="validity">

+<title>Validity</title>

+

+<para>Now we can define when an element is valid with respect to a

+schema.  We use the following additional notation:</para>

+

+<variablelist>

+

+<varlistentry><term><p:var range="element"/></term><listitem><para>ranges over elements</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="valid">

+      <p:var range="element"/>

+    </p:judgement></term><listitem><para>

+    

+asserts that the element <p:var range="element"/> is valid with

+respect to the grammar</para></listitem></varlistentry>

+

+<varlistentry><term><p:judgement name="start">

+      <p:var range="pattern"/>

+    </p:judgement></term><listitem><para>

+asserts that the grammar contains

+<p:element name="start"><p:var range="pattern"/> </p:element></para></listitem></varlistentry>

+

+</variablelist>

+

+<para>An element is valid if together with an empty set of attributes

+it matches the <literal>start</literal> pattern of the grammar.</para>

+

+<p:proofSystem>

+  <p:rule name="valid">

+    <p:judgement name="start">

+      <p:var range="pattern"/>

+    </p:judgement>

+    <p:judgement name="match">

+      <p:var range="context"/>

+      <p:function name="emptySet"/>

+      <p:var range="element"/>

+      <p:var range="pattern"/>

+    </p:judgement>

+    <p:judgement name="valid">

+      <p:var range="element"/>

+    </p:judgement>

+  </p:rule>

+      

+

+</p:proofSystem>

+

+</section>

+

+<section>

+<title>Example</title>

+

+<para>Let <p:var range="element" sub="0"/> be</para>

+

+<p:formula>

+

+<p:function name="element">

+  <p:function name="name">

+    <p:function name="emptyString"/>

+    <p:string>foo</p:string>

+  </p:function>

+  <p:var range="context" sub="0"/>

+  <p:function name="emptySet"/>

+  <p:var range="mixed"/>

+</p:function>

+

+</p:formula>

+

+<para>where <p:var range="mixed"/> is</para>

+

+<p:formula>

+  <p:function name="append">

+    <p:var range="element" sub="1"/>

+    <p:var range="element" sub="2"/>

+  </p:function>

+</p:formula>

+

+<para>and <p:var range="element" sub="1"/> is</para>

+

+<p:formula>

+  <p:function name="element">

+    <p:function name="name">

+      <p:string>http://www.example.com/n1</p:string>

+      <p:string>bar1</p:string>

+    </p:function>

+    <p:var range="context" sub="1"/>

+    <p:function name="emptySet"/>

+    <p:function name="emptySequence"/>

+  </p:function>

+</p:formula>

+

+<para>and <p:var range="element" sub="2"/> is</para>

+

+<p:formula>

+  <p:function name="element">

+    <p:function name="name">

+      <p:string>http://www.example.com/n2</p:string>

+      <p:string>bar2</p:string>

+    </p:function>

+    <p:var range="context" sub="2"/>

+    <p:function name="emptySet"/>

+    <p:function name="emptySequence"/>

+  </p:function>

+</p:formula>

+

+<para>Assuming appropriate definitions of <p:var range="context"

+sub="0"/>, <p:var range="context" sub="1"/> and <p:var range="context"

+sub="2"/>, this represents the document in <xref

+linkend="data-model-example"/>.</para>

+

+<para>We now show how <p:var range="element" sub="0"/> can be shown to

+be valid with respect to the schema in <xref

+linkend="simple-syntax-example"/>.  The schema is equivalent to the

+following propositions:</para>

+

+<p:formula>

+  <p:judgement name="start">

+    <p:element name="ref">

+      <p:attribute name="name"><p:string>foo</p:string></p:attribute>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<p:formula>

+  <p:judgement name="bind">

+    <p:string>foo.element</p:string>

+    <p:element name="name">

+      <p:attribute name="ns"><p:function name="emptyString"/></p:attribute>

+      <p:string>foo</p:string>

+    </p:element>

+    <p:element name="group">

+      <p:element name="ref">

+	<p:attribute name="name">

+	  <p:string>bar1</p:string>

+	</p:attribute>

+      </p:element>

+      <p:element name="ref">

+	<p:attribute name="name">

+	  <p:string>bar2</p:string>

+	</p:attribute>

+      </p:element>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<p:formula>

+  <p:judgement name="bind">

+    <p:string>bar1.element</p:string>

+    <p:element name="name">

+      <p:attribute name="ns">

+	<p:string>http://www.example.com/n1</p:string>

+      </p:attribute>

+      <p:string>bar1</p:string>

+    </p:element>

+    <p:element name="empty"/>

+  </p:judgement>

+</p:formula>

+

+<p:formula>

+  <p:judgement name="bind">

+    <p:string>bar2.element</p:string>

+    <p:element name="name">

+      <p:attribute name="ns">

+	<p:string>http://www.example.com/n2</p:string>

+      </p:attribute>

+      <p:string>bar2</p:string>

+    </p:element>

+    <p:element name="empty"/>

+  </p:judgement>

+</p:formula>

+

+

+<para>Let name class <p:var range="nameClass" sub="1"/> be</para>

+

+<p:formula>

+  <p:element name="name">

+    <p:attribute name="ns">

+      <p:string>http://www.example.com/n1</p:string>

+    </p:attribute>

+    <p:string>bar1</p:string>

+  </p:element>

+</p:formula>

+

+<para>and let <p:var range="nameClass" sub="2"/> be</para>

+

+<p:formula>

+  <p:element name="name">

+    <p:attribute name="ns">

+      <p:string>http://www.example.com/n2</p:string>

+    </p:attribute>

+    <p:string>bar2</p:string>

+  </p:element>

+</p:formula>

+

+<para>Then, by the inference rule (name) in <xref

+linkend="name-classes"/>, we have</para>

+

+<p:formula>

+  <p:judgement name="belongs">

+    <p:function name="name">

+      <p:string>http://www.example.com/n1</p:string>

+      <p:string>bar1</p:string>

+    </p:function>

+    <p:var range="nameClass" sub="1"/>

+  </p:judgement>

+</p:formula>

+

+<para>and</para>

+

+<p:formula>

+  <p:judgement name="belongs">

+    <p:function name="name">

+      <p:string>http://www.example.com/n2</p:string>

+      <p:string>bar2</p:string>

+    </p:function>

+    <p:var range="nameClass" sub="2"/>

+  </p:judgement>

+</p:formula>

+

+

+<para>By the inference rule (empty) in <xref linkend="empty-pattern"/>,

+we have</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="1"/>

+    <p:function name="emptySet"/>

+    <p:function name="emptySequence"/>

+    <p:element name="empty"></p:element>

+  </p:judgement>

+</p:formula>

+

+<para>and</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="2"/>

+    <p:function name="emptySet"/>

+    <p:function name="emptySequence"/>

+    <p:element name="empty"></p:element>

+  </p:judgement>

+</p:formula>

+

+<para>Thus by the inference rule (element) in <xref

+linkend="element-pattern"/>, we have</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="0"/>

+    <p:function name="emptySet"/>

+    <p:var range="element" sub="1"/>

+    <p:element name="ref">

+      <p:attribute name="name">

+        <p:string>bar1</p:string>

+      </p:attribute>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<para>Note that we have chosen <p:var

+range="context" sub="0"/>, since any context is allowed.</para>

+

+<para>Likewise, we have</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="0"/>

+    <p:function name="emptySet"/>

+    <p:var range="element" sub="2"/>

+    <p:element name="ref">

+      <p:attribute name="name">

+        <p:string>bar2</p:string>

+      </p:attribute>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<para>By the inference rule (group) in <xref

+linkend="choice-pattern"/>, we have</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="0"/>

+    <p:function name="emptySet"/>

+    <p:function name="append">

+      <p:var range="element" sub="1"/>

+      <p:var range="element" sub="2"/>

+    </p:function>

+    <p:element name="group">

+      <p:element name="ref">

+        <p:attribute name="name">

+          <p:string>bar1</p:string>

+        </p:attribute>

+      </p:element>

+      <p:element name="ref">

+        <p:attribute name="name">

+          <p:string>bar2</p:string>

+        </p:attribute>

+      </p:element>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<para>By the inference rule (element) in <xref

+linkend="element-pattern"/>, we have</para>

+

+<p:formula>

+  <p:judgement name="match">

+    <p:var range="context" sub="3"/>

+    <p:function name="emptySet"/>

+    <p:function name="element">

+      <p:function name="name">

+        <p:function name="emptyString"/>

+        <p:string>foo</p:string>

+      </p:function>

+      <p:var range="context" sub="0"/>

+      <p:function name="emptySet"/>

+      <p:var range="mixed"/>

+    </p:function>

+    <p:element name="ref">

+      <p:attribute name="name">

+        <p:string>foo</p:string>

+      </p:attribute>

+    </p:element>

+  </p:judgement>

+</p:formula>

+

+<para>Here <p:var range="context" sub="3"/> is an arbitrary

+context.</para>

+

+<para>Thus we can apply the inference rule (valid) in <xref

+linkend="validity"/> and obtain</para>

+

+<p:formula>

+  <p:judgement name="valid">

+    <p:var range="element" sub="0"/>

+  </p:judgement>

+</p:formula>

+

+</section>

+

+</section>

+

+<section id="restriction">

+<title>Restrictions</title>

+

+<para>The following constraints are all checked after the grammar has

+been transformed to the simple form described in <xref

+linkend="simple-syntax"/>. The purpose of these restrictions is to

+catch user errors and to facilitate implementation.</para>

+

+<section id="contextual-restriction">

+<title>Contextual restrictions</title>

+

+<para>In this section we describe restrictions on where elements are

+allowed in the schema based on the names of the ancestor elements. We

+use the concept of a <firstterm>prohibited path</firstterm> to

+describe these restrictions. A path is a sequence of NCNames separated

+by <literal>/</literal> or <literal>//</literal>.</para>

+

+<itemizedlist>

+

+<listitem><para>An element matches a path

+<replaceable>x</replaceable>, where <replaceable>x</replaceable> is an

+NCName, if and only if the local name of the element is

+<replaceable>x</replaceable></para></listitem>

+

+<listitem><para>An element matches a path

+<replaceable>x</replaceable><literal>/</literal><replaceable>p</replaceable>,

+where <replaceable>x</replaceable> is an NCName and

+<replaceable>p</replaceable> is a path, if and only if the local name

+of the element is <replaceable>x</replaceable> and the element has a

+child that matches <replaceable>p</replaceable></para></listitem>

+

+<listitem><para>An element matches a path

+<replaceable>x</replaceable><literal>//</literal><replaceable>p</replaceable>,

+where <replaceable>x</replaceable> is an NCName and

+<replaceable>p</replaceable> is a path, if and only if the local name

+of the element is <replaceable>x</replaceable> and the element has a

+descendant that matches <replaceable>p</replaceable></para></listitem>

+

+</itemizedlist>

+

+<para>For example, the element</para>

+

+<programlisting><![CDATA[<foo>

+  <bar>

+    <baz/>

+  </bar>

+</foo>]]></programlisting>

+

+<para>matches the paths <literal>foo</literal>,

+<literal>foo/bar</literal>, <literal>foo//bar</literal>,

+<literal>foo//baz</literal>, <literal>foo/bar/baz</literal>,

+<literal>foo/bar//baz</literal> and <literal>foo//bar/baz</literal>,

+but not <literal>foo/baz</literal> or

+<literal>foobar</literal>.</para>

+

+<para>A correct RELAX NG schema must be such that, after

+transformation to the simple form, it does not contain any element

+that matches a prohibited path.</para>

+

+<section>

+<title><literal>attribute</literal> pattern</title>

+

+<para>The following paths are prohibited:</para>

+

+<itemizedlist>

+<listitem><para><literal>attribute//ref</literal></para></listitem>

+<listitem><para><literal>attribute//attribute</literal></para></listitem>

+</itemizedlist>

+

+</section>

+

+<section>

+<title><literal>oneOrMore</literal> pattern</title>

+

+<para>The following paths are prohibited:</para>

+

+<itemizedlist>

+<listitem><para><literal>oneOrMore//group//attribute</literal></para></listitem>

+<listitem><para><literal>oneOrMore//interleave//attribute</literal></para></listitem>

+</itemizedlist>

+

+</section>

+

+<section id="list-restrictions">

+<title><literal>list</literal> pattern</title>

+

+<para>The following paths are prohibited:</para>

+

+<itemizedlist>

+<listitem><para><literal>list//list</literal></para></listitem>

+<listitem><para><literal>list//ref</literal></para></listitem>

+<listitem><para><literal>list//attribute</literal></para></listitem>

+<listitem><para><literal>list//text</literal></para></listitem>

+<listitem><para><literal>list//interleave</literal></para></listitem>

+</itemizedlist>

+</section>

+

+<section id="context-data-except">

+<title><literal>except</literal> in <literal>data</literal> pattern</title>

+

+<para>The following paths are prohibited:</para>

+

+<itemizedlist>

+<listitem><para><literal>data/except//attribute</literal></para></listitem>

+<listitem><para><literal>data/except//ref</literal></para></listitem>

+<listitem><para><literal>data/except//text</literal></para></listitem>

+<listitem><para><literal>data/except//list</literal></para></listitem>

+<listitem><para><literal>data/except//group</literal></para></listitem>

+<listitem><para><literal>data/except//interleave</literal></para></listitem>

+<listitem><para><literal>data/except//oneOrMore</literal></para></listitem>

+<listitem><para><literal>data/except//empty</literal></para></listitem>

+</itemizedlist>

+

+<note><para>This implies that an <literal>except</literal> element

+with a <literal>data</literal> parent can contain only

+<literal>data</literal>, <literal>value</literal> and

+<literal>choice</literal> elements.</para></note>

+

+</section>

+

+<section id="context-start">

+<title><literal>start</literal> element</title>

+

+<para>The following paths are prohibited:</para>

+

+<itemizedlist>

+<listitem><para><literal>start//attribute</literal></para></listitem>

+<listitem><para><literal>start//data</literal></para></listitem>

+<listitem><para><literal>start//value</literal></para></listitem>

+<listitem><para><literal>start//text</literal></para></listitem>

+<listitem><para><literal>start//list</literal></para></listitem>

+<listitem><para><literal>start//group</literal></para></listitem>

+<listitem><para><literal>start//interleave</literal></para></listitem>

+<listitem><para><literal>start//oneOrMore</literal></para></listitem>

+<listitem><para><literal>start//empty</literal></para></listitem>

+</itemizedlist>

+</section>

+

+</section>

+

+<section id="string-sequences">

+<title>String sequences</title>

+

+<para>RELAX NG does not allow a pattern such as:</para>

+

+<programlisting><![CDATA[<element name="foo">

+  <group>

+    <data type="int"/>

+    <element name="bar">

+      <empty/>

+    </element>

+  </group>

+</element>]]></programlisting>

+

+<para>Nor does it allow a pattern such as:</para>

+

+<programlisting><![CDATA[<element name="foo">

+  <group>

+    <data type="int"/>

+    <text/>

+  </group>

+</element>]]></programlisting>

+

+<para>More generally, if the pattern for the content of an element or

+attribute contains</para>

+

+<itemizedlist>

+

+<listitem><para>a pattern that can match a child

+(that is, an <literal>element</literal>, <literal>data</literal>,

+<literal>value</literal>, <literal>list</literal> or

+<literal>text</literal> pattern), and</para></listitem>

+

+<listitem><para>a pattern that matches a single string (that is, a

+<literal>data</literal>, <literal>value</literal> or

+<literal>list</literal> pattern),</para></listitem>

+

+</itemizedlist>

+

+<para>then the two patterns must be alternatives to each other.</para>

+

+<para>This rule does not apply to patterns occurring within a

+<literal>list</literal> pattern.</para>

+

+<para>To formalize this, we use the concept of a content-type.  A

+pattern that is allowable as the content of an element has one of

+three content-types: empty, complex and simple.  We use the following

+notation.</para>

+

+<variablelist>

+

+<varlistentry>

+<term><p:function name="empty"/></term>

+<listitem><para>returns the empty content-type</para></listitem>

+</varlistentry>

+

+<varlistentry>

+<term><p:function name="complex"/></term>

+<listitem><para>returns the complex content-type</para></listitem>

+</varlistentry>

+

+<varlistentry>

+<term><p:function name="simple"/></term>

+<listitem><para>returns the simple content-type</para></listitem>

+</varlistentry>

+

+<varlistentry><term><p:var range="contentType"/></term>

+<listitem><para>ranges over content-types</para></listitem>

+</varlistentry>

+

+<varlistentry><term>

+  <p:judgement name="groupable">

+    <p:var range="contentType" sub="1"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+</term>

+<listitem><para>asserts that the content-types <p:var

+range="contentType" sub="1"/> and <p:var range="contentType" sub="2"/>

+are groupable</para></listitem>

+</varlistentry>

+

+</variablelist>

+

+<para>The empty content-type is groupable with anything.  In addition,

+the complex content-type is groupable with the complex content-type. The

+following rules formalize this.</para>

+

+<p:proofSystem>

+<p:rule name="group empty 1">

+  <p:judgement name="groupable">

+    <p:function name="empty"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+</p:rule>

+<p:rule name="group empty 2">

+  <p:judgement name="groupable">

+    <p:var range="contentType"/>

+    <p:function name="empty"/>

+  </p:judgement>

+</p:rule>

+<p:rule name="group complex">

+  <p:judgement name="groupable">

+    <p:function name="complex"/>

+    <p:function name="complex"/>

+  </p:judgement>

+</p:rule>

+</p:proofSystem>

+

+<para>Some patterns have a content-type. We use the following

+additional notation.</para>

+

+<variablelist>

+

+<varlistentry><term>

+  <p:judgement name="contentType">

+    <p:var range="pattern"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+</term>

+<listitem><para>asserts that pattern <p:var range="pattern"/> has

+content-type <p:var range="contentType"/></para></listitem>

+</varlistentry>

+

+<varlistentry><term>

+  <p:function name="max">

+    <p:var range="contentType" sub="1"/>

+    <p:var range="contentType" sub="2"/>

+  </p:function>

+</term>

+<listitem><para>returns the maximum of <p:var range="contentType"

+sub="1"/> and <p:var range="contentType" sub="2"/> where the

+content-types in increasing order are <p:function name="empty"/>,

+<p:function name="complex"/>, <p:function

+name="simple"/></para></listitem>

+</varlistentry>

+

+</variablelist>

+

+<para>The following rules define when a pattern has a content-type and,

+if so, what it is.</para>

+

+<p:proofSystem>

+<p:rule name="value">

+  <p:judgement name="contentType">

+    <p:element name="value">

+      <p:attribute name="datatypeLibrary">

+	<p:var range="uri" sub="1"/>

+      </p:attribute>

+      <p:attribute name="type">

+	<p:var range="ncname"/>

+      </p:attribute>

+      <p:attribute name="ns">

+	<p:var range="uri" sub="2"/>

+      </p:attribute>

+      <p:var range="string"/>

+    </p:element>

+    <p:function name="simple"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="data 1">

+  <p:judgement name="contentType">

+    <p:element name="data">

+      <p:attribute name="datatypeLibrary">

+	<p:var range="uri"/>

+      </p:attribute>

+      <p:attribute name="type">

+	<p:var range="ncname"/>

+      </p:attribute>

+      <p:var range="params"/>

+    </p:element>

+    <p:function name="simple"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="data 2">

+  <p:judgement name="contentType">

+    <p:var range="pattern"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="data">

+      <p:attribute name="datatypeLibrary">

+	<p:var range="uri"/>

+      </p:attribute>

+      <p:attribute name="type">

+	<p:var range="ncname"/>

+      </p:attribute>

+      <p:var range="params"/>

+      <p:element name="except">

+        <p:var range="pattern"/>

+      </p:element>

+    </p:element>

+    <p:function name="simple"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="list">

+  <p:judgement name="contentType">

+    <p:element name="list">

+      <p:var range="pattern"/>

+    </p:element>

+    <p:function name="simple"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="text">

+  <p:judgement name="contentType">

+    <p:element name="text"/>

+    <p:function name="complex"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="ref">

+  <p:judgement name="contentType">

+    <p:element name="ref">

+      <p:attribute name="name">

+	<p:var range="ncname"/>

+      </p:attribute>

+    </p:element>

+    <p:function name="complex"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="empty">

+  <p:judgement name="contentType">

+    <p:element name="empty"/>

+    <p:function name="empty"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="attribute">

+  <p:judgement name="contentType">

+    <p:var range="pattern"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="attribute">

+      <p:var range="nameClass"/>

+      <p:var range="pattern"/>

+    </p:element>

+    <p:function name="empty"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="group">

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="1"/>

+    <p:var range="contentType" sub="1"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="2"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+  <p:judgement name="groupable">

+    <p:var range="contentType" sub="1"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="group">

+      <p:var range="pattern" sub="1"/>

+      <p:var range="pattern" sub="2"/>

+    </p:element>

+    <p:function name="max">

+      <p:var range="contentType" sub="1"/>

+      <p:var range="contentType" sub="2"/>

+    </p:function>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="interleave">

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="1"/>

+    <p:var range="contentType" sub="1"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="2"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+  <p:judgement name="groupable">

+    <p:var range="contentType" sub="1"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="interleave">

+      <p:var range="pattern" sub="1"/>

+      <p:var range="pattern" sub="2"/>

+    </p:element>

+    <p:function name="max">

+      <p:var range="contentType" sub="1"/>

+      <p:var range="contentType" sub="2"/>

+    </p:function>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="oneOrMore">

+  <p:judgement name="contentType">

+    <p:var range="pattern"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+  <p:judgement name="groupable">

+    <p:var range="contentType"/>

+    <p:var range="contentType"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="oneOrMore">

+      <p:var range="pattern"/>

+    </p:element>

+    <p:var range="contentType"/>

+  </p:judgement>

+</p:rule>

+

+<p:rule name="choice">

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="1"/>

+    <p:var range="contentType" sub="1"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:var range="pattern" sub="2"/>

+    <p:var range="contentType" sub="2"/>

+  </p:judgement>

+  <p:judgement name="contentType">

+    <p:element name="choice">

+      <p:var range="pattern" sub="1"/>

+      <p:var range="pattern" sub="2"/>

+    </p:element>

+    <p:function name="max">

+      <p:var range="contentType" sub="1"/>

+      <p:var range="contentType" sub="2"/>

+    </p:function>

+  </p:judgement>

+</p:rule>

+

+</p:proofSystem>

+

+<note><para>The antecedent in the (data 2) rule above is in fact

+redundant because of the prohibited paths in <xref

+linkend="context-data-except"/>.</para></note>

+

+<para>Now we can describe the restriction. We use the following

+notation.</para>

+

+<variablelist>

+

+<varlistentry><term>

+  <p:judgement name="incorrectSchema"/>

+</term>

+<listitem><para>asserts that the schema is incorrect</para></listitem>

+</varlistentry>

+

+</variablelist>

+

+<para>All patterns occurring as the content of an element pattern must

+have a content-type.</para>

+

+<p:proofSystem>

+

+<p:rule name="element">

+  <p:judgement name="bind">

+    <p:var range="ncname"/>

+    <p:var range="nameClass"/>

+    <p:var range="pattern"/>

+  </p:judgement>

+  <p:not>

+    <p:judgement name="contentType">

+      <p:var range="pattern"/>

+      <p:var range="contentType"/>

+    </p:judgement>

+  </p:not>

+  <p:judgement name="incorrectSchema"/>

+</p:rule>

+

+</p:proofSystem>

+

+</section>

+

+<section id="attribute-restrictions">

+<title>Restrictions on attributes</title>

+

+<para>Duplicate attributes are not allowed.  More precisely, for a

+pattern <literal>&lt;group> <replaceable>p1</replaceable>

+<replaceable>p2</replaceable> &lt;/group></literal> or

+<literal>&lt;interleave> <replaceable>p1</replaceable>

+<replaceable>p2</replaceable> &lt;/interleave></literal>, there must

+not be a name that belongs to both the name class of an

+<literal>attribute</literal> pattern occurring in

+<replaceable>p1</replaceable> and the name class of an

+<literal>attribute</literal> pattern occurring in

+<replaceable>p2</replaceable>. A pattern <replaceable>p1</replaceable>

+is defined to <firstterm>occur in</firstterm> a pattern

+<replaceable>p2</replaceable> if</para>

+

+<itemizedlist>

+

+<listitem><para><replaceable>p1</replaceable> is

+<replaceable>p2</replaceable>, or</para></listitem>

+

+<listitem><para><replaceable>p2</replaceable> is a

+<literal>choice</literal>, <literal>interleave</literal>,

+<literal>group</literal> or <literal>oneOrMore</literal> element and

+<replaceable>p1</replaceable> occurs in one or more children of

+<replaceable>p2</replaceable>.</para></listitem>

+

+</itemizedlist>

+

+<para>Attributes using infinite name classes must be repeated.  More

+precisely, an <literal>attribute</literal> element that has an

+<literal>anyName</literal> or <literal>nsName</literal> descendant

+element must have a <literal>oneOrMore</literal> ancestor

+element.</para>

+

+<note><para>This restriction is necessary for closure under

+negation.</para></note>

+

+</section>

+

+<section id="interleave-restrictions">

+<title>Restrictions on <literal>interleave</literal></title>

+

+<para>For a pattern <literal>&lt;interleave>

+<replaceable>p1</replaceable> <replaceable>p2</replaceable>

+&lt;/interleave></literal>,</para>

+

+<itemizedlist>

+

+<listitem><para>there must not be a name that belongs to both the name

+class of an <literal>element</literal> pattern referenced by a

+<literal>ref</literal> pattern occurring in

+<replaceable>p1</replaceable> and the name class of an

+<literal>element</literal> pattern referenced by a

+<literal>ref</literal> pattern occurring in

+<replaceable>p2</replaceable>, and</para></listitem>

+

+<listitem><para>a <literal>text</literal> pattern must not occur in

+both <replaceable>p1</replaceable> and

+<replaceable>p2</replaceable>.</para></listitem>

+

+</itemizedlist>

+

+<para><xref linkend="attribute-restrictions"/> defines when one

+pattern is considered to occur in another pattern.</para>

+

+</section>

+

+</section>

+

+<section id="conformance">

+<title>Conformance</title>

+

+<para>A conforming RELAX NG validator must be able to determine for

+any XML document whether it is a correct RELAX NG schema.  A

+conforming RELAX NG validator must be able to determine for any XML

+document and for any correct RELAX NG schema whether the document is

+valid with respect to the schema.</para>

+

+<para>However, the requirements in the preceding paragraph do not

+apply if the schema uses a datatype library that the validator does

+not support.  A conforming RELAX NG validator is only required to

+support the built-in datatype library described in <xref

+linkend="built-in-datatype"/>.  A validator that claims conformance to

+RELAX NG should document which datatype libraries it supports.  The

+requirements in the preceding paragraph also do not apply if the

+schema includes <literal>externalRef</literal> or

+<literal>include</literal> elements and the validator is unable to

+retrieve the resource identified by the URI or is unable to construct

+an element from the retrieved resource.  A validator that claims

+conformance to RELAX NG should document its capabilities for handling

+URI references.</para>

+

+</section>

+

+<appendix>

+<title>RELAX NG schema for RELAX NG</title>

+

+<rngref src="relaxng.rng"/>

+

+</appendix>

+

+<appendix>

+<title>Changes since version 0.9</title>

+

+<para>The changes in this version relative to version 0.9

+are as follows:</para>

+

+<itemizedlist>

+

+<listitem><para>in the namespace URI, <literal>0.9</literal> has been

+changed to <literal>1.0</literal></para></listitem>

+

+<listitem><para><literal>data/except//empty</literal> has been added

+as a prohibited path (see <xref

+linkend="context-data-except"/>)</para></listitem>

+

+<listitem><para><literal>start//empty</literal> has been added

+as a prohibited path (see <xref

+linkend="context-start"/>)</para></listitem>

+

+<listitem><para><xref linkend="number-child-elements"/> now specifies how a

+<literal>list</literal> element with more than one child element is

+transformed</para></listitem>

+

+<listitem><para><xref linkend="notAllowed"/> now specifies how a

+<literal>notAllowed</literal> element occurring in an

+<literal>except</literal> element is transformed</para></listitem>

+

+<listitem><para>although a relative URI is not allowed as the value of

+the <literal>ns</literal> and <literal>datatypeLibrary</literal>

+attributes, an empty string is allowed (see <xref

+linkend="full-syntax"/>)</para></listitem>

+

+<listitem><para>the removal of unreachable definitions in <xref

+linkend="define-ref"/> is now correctly specified</para></listitem>

+

+<listitem><para><xref linkend="notAllowed"/> now specifies that

+<literal>define</literal> elements that are no longer reachable are

+removed</para></listitem>

+

+<listitem><para><xref linkend="constraints"/> has been added; the

+restrictions on the contents of <literal>except</literal> in name

+classes that are now specified in the newly added section were

+previously specified in a subsection of <xref

+linkend="contextual-restriction"/>, which has been

+removed</para></listitem>

+

+<listitem><para>the treatment of element and attribute values that

+consist only of whitespace has been refined (see <xref

+linkend="element-pattern"/> and <xref

+linkend="data-pattern"/>)</para></listitem>

+

+<listitem><para>attributes with infinite name classes are now required

+to be repeated (see <xref

+linkend="attribute-restrictions"/>)</para></listitem>

+

+<listitem><para>restrictions have been imposed on

+<literal>interleave</literal> (see <xref

+linkend="interleave-restrictions"/>); <literal>list//interleave</literal>

+has been added as a prohibited path (see <xref

+linkend="list-restrictions"/>)</para></listitem>

+

+<listitem><para>some of the prohibited paths in <xref

+linkend="contextual-restriction"/> have been corrected to use

+<literal>ref</literal> rather than

+<literal>element</literal></para></listitem>

+

+<listitem><para>an error in the inference rule (text 1) in <xref

+linkend="text-pattern"/> has been corrected</para></listitem>

+

+<listitem><para>the value of the <literal>ns</literal> attribute is

+now unconstrained (see <xref

+linkend="full-syntax"/>)</para></listitem>

+

+</itemizedlist>

+

+</appendix>

+

+<appendix>

+<title>RELAX NG TC (Non-Normative)</title>

+

+<para>This specification was prepared and approved for publication by

+the RELAX NG TC. The current members of the TC are:</para>

+

+<itemizedlist>

+<listitem><para>Fabio Arciniegas</para></listitem>

+<listitem><para>James Clark</para></listitem>

+<listitem><para>Mike Fitzgerald</para></listitem>

+<listitem><para>KAWAGUCHI Kohsuke</para></listitem>

+<listitem><para>Josh Lubell</para></listitem>

+<listitem><para>MURATA Makoto</para></listitem>

+<listitem><para>Norman Walsh</para></listitem>

+<listitem><para>David Webber</para></listitem>

+</itemizedlist>

+

+</appendix>

+

+<bibliography><title>References</title>

+

+<bibliodiv><title>Normative</title>

+

+<bibliomixed id="xml-rec"><abbrev>XML 1.0</abbrev>Tim Bray,

+Jean Paoli, and

+C. M. Sperberg-McQueen, Eve Maler, editors.

+<citetitle><ulink url="http://www.w3.org/TR/REC-xml">Extensible Markup

+Language (XML) 1.0 Second Edition</ulink></citetitle>.

+W3C (World Wide Web Consortium), 2000.</bibliomixed>

+

+<bibliomixed id="xml-names"><abbrev>XML Namespaces</abbrev>Tim Bray,

+Dave Hollander,

+and Andrew Layman, editors.

+<citetitle><ulink url="http://www.w3.org/TR/REC-xml-names/">Namespaces in

+XML</ulink></citetitle>.

+W3C (World Wide Web Consortium), 1999.</bibliomixed>

+

+<bibliomixed id="xlink"><abbrev>XLink</abbrev>Steve DeRose, Eve Maler

+and David Orchard, editors.

+<citetitle><ulink url="http://www.w3.org/TR/xlink/">XML Linking

+Language (XLink) Version 1.0</ulink></citetitle>.

+W3C (World Wide Web Consortium), 2001.</bibliomixed>

+

+<bibliomixed id="infoset"><abbrev>XML Infoset</abbrev>John Cowan, Richard Tobin,

+editors.

+<citetitle><ulink url="http://www.w3.org/TR/xml-infoset/">XML

+Information Set</ulink></citetitle>.

+W3C (World Wide Web Consortium), 2001.</bibliomixed>

+

+<bibliomixed id="rfc2396"><abbrev>RFC 2396</abbrev>T. Berners-Lee, R. Fielding, L. Masinter.

+<citetitle><ulink url="http://www.ietf.org/rfc/rfc2396.txt" >RFC 2396:

+Uniform Resource Identifiers (URI): Generic

+Syntax</ulink></citetitle>.

+IETF (Internet Engineering Task Force). 1998.</bibliomixed>

+

+<bibliomixed id="rfc2732"><abbrev>RFC 2732</abbrev>R. Hinden, B. Carpenter, L. Masinter.

+<citetitle><ulink url="http://www.ietf.org/rfc/rfc2732.txt">RFC 2732: Format for Literal IPv6 Addresses in URL's</ulink></citetitle>.

+IETF (Internet Engineering Task Force), 1999.</bibliomixed>

+

+<bibliomixed id="rfc3023"><abbrev>RFC 3023</abbrev> M. Murata,

+S. St.Laurent, D. Kohn.  <citetitle><ulink

+url="http://www.ietf.org/rfc/rfc3023.txt">RFC 3023: XML Media

+Types</ulink></citetitle>. IETF (Internet Engineering Task Force),

+2001.</bibliomixed>

+

+</bibliodiv>

+

+<bibliodiv><title>Non-Normative</title>

+

+<bibliomixed id="xmlschema-2"><abbrev>W3C XML Schema Datatypes</abbrev>Paul V. Biron, Ashok Malhotra, editors.

+<citetitle><ulink url="http://www.w3.org/TR/xmlschema-2/">XML Schema Part 2: Datatypes</ulink></citetitle>.

+W3C (World Wide Web Consortium), 2001.</bibliomixed>

+

+<bibliomixed id="trex"><abbrev>TREX</abbrev>James Clark.

+<citetitle><ulink url="http://www.thaiopensource.com/trex/">TREX - Tree Regular Expressions for XML</ulink></citetitle>.

+Thai Open Source Software Center, 2001.</bibliomixed>

+

+<bibliomixed id="relax"><abbrev>RELAX</abbrev>MURATA Makoto.

+<citetitle><ulink url="http://www.xml.gr.jp/relax/">RELAX (Regular

+Language description for XML)</ulink></citetitle>.  INSTAC

+(Information Technology Research and Standardization Center), 2001.</bibliomixed>

+

+<bibliomixed id="xsfd"><abbrev>XML Schema Formal</abbrev>Allen Brown,

+Matthew Fuchs, Jonathan Robie, Philip Wadler, editors.

+<citetitle><ulink url="http://www.w3.org/TR/xmlschema-formal/">XML Schema: Formal Description</ulink></citetitle>.

+W3C (World Wide Web Consortium), 2001.</bibliomixed>

+

+<bibliomixed id="tutorial"><abbrev>Tutorial</abbrev>James Clark,

+Makoto MURATA, editors.  <citetitle><ulink

+url="http://www.oasis-open.org/committees/relax-ng/tutorial.html">RELAX

+NG Tutorial</ulink></citetitle>.  OASIS, 2001.</bibliomixed>

+

+</bibliodiv>

+

+</bibliography>

+

+</article>

diff --git a/test/relaxng/testsuite.xml b/test/relaxng/testsuite.xml
index 0c1b41e..0d5a947 100644
--- a/test/relaxng/testsuite.xml
+++ b/test/relaxng/testsuite.xml
@@ -1531,4 +1531,93 @@
 </invalid>

 </testCase>

 </testSuite>

+<testSuite>

+<documentation>Test of Mixed</documentation>

+<testCase>

+<correct>

+<element name="mix" xmlns="http://relaxng.org/ns/structure/1.0">

+  <mixed>

+    <zeroOrMore>

+      <choice>

+        <element name="a">

+	  <empty/>

+	</element>

+        <element name="b">

+	  <empty/>

+	</element>

+        <element name="c">

+	  <empty/>

+	</element>

+      </choice>

+    </zeroOrMore>

+  </mixed>

+  <element name="d">

+    <empty/>

+  </element>

+</element>

+</correct>

+<valid>

+<mix>

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  <b/>

+  <a/>

+  <c/>

+  <b/>

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  mixed

+  <c/>

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  <c/>

+  mixed

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  <b/>

+  is

+  <a/>

+  inter

+  <c/>

+  mixed

+  <b/>

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  mixed

+  <b/>

+  .

+  <d/>

+</mix>

+</valid>

+<valid>

+<mix>

+  this

+  <b/>

+  is

+  <a/>

+  inter

+  <c/>

+  mixed

+  <b/>

+  .

+  <d/>

+</mix>

+</valid>

+</testCase>

+</testSuite>

 </testSuite>

diff --git a/test/relaxng/tutor8_1_2.xml b/test/relaxng/tutor8_1_2.xml
new file mode 100644
index 0000000..c1f3767
--- /dev/null
+++ b/test/relaxng/tutor8_1_2.xml
@@ -0,0 +1,7 @@
+<addressBook>
+  <card>
+    <name>b</name>
+    <email>b@b</email>
+  </card>
+</addressBook>
+
diff --git a/valid.c b/valid.c
index 491e5d4..b3b52c9 100644
--- a/valid.c
+++ b/valid.c
@@ -2287,6 +2287,8 @@
 	xmlFreeID(ret);
 	return(NULL);
     }
+    if (attr != NULL)
+	attr->atype = XML_ATTRIBUTE_ID;
     return(ret);
 }
 
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index 254e88d..0e1c7cc 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1526,15 +1526,22 @@
 	if ((ret == 0) && (node != NULL) &&
 	    (node->type == XML_ATTRIBUTE_NODE)) {
 	    xmlAttrPtr attr = (xmlAttrPtr) node;
-	    xmlChar *strip;
 
-	    strip = xmlSchemaStrip(value);
-	    if (strip != NULL) {
-		xmlAddRef(NULL, node->doc, strip, attr);
-		xmlFree(strip);
-	    } else
-		xmlAddRef(NULL, node->doc, value, attr);
-	    attr->atype = XML_ATTRIBUTE_IDREF;
+	    /*
+	     * NOTE: the REFness might have already be declared in the DTD
+	     */
+	    if ((attr->atype != XML_ATTRIBUTE_IDREF) &&
+		(attr->atype != XML_ATTRIBUTE_IDREFS)) {
+		xmlChar *strip;
+
+		strip = xmlSchemaStrip(value);
+		if (strip != NULL) {
+		    xmlAddRef(NULL, node->doc, strip, attr);
+		    xmlFree(strip);
+		} else
+		    xmlAddRef(NULL, node->doc, value, attr);
+		attr->atype = XML_ATTRIBUTE_IDREF;
+	    }
 	}
 	return(ret);
     } else if (type == xmlSchemaTypeIdrefsDef) {
@@ -1559,19 +1566,24 @@
 	if ((ret == 0) && (node != NULL) &&
 	    (node->type == XML_ATTRIBUTE_NODE)) {
 	    xmlAttrPtr attr = (xmlAttrPtr) node;
-	    xmlIDPtr res;
-	    xmlChar *strip;
+	    /*
+	     * NOTE: the IDness might have already be declared in the DTD
+	     */
+	    if (attr->atype != XML_ATTRIBUTE_ID) {
+		xmlIDPtr res;
+		xmlChar *strip;
 
-	    strip = xmlSchemaStrip(value);
-	    if (strip != NULL) {
-		res = xmlAddID(NULL, node->doc, strip, attr);
-		xmlFree(strip);
-	    } else
-		res = xmlAddID(NULL, node->doc, value, attr);
-	    if (res == NULL) {
-		ret = 2;
-	    } else {
-		attr->atype = XML_ATTRIBUTE_ID;
+		strip = xmlSchemaStrip(value);
+		if (strip != NULL) {
+		    res = xmlAddID(NULL, node->doc, strip, attr);
+		    xmlFree(strip);
+		} else
+		    res = xmlAddID(NULL, node->doc, value, attr);
+		if (res == NULL) {
+		    ret = 2;
+		} else {
+		    attr->atype = XML_ATTRIBUTE_ID;
+		}
 	    }
 	}
 	return(ret);