From: Norman Walsh Date: Mon, 18 Mar 2002 13:39:43 +0000 (+0000) Subject: Replace generate.*.toc and generate.*.lot with single generate.toc parameter. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=896a56868a1e4f8cbb9202678d0d78a3d2f4c3de;p=docbook-dsssl Replace generate.*.toc and generate.*.lot with single generate.toc parameter. --- diff --git a/xsl/common/common.xsl b/xsl/common/common.xsl index 9b13713aa..04b869b70 100644 --- a/xsl/common/common.xsl +++ b/xsl/common/common.xsl @@ -1353,5 +1353,47 @@ year range is 1991-1992 but discretely it's + + + +Search in a table for the "best" match for the node + + +This template searches in a table for the value that most-closely +(in the typical best-match sense of XSLT) matches the current (element) +node location. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/fo/Makefile b/xsl/fo/Makefile index 8b8952cdc..ed0b68418 100644 --- a/xsl/fo/Makefile +++ b/xsl/fo/Makefile @@ -1,21 +1,29 @@ XSLT=../../cvstools/saxon XJPARSE=../../cvstools/xjparse +PARAMPROF=.param.profiled +PARAMSTRIP=.param.stripped + include Makefile.param all: titlepage.templates.xsl param.xsl profile-docbook.xsl param.html: param.xml - ../../cvstools/paramchk -m Makefile.param $< $(XSLT) $< ../docsrc/lrefentry.xsl $@ param.xml: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../../litprog/wdocbook.xsl $@ + $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo + $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition + $(XSLT) $(PARAMSTRIP) ../../litprog/wdocbook.xsl $@ + $(RM) $(PARAMPROF) $(PARAMSTRIP) param.xsl: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../../litprog/xtangle.xsl $@ + $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo + $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ + $(RM) $(PARAMPROF) $(PARAMSTRIP) titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl $(XSLT) $< ../template/titlepage.xsl $@ @@ -25,3 +33,10 @@ Makefile.param: profile-docbook.xsl: $(XSLT) docbook.xsl ../profiling/xsl2profile.xsl $@ + +clean: + $(RM) param.xml param.html param.xsl \ + profile-docbook.xsl \ + titlepage.templates.xsl + $(RM) Makefile.param + echo "# foo" > Makefile.param diff --git a/xsl/fo/component.xsl b/xsl/fo/component.xsl index 281415016..cac8a4a28 100644 --- a/xsl/fo/component.xsl +++ b/xsl/fo/component.xsl @@ -177,9 +177,16 @@ - + + + + + + + + @@ -224,7 +231,13 @@ - + + + + + + + @@ -265,7 +278,13 @@ - + + + + + + + @@ -373,7 +392,13 @@ - + + + + + + + diff --git a/xsl/fo/division.xsl b/xsl/fo/division.xsl index 8817c4bca..2512818d6 100644 --- a/xsl/fo/division.xsl +++ b/xsl/fo/division.xsl @@ -77,7 +77,12 @@ - + + + + + + @@ -148,7 +153,12 @@ - + + + + + + @@ -171,7 +181,7 @@ - + @@ -197,7 +207,7 @@ - + @@ -223,7 +233,7 @@ - + @@ -249,7 +259,7 @@ - + diff --git a/xsl/fo/fop.xsl b/xsl/fo/fop.xsl index 59fd23521..1cebdd3ed 100644 --- a/xsl/fo/fop.xsl +++ b/xsl/fo/fop.xsl @@ -56,8 +56,13 @@ translates characters with code>255 back to ASCII. - + + + + + + + diff --git a/xsl/fo/param.ent b/xsl/fo/param.ent index cb91ce2f7..ac7f23933 100644 --- a/xsl/fo/param.ent +++ b/xsl/fo/param.ent @@ -45,19 +45,8 @@ - - - - - - - - - - - - + diff --git a/xsl/fo/param.xweb b/xsl/fo/param.xweb index d93d484a4..2a9144cef 100644 --- a/xsl/fo/param.xweb +++ b/xsl/fo/param.xweb @@ -85,22 +85,19 @@ to be incomplete. Don't forget to read the source, too :-) &autotoc.label.separator; &process.empty.source.toc; &process.source.toc; -&generate.book.equation.lot; -&generate.book.example.lot; -&generate.book.figure.lot; -&generate.book.table.lot; -&generate.book.toc; -&generate.set.toc; -&generate.component.toc; -&generate.division.equation.lot; -&generate.division.example.lot; -&generate.division.figure.lot; -&generate.division.table.lot; -&generate.division.toc; +&generate.toc; &generate.index; &toc.section.depth; &toc.indent.width; &toc.margin.properties; + + + Processor Extensions @@ -416,19 +413,8 @@ around all these parameters. - - - - - - - - - - - - + diff --git a/xsl/fo/xep.xsl b/xsl/fo/xep.xsl index 4bcb6eebe..391bbff7a 100644 --- a/xsl/fo/xep.xsl +++ b/xsl/fo/xep.xsl @@ -90,8 +90,13 @@ - + + + + + + + diff --git a/xsl/html/Makefile b/xsl/html/Makefile index 1f8b4a005..cb7d7310f 100644 --- a/xsl/html/Makefile +++ b/xsl/html/Makefile @@ -1,6 +1,9 @@ XSLT=../../cvstools/saxon XJPARSE=../../cvstools/xjparse +PARAMPROF=.param.profiled +PARAMSTRIP=.param.stripped + include Makefile.param all: titlepage.templates.xsl param.xsl \ @@ -10,17 +13,22 @@ xml: param.xml html: param.html -param.html: param.xml - ../../cvstools/paramchk -m Makefile.param $< +param.html: param.xml titlepage.templates.xsl $(XSLT) $< ../docsrc/lrefentry.xsl $@ param.xml: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../../litprog/wdocbook.xsl $@ + $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html + $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition + $(XSLT) $(PARAMSTRIP) ../../litprog/wdocbook.xsl $@ + $(RM) $(PARAMPROF) $(PARAMSTRIP) param.xsl: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../../litprog/xtangle.xsl $@ + $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html + $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ + $(RM) $(PARAMPROF) $(PARAMSTRIP) titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl $(XSLT) $< ../template/titlepage.xsl $@ @@ -37,3 +45,10 @@ profile-chunk.xsl: profile-onechunk.xsl: $(XSLT) onechunk.xsl ../profiling/xsl2profile.xsl $@ + +clean: + $(RM) param.xml param.html param.xsl \ + profile-docbook.xsl profile-chunk.xsl profile-onechunk.xsl \ + titlepage.templates.xsl + $(RM) Makefile.param + echo "# foo" > Makefile.param diff --git a/xsl/html/autotoc.xsl b/xsl/html/autotoc.xsl index 08d54eb49..9f48ec52d 100644 --- a/xsl/html/autotoc.xsl +++ b/xsl/html/autotoc.xsl @@ -80,101 +80,97 @@ - - -

