From fd6359e7ffa393dc57cf3f7547f57a655c01aa7a Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Thu, 2 Mar 2006 10:56:15 +0000 Subject: [PATCH] Added documentation for attributes and attribute values --- docbook/relaxng/docbook/src/index.rnc | 102 ++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/docbook/relaxng/docbook/src/index.rnc b/docbook/relaxng/docbook/src/index.rnc index 82a25b2d3..1994242ed 100644 --- a/docbook/relaxng/docbook/src/index.rnc +++ b/docbook/relaxng/docbook/src/index.rnc @@ -44,12 +44,55 @@ db.info.elements |= db.itermset # ====================================================================== -db.significance.attribute = attribute significance { "normal" | "preferred" } -db.zone.attribute = attribute zone { xsd:IDREFS } -db.pagenum.attribute = attribute pagenum { text } -db.scope.attribute = attribute scope { "all" | "global" | "local" } -db.sortas.attribute = attribute sortas { text } -db.type.attribute = attribute type { text } +db.significance.enumeration = + ## Normal + "normal" + | ## Preferred + "preferred" + +db.significance.attribute = + [ + db:refpurpose [ "Specifies the significance of the term" ] + ] + attribute significance { db.significance.enumeration } + +db.zone.attribute = + [ + db:refpurpose [ "Specifies the IDs of the elements to which this term applies" ] + ] + attribute zone { xsd:IDREFS } + +db.indexterm.pagenum.attribute = + [ + db:refpurpose [ "Indicates the page on which this index term occurs in some version of the printed document" ] + ] + attribute pagenum { text } + +db.scope.enumeration = + ## All indexes + "all" + | ## The global index (as for a combined index of a set of box) + "global" + | ## The local index (the index for this document only) + "local" + +db.scope.attribute = + [ + db:refpurpose [ "Specifies the scope of the index term" ] + ] + attribute scope { db.scope.enumeration } + +db.sortas.attribute = + [ + db:refpurpose [ "Specifies the string by which the term is to be sorted; if unspecified, the term content is used" ] + ] + attribute sortas { text } + +db.index.type.attribute = + [ + db:refpurpose [ "Specifies the target index for this term" ] + ] + attribute type { text } # ====================================================================== @@ -93,7 +136,15 @@ db.indexterm.contentmodel = div { db.indexterm.singular.role.attribute = attribute role { text } - db.indexterm.singular.class.attribute = attribute class { "singular" } + + db.indexterm.singular.class.attribute = + [ + db:refpurpose [ "Identifies the class of index term" ] + ] + attribute class { + ## A singular index term + "singular" + } db.indexterm.singular.attlist = db.indexterm.singular.role.attribute? @@ -101,9 +152,9 @@ div { & db.common.linking.attributes & db.significance.attribute? & db.zone.attribute? - & db.pagenum.attribute? + & db.indexterm.pagenum.attribute? & db.scope.attribute? - & db.type.attribute? + & db.index.type.attribute? & db.indexterm.singular.class.attribute? db.indexterm.singular = @@ -122,7 +173,15 @@ div { div { db.indexterm.startofrange.role.attribute = attribute role { text } - db.indexterm.startofrange.class.attribute = attribute class { "startofrange" } + + db.indexterm.startofrange.class.attribute = + [ + db:refpurpose [ "Identifies the class of index term" ] + ] + attribute class { + ## The start of a range + "startofrange" + } db.indexterm.startofrange.attlist = db.indexterm.startofrange.role.attribute? @@ -130,9 +189,9 @@ div { & db.common.linking.attributes & db.significance.attribute? & db.zone.attribute? - & db.pagenum.attribute? + & db.indexterm.pagenum.attribute? & db.scope.attribute? - & db.type.attribute? + & db.index.type.attribute? & db.indexterm.startofrange.class.attribute db.indexterm.startofrange = @@ -151,8 +210,21 @@ div { div { db.indexterm.endofrange.role.attribute = attribute role { text } - db.indexterm.endofrange.class.attribute = attribute class { "endofrange" } - db.indexterm.endofrange.startref.attribute = attribute startref { xsd:IDREF } + + db.indexterm.endofrange.class.attribute = + [ + db:refpurpose [ "Identifies the class of index term" ] + ] + attribute class { + ## The end of a range + "endofrange" + } + + db.indexterm.endofrange.startref.attribute = + [ + db:refpurpose [ "Points to the start of the range" ] + ] + attribute startref { xsd:IDREF } db.indexterm.endofrange.attlist = db.indexterm.endofrange.role.attribute? @@ -312,6 +384,7 @@ div { & db.common.linking.attributes & db.label.attribute? & db.index.status.attribute? + & db.index.type.attribute? db.index.info = db._info @@ -345,6 +418,7 @@ div { & db.common.linking.attributes & db.label.attribute? & db.setindex.status.attribute? + & db.index.type.attribute? db.setindex.info = db._info -- 2.40.0