namespace db = "http://docbook.org/docbook-ng"
default namespace = "http://docbook.org/docbook-ng"
-db.general.inlines |= db.glossary.inlines
+db.publishing.inlines |= db.glossary.inlines
db.list.blocks |= db.glosslist
db.navigation.components |= db.glossary
}
}
+# ======================================================================
+
+[
+ db:refname [ "termdef" ]
+ db:refpurpose [ "An inline definition of a term" ]
+]
+div {
+ db.termdef.role.attribute = attribute role { text }
+
+ db.termdef.attlist =
+ db.termdef.role.attribute?
+ & db.common.attributes
+ & db.common.linking.attributes
+ & db.baseform.attribute
+ db.termdef =
+ [
+ s:rule [
+ context = "db:termdef"
+ s:assert [
+ test = "count(db:glossterm) != 1"
+ "A termdef must contain a glossterm"
+ ]
+ ]
+ ]
+ element termdef {
+ db.termdef.attlist,
+ db.all.inlines*
+ }
+}
# ======================================================================
-[
- db:refname [ "termdef" ]
- db:refpurpose [ "An inline definition of a term" ]
-]
-div {
-
- db.termdef.role.attribute = attribute role { text }
-
- db.termdef.attlist =
- db.termdef.role.attribute?
- & db.common.attributes
- & db.common.linking.attributes
-
- db.termdef =
- element termdef {
- db.termdef.attlist,
- (db.all.inlines* & db.glossterm)
- }
-}
-
-# ======================================================================
-
[
db:refname [ "example" ]
db:refpurpose [ "A formal example, with a title" ]