- - - TableofContents - - -

-
+ +

+ + + TableofContents + + +

+
- - - - - - - - -
- - - - - - -
-
-
- - - -
- - - - -
-
-
-
-
+ + + + + + + + +
+ + + + + + +
+
+
+ + + +
+ + + + +
+
+
+
- - -

- - - TableofContents - - -

-
+ +

+ + + TableofContents + + +

+
- - - - - - - - -
- - - - - - -
-
-
- - - -
- - - - -
-
-
-
-
+ + + + + + + + +
+ + + + + + +
+
+
+ + + +
+ + + + +
+
+
+
@@ -455,5 +451,54 @@
+ + + + + + + +
+

+ + + + + ListofTables + ListofFigures + ListofEquations + ListofExamples + ListofUnknowns + + + + +

+ + + + +
+
+
+ + + + + + + + + + + + + + + + + + + diff --git a/xsl/html/component.xsl b/xsl/html/component.xsl index a7ca1a413..107b2f23e 100644 --- a/xsl/html/component.xsl +++ b/xsl/html/component.xsl @@ -110,7 +110,14 @@ - + + + + + + + + @@ -150,7 +157,13 @@ - + + + + + + + @@ -190,7 +203,13 @@ - + + + + + + + @@ -316,7 +335,13 @@ - + + + + + + + diff --git a/xsl/html/division.xsl b/xsl/html/division.xsl index a648ad9fa..6e5270e25 100644 --- a/xsl/html/division.xsl +++ b/xsl/html/division.xsl @@ -23,7 +23,13 @@ - + + + + + + + @@ -47,9 +53,45 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -70,7 +112,13 @@ - + + + + + + + @@ -101,7 +149,14 @@ - + + + + + + + + diff --git a/xsl/html/param.ent b/xsl/html/param.ent index 719fb0579..52d30ffb3 100644 --- a/xsl/html/param.ent +++ b/xsl/html/param.ent @@ -40,23 +40,11 @@ - - - - - - - - - - - - - + diff --git a/xsl/html/param.xweb b/xsl/html/param.xweb index 9af05df07..cf16198a4 100644 --- a/xsl/html/param.xweb +++ b/xsl/html/param.xweb @@ -88,27 +88,15 @@ to be incomplete. Don't forget to read the source, too :-) ToC/LoT/Index Generation &annotate.toc; &autotoc.label.separator; -&generate.appendix.toc; -&generate.article.toc; -&generate.book.toc; -&generate.chapter.toc; -&generate.component.toc; -&generate.division.toc; -&generate.part.toc; -&generate.preface.toc; -&generate.qandadiv.toc; -&generate.qandaset.toc; -&generate.reference.toc; -&generate.section.toc; -&generate.set.toc; -&generate.section.toc.level; -&generate.index; -&toc.list.type; -&toc.section.depth; &process.source.toc; &process.empty.source.toc; &bridgehead.in.toc; &manual.toc; +&toc.list.type; +&toc.section.depth; +&generate.toc; +&generate.section.toc.level; +&generate.index; Extensions @@ -357,23 +345,11 @@ around all these parameters. - - - - - - - - - - - - - + diff --git a/xsl/html/qandaset.xsl b/xsl/html/qandaset.xsl index e46d1ef84..792c39194 100644 --- a/xsl/html/qandaset.xsl +++ b/xsl/html/qandaset.xsl @@ -62,9 +62,15 @@ + + + + + +
- + @@ -132,7 +138,13 @@ - + + + + + + + diff --git a/xsl/html/refentry.xsl b/xsl/html/refentry.xsl index 6ef6700e3..9c2b9ee40 100644 --- a/xsl/html/refentry.xsl +++ b/xsl/html/refentry.xsl @@ -20,7 +20,14 @@ - + + + + + + + + diff --git a/xsl/html/sections.xsl b/xsl/html/sections.xsl index 3cbfbc8cf..d4f384e47 100644 --- a/xsl/html/sections.xsl +++ b/xsl/html/sections.xsl @@ -19,7 +19,14 @@
- + + + + + + @@ -63,7 +70,14 @@
- + + + + + + @@ -80,7 +94,14 @@
- + + + + + + @@ -96,7 +117,14 @@
- + + + + + + @@ -112,7 +140,14 @@
- + + + + + + @@ -128,7 +163,14 @@
- + + + + + + diff --git a/xsl/lib/lib.xsl b/xsl/lib/lib.xsl index 1dfbeba19..6b873fcf3 100644 --- a/xsl/lib/lib.xsl +++ b/xsl/lib/lib.xsl @@ -322,4 +322,78 @@ for example), the template may silently return erroneous results. + + + +Retrieve the value associated with a particular key in a table + +Given a table of space-delimited key/value pairs, +the lookup.key template extracts the value associated +with a particular key. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Calculate the XPath child-sequence to the current node + +The xpath.location template calculates the +absolute path from the root of the tree to the current element node. + + + + + + + + + + + / + + + + + + + + + + + + / + + + + + diff --git a/xsl/params/generate.appendix.toc.xml b/xsl/params/generate.appendix.toc.xml deleted file mode 100644 index b0bf21f4e..000000000 --- a/xsl/params/generate.appendix.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.appendix.toc -boolean - - -generate.appendix.toc -Specify if a table of contents is required for an appendix - - - - - - -Description - -Specify whether you want a table of contents in each appendix. - - - diff --git a/xsl/params/generate.article.toc.xml b/xsl/params/generate.article.toc.xml deleted file mode 100644 index a93d8f7a3..000000000 --- a/xsl/params/generate.article.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.article.toc -boolean - - -generate.article.toc -Specify if a toc is wanted for an article. - - - - - - -Description - -Specify whether a table of contents is required for an article. - - - diff --git a/xsl/params/generate.book.equation.lot.xml b/xsl/params/generate.book.equation.lot.xml deleted file mode 100644 index 6f8a831b5..000000000 --- a/xsl/params/generate.book.equation.lot.xml +++ /dev/null @@ -1,18 +0,0 @@ - - -generate.book.equation.lot -boolean - - -generate.book.equation.lot -Should a lot be generated for equations? - - - - - - -Description -Specify if list of equations, like a table of contents, is required. - - diff --git a/xsl/params/generate.book.example.lot.xml b/xsl/params/generate.book.example.lot.xml deleted file mode 100644 index f2d152959..000000000 --- a/xsl/params/generate.book.example.lot.xml +++ /dev/null @@ -1,18 +0,0 @@ - - -generate.book.example.lot -boolean - - -generate.book.example.lot -Is a list of equations required? - - - - - - -Description -Specify if a list of examples is required, similar to a table of contents but for examples. - - diff --git a/xsl/params/generate.book.figure.lot.xml b/xsl/params/generate.book.figure.lot.xml deleted file mode 100644 index fb664dec6..000000000 --- a/xsl/params/generate.book.figure.lot.xml +++ /dev/null @@ -1,18 +0,0 @@ - - -generate.book.figure.lot -boolean - - -generate.book.figure.lot -Is a list of figures required for book? - - - - - - -Description -Specify if a list of figures is required, similar to a table of contents but for figures. - - diff --git a/xsl/params/generate.book.table.lot.xml b/xsl/params/generate.book.table.lot.xml deleted file mode 100644 index 515f2f5ca..000000000 --- a/xsl/params/generate.book.table.lot.xml +++ /dev/null @@ -1,18 +0,0 @@ - - -generate.book.table.lot -boolean - - -generate.book.table.lot -Do you want a list of tables in a book? - - - - - - -Description -Specify if a list of tables is required, similar to a table of contents, but for all the tables in the book - - diff --git a/xsl/params/generate.book.toc.xml b/xsl/params/generate.book.toc.xml deleted file mode 100644 index 791c2be05..000000000 --- a/xsl/params/generate.book.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.book.toc -boolean - - -generate.book.toc -Do you want a table of contents in the book? - - - - - - -Description - -Specify if a table of contents is required in the book. - - - diff --git a/xsl/params/generate.chapter.toc.xml b/xsl/params/generate.chapter.toc.xml deleted file mode 100644 index 84c9a3b6b..000000000 --- a/xsl/params/generate.chapter.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.chapter.toc -boolean - - -generate.chapter.toc -Do you want a table of contents for chapters? - - - - - - -Description - -Specify if a table of contents should be generated for each chapter. - - - diff --git a/xsl/params/generate.component.toc.xml b/xsl/params/generate.component.toc.xml deleted file mode 100644 index 6b9d05660..000000000 --- a/xsl/params/generate.component.toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.component.toc -boolean - - -generate.component.toc -Should TOCs be genereated in components (Chapters, Appendixes, etc.)? - - - - - - -Description - -If true (non-zero), they are. - - - - diff --git a/xsl/params/generate.division.equation.lot.xml b/xsl/params/generate.division.equation.lot.xml deleted file mode 100644 index 9ef8f6f3b..000000000 --- a/xsl/params/generate.division.equation.lot.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.division.equation.lot -boolean - - -generate.division.equation.lot -Generate a list of titles for Equations? - - - - - - -Description - -If non-zero, a list of titles is generated for Equations. - - - - diff --git a/xsl/params/generate.division.example.lot.xml b/xsl/params/generate.division.example.lot.xml deleted file mode 100644 index 88e59984a..000000000 --- a/xsl/params/generate.division.example.lot.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.division.example.lot -boolean - - -generate.division.example.lot -Generate a list of titles for Examples? - - - - - - -Description - -If non-zero, a list of titles is generated for Examples. - - - - diff --git a/xsl/params/generate.division.figure.lot.xml b/xsl/params/generate.division.figure.lot.xml deleted file mode 100644 index 267119643..000000000 --- a/xsl/params/generate.division.figure.lot.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.division.figure.lot -boolean - - -generate.division.figure.lot -Generate a list of titles for Figures? - - - - - - -Description - -If non-zero, a list of titles is generated for Figures. - - - - diff --git a/xsl/params/generate.division.table.lot.xml b/xsl/params/generate.division.table.lot.xml deleted file mode 100644 index dbfe5537a..000000000 --- a/xsl/params/generate.division.table.lot.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.division.table.lot -boolean - - -generate.division.table.lot -Generate a list of titles for Tables? - - - - - - -Description - -If non-zero, a list of titles is generated for Tables. - - - - diff --git a/xsl/params/generate.division.toc.xml b/xsl/params/generate.division.toc.xml deleted file mode 100644 index 477bfd130..000000000 --- a/xsl/params/generate.division.toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.division.toc -boolean - - -generate.division.toc -Should TOCs be genereated in divisions (Books, Parts, etc.)? - - - - - - -Description - -If true (non-zero), they are. - - - - diff --git a/xsl/params/generate.part.toc.xml b/xsl/params/generate.part.toc.xml deleted file mode 100644 index b223cbf1e..000000000 --- a/xsl/params/generate.part.toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.part.toc -boolean - - -generate.part.toc -Do you want an index for each part? - - - - - - -Description - -Specify if an index should be generated for each part. - - - - diff --git a/xsl/params/generate.preface.toc.xml b/xsl/params/generate.preface.toc.xml deleted file mode 100644 index e8c97702a..000000000 --- a/xsl/params/generate.preface.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.preface.toc -boolean - - -generate.preface.toc -Do you want a table of contents for the preface? - - - - - - -Description - -Specify if a table of contents should be generated for the preface - - - diff --git a/xsl/params/generate.qandadiv.toc.xml b/xsl/params/generate.qandadiv.toc.xml deleted file mode 100644 index d4c4403a3..000000000 --- a/xsl/params/generate.qandadiv.toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.qandadiv.toc -boolean - - -generate.qandadiv.toc -Is a Table of Contents created for QandADivs? - - - -0 - - -Description - -If true (non-zero), a ToC is constructed for QandADivs. - - - - diff --git a/xsl/params/generate.qandaset.toc.xml b/xsl/params/generate.qandaset.toc.xml deleted file mode 100644 index 6e6bd65e3..000000000 --- a/xsl/params/generate.qandaset.toc.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -generate.qandaset.toc -boolean - - -generate.qandaset.toc -Is a Table of Contents created for QandASets? - - - -1 - - -Description - -If true (non-zero), a ToC is constructed for QandASets. - - - - diff --git a/xsl/params/generate.reference.toc.xml b/xsl/params/generate.reference.toc.xml deleted file mode 100644 index 36cc0309d..000000000 --- a/xsl/params/generate.reference.toc.xml +++ /dev/null @@ -1,22 +0,0 @@ - - -generate.reference.toc -boolean - - -generate.reference.toc -Do you want a list of references? - - - - - - -Description - -Specify if a list of references should be generated, similar to -a table of contents, but for all reference elements. - - - - diff --git a/xsl/params/generate.section.toc.xml b/xsl/params/generate.section.toc.xml deleted file mode 100644 index ad74b1e6d..000000000 --- a/xsl/params/generate.section.toc.xml +++ /dev/null @@ -1,24 +0,0 @@ - - -generate.section.toc -boolean - - -generate.section.toc -Generate TOCs inside Sections? - - - - - - -Description - -If non-zero, a Table of Contents will be generated inside section -elements. Note that -generate.section.toc.level -may suppress some section TOCs. - - - - diff --git a/xsl/params/generate.set.toc.xml b/xsl/params/generate.set.toc.xml deleted file mode 100644 index e47c9dadb..000000000 --- a/xsl/params/generate.set.toc.xml +++ /dev/null @@ -1,20 +0,0 @@ - - -generate.set.toc -boolean - - -generate.set.toc -Do you want a table of contents in each set? - - - - - - -Description - -Specify if a table of contents is required in each set. - - - diff --git a/xsl/params/generate.toc.xml b/xsl/params/generate.toc.xml new file mode 100644 index 000000000..06d5bfeb6 --- /dev/null +++ b/xsl/params/generate.toc.xml @@ -0,0 +1,78 @@ + + +generate.toc +table + + +generate.toc +Control generation of ToCs and LoTs + + + + + +appendix toc +article toc +book toc,figure,table,example,equation +chapter toc +part toc +preface toc +qandadiv toc +qandaset toc +reference toc +section toc +set toc + + +/appendix toc +/article toc +book toc,figure,table,example,equation +/chapter toc +part toc +/preface toc +qandadiv toc +qandaset toc +reference toc +/section toc +set toc + + + + +Description + +This parameter has a structured value. It is a table of space-delimited +path/value pairs. Each path identifies some element in the source document +using a restricted subset of XPath (only the implicit child axis, no wildcards, +no predicates). Paths can be either relative or absolute. + +When a particular element, the stylesheets consult this table to +determine if a ToC (or LoT(s)) should be generated. + +For example, consider the entry: + +book toc,figure + +This indicates that whenever a book is formatted, a +Table Of Contents and a List of Figures should be generated. Similarly, + +/chapter toc + +indicates that whenever a document that has a root +of chapter is formatted, a Table of +Contents should be generated. The entry chapter would match +all chapters, but /chapter matches only chapter +document elements. + +Generally, the longest match wins. So, for example, if you want to distinguish +articles in books from articles in parts, you could use these two entries: + +book/article toc,figure +part/article toc + +Note that an article in a part can never match a book/article, +so if you want nothing to be generated for articles in parts, you can simply leave +that rule out. + + +