From: Norman Walsh Date: Tue, 18 Jan 2005 01:57:12 +0000 (+0000) Subject: Fix bugs in handling of numbered refsections X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1e84df998e745e88bb59939140e065a1f135875;p=docbook-dsssl Fix bugs in handling of numbered refsections --- diff --git a/docbook/relaxng/src/refentry.rnc b/docbook/relaxng/src/refentry.rnc index 12bf6e0ae..860601714 100644 --- a/docbook/relaxng/src/refentry.rnc +++ b/docbook/relaxng/src/refentry.rnc @@ -34,8 +34,11 @@ db.recursive.required.sections |= db.refentry+ db.optional.refentry |= db.refentry* db.required.refentry |= db.refentry+ -db.refsect1 = notAllowed -db.refsect2 = notAllowed +db.toplevel.optional.refsection = db.refsection* +db.toplevel.required.refsection = db.refsection+ + +db.secondlevel.optional.refsection = db.refsection* +db.secondlevel.required.refsection = db.refsection+ # ====================================================================== @@ -92,7 +95,7 @@ div { db.refmeta?, db.refnamediv+, db.refsynopsisdiv?, - (db.refsection+|db.refsect1+) + db.toplevel.required.refsection } } @@ -279,8 +282,8 @@ div { element refsynopsisdiv { db.refsynopsisdiv.attlist, db.refsynopsisdiv.info, - ((db.all.blocks+, (db.refsection* | db.refsect2*)) - | (db.refsection+ | db.refsect2+)) + ((db.all.blocks+, db.secondlevel.optional.refsection) + | db.secondlevel.required.refsection) } } diff --git a/docbook/relaxng/src/refsect1.rnc b/docbook/relaxng/src/refsect1.rnc index c4d3db28a..566d8d0f6 100644 --- a/docbook/relaxng/src/refsect1.rnc +++ b/docbook/relaxng/src/refsect1.rnc @@ -16,6 +16,12 @@ namespace s = "http://www.ascc.net/xml/schematron" namespace db = "http://docbook.org/docbook-ng" default namespace = "http://docbook.org/docbook-ng" +db.toplevel.optional.refsection |= db.refsect1* +db.toplevel.required.refsection |= db.refsect1+ + +db.secondlevel.optional.refsection |= db.refsect2* +db.secondlevel.required.refsection |= db.refsect2+ + # ====================================================================== [ @@ -37,7 +43,7 @@ div { db.refsect1.info = db._info.title.req - db.refsect1 |= + db.refsect1 = element refsect1 { db.refsect1.attlist, db.refsect1.info, @@ -50,7 +56,7 @@ div { [ db:refname [ "refsect2" ] - db:refpurpose [ "A subsection of a RefSect1" ] + db:refpurpose [ "A subsection of a " db:tag [ "refsect1" ] ] ] div { @@ -67,7 +73,7 @@ div { db.refsect2.info = db._info.title.req - db.refsect2 |= + db.refsect2 = element refsect2 { db.refsect2.attlist, db.refsect2.info, @@ -80,7 +86,7 @@ div { [ db:refname [ "refsect3" ] - db:refpurpose [ "A subsection of a RefSect2" ] + db:refpurpose [ "A subsection of a " db:tag [ "refsect2" ] ] ] div {