From: Norman Walsh Date: Sun, 7 Oct 2001 20:06:57 +0000 (+0000) Subject: Generate params from an xweb file X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d417e81ef0c7ae7ccef3e0f937b5e1ee532f397;p=docbook-dsssl Generate params from an xweb file --- diff --git a/xsl/html/.cvsignore b/xsl/html/.cvsignore index c7dc21b88..6c661d688 100644 --- a/xsl/html/.cvsignore +++ b/xsl/html/.cvsignore @@ -1 +1,4 @@ titlepage.templates.xsl +param.xsl +param.xml + diff --git a/xsl/html/Makefile b/xsl/html/Makefile index a9f41a4c5..e4e27e8d7 100644 --- a/xsl/html/Makefile +++ b/xsl/html/Makefile @@ -1,7 +1,20 @@ XSLT=../../cvstools/saxon XJPARSE=../../cvstools/xjparse -all: titlepage.templates.xsl +all: titlepage.templates.xsl param.xsl + +xml: param.xml + +html: param.html + +param.html: param.xml + $(XSLT) $< ../docsrc/lrefentry.xsl $@ + +param.xml: param.xweb + $(XSLT) $< ../../litprog/wdocbook.xsl $@ + +param.xsl: param.xweb + $(XSLT) $< ../../litprog/xtangle.xsl $@ titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl $(XSLT) $< ../template/titlepage.xsl $@ diff --git a/xsl/html/param.ent b/xsl/html/param.ent new file mode 100644 index 000000000..1c09c20d9 --- /dev/null +++ b/xsl/html/param.ent @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/html/param.xsl b/xsl/html/param.xsl deleted file mode 100644 index 3704d575c..000000000 --- a/xsl/html/param.xsl +++ /dev/null @@ -1,1265 +0,0 @@ - - - - - - - - -$Id$ - -Walsh -Norman -19992000 -Norman Walsh - - -HTML Parameter Reference - - -
Introduction - -This is technical reference documentation for the DocBook XSL -Stylesheets; it documents (some of) the parameters, templates, and -other elements of the stylesheets. - -This reference describes each of the HTML Stylesheet parameters. -These are the easily customizable parts of the stylesheet. -If you want to specify an alternate value for one or more of these -parameters, you can do so in a driver stylesheet. - -For example, if you want to change the html.stylesheet -to reference.css, you might create a driver -stylesheet like this: - - - - - - reference.css - -]]> - -Naturally, you have to change the -href attribute on -<xsl:import> -to point to docbook.xsl -on your system. (Or chunk.xsl, if you're using -chunking.) - -This is not intended to be user documentation. -It is provided for developers writing customization layers for the -stylesheets, and for anyone who's interested in how it -works. - -Although I am trying to be thorough, this documentation is known -to be incomplete. Don't forget to read the source, too :-) -
-
-
- - - - - -Is othername in author a -middle name? - -If true (non-zero), the othername of an author -appears between the firstname and -surname. Otherwise, othername -is suppressed. - - - - - - - - -Name of the stylesheet to use in the generated HTML - -The name of the stylesheet to place in the HTML LINK -tag, or the empty string to suppress the stylesheet LINK. - - - - - -text/css - - -The type of the stylesheet used in the generated HTML - -The type of the stylesheet to place in the HTML link tag. - - - - - - - - -An HTML base URI - -If html.base is set, it is used for the BASE -element in the HEAD of the HTML documents. -This is useful for dynamically served HTML where the base URI needs -to be shifted. - - - - - - - -The HTML anchor target for ULinks - -If ulink.target is set, its value will -be used for the target attribute -on anchors generated for ulinks. - - - - - - - -Output manvolnum as part of -refentry cross-reference? - -if true (non-zero), the manvolnum is used when cross-referencing -refentrys, either with xref -or citerefentry. - - - - - -1 - - -Display comment elements? - -If true (non-zero), comments will be displayed, otherwise they are suppressed. -Comments here refers to the comment element, -which will be renamed remark in DocBook V4.0, -not XML comments (<-- like this -->) which are unavailable. - - - - - -kr - - -What style of 'FuncSynopsis' should be generated? - -If funcsynopsis.style is ansi, -ANSI-style function synopses are generated for a -funcsynopsis, otherwise K&R-style -function synopses are generated. - - - - - - - - -Decorate elements of a FuncSynopsis? - -If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or -italic). The decoration is controlled by functions that can be redefined -in a customization layer. - - - - - -0 - - -Generate parens after a function? - -If not 0, the formatting of -a function element will include -generated parenthesis. - - - - - - - - -Output NAME header before 'RefName'(s)? - -If true (non-zero), a "NAME" section title is output before the list -of 'RefName's. - - - - - - - - -Use graphics in admonitions? - -If true (non-zero), admonitions are presented in an alternate style that uses -a graphic. Default graphics are provided in the distribution. - - - - - -images/ - - -Path to admonition graphics - -Sets the path, probably relative to the directory where the HTML -files are created, to the admonition graphics. - - - - - - - - -Extension for admonition graphics - -Sets the extension to use on admonition graphics. - - - - - - margin-left: 0.5in; margin-right: 0.5in; - - - -CSS style attributes for admonitions - -Specifies the value of the STYLE -attribute that should be added to admonitions. - - - - - - - - -Are sections enumerated? - -If true (non-zero), unlabeled sections will be enumerated. - - - - - - - - -Do section labels include the component label? - -If true (non-zero), section labels are prefixed with the label of the -component that contains them. - - - - - - - - - -Are chapters and appendixes enumerated? - -If true (non-zero), unlabeled chapters and appendixes will be enumerated. - - - - - - - - -Are prefaces enumerated? - -If true (non-zero), unlabeled prefaces will be enumerated. - - - - - - - - -Are parts and references enumerated? - -If true (non-zero), unlabeled parts and references will be enumerated. - - - - - - - - -Are divisions in QAndASets enumerated? - -If true (non-zero), unlabeled qandadivs will be enumerated. - - - - - - - - -Does enumeration of QandASet components inherit the numeration of parent elements? - -If true (non-zero), numbered QandADiv elements and Questions and Answers inherit -the numeration of the ancestors of the QandASet. - - - - - -number - - -Sets the default for defaultlabel on QandASet. - -If no defaultlabel attribute is specified on a QandASet, this -value is used. It must be one of the legal values for the defaultlabel -attribute. - - - - - -1 - - -Is a Table of Contents created for QandASets? - -If true (non-zero), a ToC is constructed for QandASets. - - - - - -0 - - -Is a Table of Contents created for QandADivs? - -If true (non-zero), a ToC is constructed for QandADivs. - - - - - -. - - -Text to separate bibliography entries - -Text to separate bibliography entries - - - - - -2 - - -How deep should recursive sections appear -in the TOC? - -Specifies the depth to which recursive sections should appear in the -TOC. - - - - - - - - -Will the output be chunked? - -In addition to providing chunking, the chunker can cleanup a -number of XML to HTML issues. If the chunker is not being used, the -stylesheets try to avoid producing results that will not appear properly -in browsers. - - - - - - - - -Should TOCs be genereated in components (Chapters, Appendixes, etc.)? - -If true (non-zero), they are. - - - - - - - -Should TOCs be genereated in divisions (Books, Parts, etc.)? - -If true (non-zero), they are. - - - - - - - - -Mailto URL for the LINK REL=made HTML HEAD element - -If not the empty string, this address will be used for the -REL=made LINK element in the HTML HEAD. - - - - - - - - -Default extension for graphic filenames - -If a graphic or mediaobject -includes a reference to a filename that does not include an extension, -and the format attribute is -unspecified, the default extension will be used. - - - - - -dl - - -Type of HTML list element to use for Tables of Contents - -When an automatically generated Table of Contents (or List of Titles) -is produced, this HTML element will be used to make the list. - - - - - - - - -Use the XPath id() function to find link targets? - -If 1, the stylesheets use the id() function -to find the targets of cross reference elements. This is more -efficient, but only works if your XSLT processor implements the -id() function, naturally. -THIS PARAMETER IS NOT SUPPORTED. IT IS ALWAYS ASSUMED TO BE 1. -SEE xref.xsl IF YOU NEED TO TURN IT OFF. - - - - - - - -Insert additional <p> elements for spacing? - -When non-zero, additional, empty paragraphs are inserted in -several contexts (for example, around informal figures), to create a -more pleasing visual appearance in many browsers. - - - - - -1 - - -Enable CSS decoration of elements - - -If css.decoration is turned on, then HTML elements -produced by the -stylesheet may be decorated with STYLE attributes. For example, the -LI tags produced for list items may include a fragment of CSS in the -STYLE attribute which sets the CSS property "list-style-type". - - - - - -0 - - -Enable decoration of elements that have a revisionflag - - -If show.revisionflag is turned on, then the stylesheets -may produce additional markup designed to allow a CSS stylesheet to -highlight elements that have specific revisionflag settings. - -The markup inserted will be usually be either a <span> or <div> -with an appropriate class attribute. (The value of -the class attribute will be the same as the value of the revisionflag -attribute). In some contexts, for example tables, where extra markup -would be structurally illegal, the class attribute will be added to the -appropriate container element. - -In general, the stylesheets only test for revisionflag in contexts -where an importing stylesheet would have to redefine whole templates. -Most of the revisionflag processing is expected to be done by another -stylesheet, for example changebars.xsl. - - - - -0 - - -Disable header and footer navigation - - -If suppress.navigation is turned on, header and -footer navigation will be suppressed. - - - - - - - -Specify the root element to format - -If rootid is specified, it must be the -value of an ID that occurs in the document being formatted. The entire -document will be loaded and parsed, but formatting will begin at the -element identified, rather than at the root. For example, this allows -you to process only chapter 4 of a book. -Because the entire document is available to the processor, automatic -numbering, cross references, and other dependencies are correctly -resolved. - - - - - - - -Present callout lists using a table? - -The default presentation of CalloutLists uses -an HTML DL. Some browsers don't align DLs very well -if callout.graphics are used. With this option -turned on, CalloutLists are presented in an HTML -TABLE, which usually results in better alignment -of the callout number with the callout description. - - - - - - - -Use graphics for callouts? - -If non-zero, callouts are presented with graphics (e.g., reverse-video -circled numbers instead of "(1)", "(2)", etc.). -Default graphics are provided in the distribution. - - - - - - - - -Extension for callout graphics - -Sets the extension to use on callout graphics. - - - - - - - -Path to callout graphics - -Sets the path, probably relative to the directory where the HTML -files are created, to the callout graphics. - - - - - - - - -Number of the largest callout graphic - -If callout.graphics -is non-zero, graphics are used to represent -callout numbers. The value of -callout.graphics.number.limit -is -the largest number for which a graphic exists. If the callout number -exceeds this limit, the default presentation "(nnn)" will always -be used. - - - - - - - - -Enable extensions - -If non-zero, extensions may be used. Each extension is -further controlled by its own parameter. But if -use.extensions is zero, no extensions will -be used. - - - - - - - - -Enable the textinsert extension element - -The textinsert extension element inserts the contents of a -a file into the result tree (as text). - - - - - - - - -Enable the line numbering extension - -If true, verbatim environments (elements that have the -format='linespecific' notation attribute: address, literallayout, -programlisting, screen, synopsis) that specify line numbering will -have, surprise, line numbers. - - - - - - - - -Enable the line numbering extension - -If true, verbatim environments (elements that have the -format='linespecific' notation attribute: address, literallayout, -programlisting, screen, synopsis) that specify line numbering will -have, surprise, line numbers. - - - - - - - - -Indicate which lines should be numbered - -If line numbering is enabled, everyNth line will be numbered. - - - - - - - - -Indicates the width of line numbers - -If line numbering is enabled, line numbers will appear right -justified in a field "width" characters wide. - - - - - - - - -Specify a separator between line numbers and lines - -The separator is inserted between line numbers and lines in -the verbatim environment. - - - - - - - - -Enable the callout extension - -The callouts extension processes areaset -elements in ProgramListingCO and other text-based -callout elements. - - - - - - - - -Enable the callout extension - -The callouts extension processes areaset -elements in ProgramListingCO and other text-based -callout elements. - - - - - - - - -Indicates what column callouts appear in by default - -If a callout does not identify a column (for example, if it uses -the linerange unit), -it will appear in the default column. - - - - - - - - -Identifies the output format of this stylesheet - -The Saxon extension functions need to know if the output format -is HTML ('html') or XSL Formatting Objects ('fo'). This variable answers -that question. Valid settings are 'html' or 'fo'. - - - - - - - -The (absolute) nominal width of tables - -In order to convert CALS column widths into HTML column widths, it -is sometimes necessary to have an absolute table width to use for conversion -of mixed absolute and relative widths. This value must be an absolute -length (not a percentag). - - - - - - - -The default width of tables - -If specified, this value will be used for the WIDTH attribute on -tables that do not specify an alternate width (with the dbhtml processing -instruction). - - - - - - - -Enable the table columns extension function - -The table columns extension function adjusts the widths of table -columns in the HTML result to more accurately reflect the specifications -in the CALS table. - - - - - - - - -Enable the table columns extension function - -The table columns extension function adjusts the widths of table -columns in the HTML result to more accurately reflect the specifications -in the CALS table. - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -Generate TOCs inside Sections? - -If non-zero, a Table of Contents will be generated inside section -elements. Note that -generate.section.toc.level -may suppress some section TOCs. - - - - - - - - -Control depth of TOC generation in sections - -The generate.section.toc.level parameter -controls the depth of section in which TOCs will be generated. Note -that this is related to, but not the same as -toc.section.depth, which controls the depth to -which TOC entries will be generated in a given TOC. -If, for example, generate.section.toc.level -is 3, TOCs will be generated in first, second, and third -level sections, but not in fourth level sections. - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -Should bridgehead elements appear in the TOC? - -If non-zero, bridgeheads appear in the TOC. Note that this option -is not fully supported and may be removed in a future version of the -stylesheets. - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -FIXME: - -FIXME: - - - - - - - - -First Unicode character to use, decimal value. - -If callout.graphics -is non-zero, graphics are used to represent -callout numbers. The value of -callout.graphics.number.limit -is -the largest number for which a graphic exists. If the callout number -exceeds this limit, the default presentation "(nnn)" will always -be used. - - - - - - - - -Number of the largest callout graphic - -If callout.graphics -is non-zero, graphics are used to represent -callout numbers. The value of -callout.graphics.number.limit -is -the largest number for which a graphic exists. If the callout number -exceeds this limit, the default presentation "(nnn)" will always -be used. - - - - - - - - -Font to use for Unicode dingbats - -The name of the font to specify around Unicode callout glyphs. -If set to the empty string, no font change will occur. - - - - - - - - -Use ID value of chunk elements as the filename? - -If use.id.as.filename -is non-zero, the filename of chunk elements that have IDs will be -derived from the ID value. - - - - - - - - -Inherit keywords from ancestor elements? - -If inherit.keywords -is non-zero, the keyword META for each HTML -HEAD element will include all of the keywords from -ancestral elements. Otherwise, only the keywords from the current section -will be used. - - - - - - - - -Renumber chapters in each part? - -If label.from.part is non-zero, components -(chapters, appendixes, etc.) -will be numbered from 1 in each part. Otherwise, -they will be numbered monotonically throughout each -book. - - - - - - - - -Generate URL links when cross-referencing RefEntrys? - -If true, a web link will be generated, presumably -to an online man->HTML gateway. The text of the link is -generated by the generate.citerefentry.link template. - - - - - - - - -Selects formal or informal procedures - -Formal procedures are numbered and always hav a title. - - - - - - - - -Name of the bibliography collection file - -Tired of copying bibliography entries from one document to another? -Now you can maintain a central bibliography and let the stylesheets do -the copying for you. This parameter identifies the file (by URI reference) -that contains your complete bibliography collection. - - - - - - - - -Annotate the Table of Contents? - -If true, TOCs will be annotated. At present, this just means -that the RefPurpose of RefEntry -TOC entries will be displayed. - - - - - - - - -Pass emphasis role attribute through to HTML? - -If true, the role attribute of emphasis elements -will be passed through to the HTML as a class attribute on a -span that surrounds the emphasis. - - - - - - - -Pass phrase role attribute through to HTML? - -If true, the role attribute of phrase elements -will be passed through to the HTML as a class attribute on a -span that surrounds the phrase. - - - - - - - -Characters that count as punctuation on a run-in-head - -FIXME: - - - - - - - - -Default punctuation character on a run-in-head - -FIXME: - - - - - - - - - - - - - - - - - - - - 0 - #E0E0E0 - - - - - - -Collate copyright years into ranges? - -If non-zero, copyright years will be collated into ranges. - - - - - - - -Print single-year ranges (e.g., 1998-1999) - -If non-zero, year ranges that span a single year will be printed -in range notation (1998-1999) instead of discrete notation -(1998, 1999). - - - -
diff --git a/xsl/html/param.xweb b/xsl/html/param.xweb new file mode 100644 index 000000000..9fa275a99 --- /dev/null +++ b/xsl/html/param.xweb @@ -0,0 +1,354 @@ + +%param.ent; +]> + + +HTML Parameter Reference + +$Id$ + + + Walsh + Norman + + + 1999 + 2000 + 2001 + Norman Walsh + + + +Introduction + +This is technical reference documentation for the DocBook XSL +Stylesheets; it documents (some of) the parameters, templates, and +other elements of the stylesheets. + +This reference describes each of the HTML Stylesheet parameters. +These are the easily customizable parts of the stylesheet. +If you want to specify an alternate value for one or more of these +parameters, you can do so in a driver stylesheet. + +For example, if you want to change the html.stylesheet +to reference.css, you might create a driver +stylesheet like this: + + + + + + reference.css + +]]> + +Naturally, you have to change the +href attribute on +<xsl:import> to point to +docbook.xsl on your system. (Or +chunk.xsl, if you're using chunking.) + +This is not intended to be user documentation. +It is provided for developers writing customization layers for the +stylesheets, and for anyone who's interested in how it +works. + +Although I am trying to be thorough, this documentation is known +to be incomplete. Don't forget to read the source, too :-) + + +Admonitions +&admon.graphics.extension; +&admon.graphics.path; +&admon.graphics; +&admon.style; + + +Callouts +&callout.defaultcolumn; +&callout.graphics.extension; +&callout.graphics.number.limit; +&callout.graphics.path; +&callout.graphics; +&callout.list.table; +&callout.unicode.font; +&callout.unicode.number.limit; +&callout.unicode.start.character; +&callout.unicode; +&callouts.extension; + + +EBNF +&ebnf.table.bgcolor; +&ebnf.table.border; + + +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; + + +Extensions +&saxon.callouts; +&saxon.linenumbering; +&saxon.tablecolumns; +&linenumbering.everyNth; +&linenumbering.extension; +&linenumbering.separator; +&linenumbering.width; +&tablecolumns.extension; +&textinsert.extension; +&use.extensions; + + +Automatic labelling +&chapter.autolabel; +&appendix.autolabel; +&part.autolabel; +&preface.autolabel; +&qandadiv.autolabel; +§ion.autolabel; +§ion.label.includes.component.label; +&label.from.part; + + + + +HTML +&html.base; +&html.stylesheet.type; +&html.stylesheet; +&use.id.as.filename; +&using.chunker; +&css.decoration; +&spacing.paras; +&emphasis.propagates.style; +&phrase.propagates.style; +&stylesheet.result.type; + + +XSLT Processing +&use.id.function; +&rootid; +&suppress.navigation; + + +Meta/*Info +&inherit.keywords; +&make.single.year.ranges; +&make.year.ranges; +&author.othername.in.middle; + + +Reference Pages +&funcsynopsis.decoration; +&funcsynopsis.style; +&function.parens; +&refentry.generate.name; +&refentry.xref.manvolnum; +&citerefentry.link; +&refentry.separator; + + +Tables +&default.table.width; +&nominal.table.width; + + +QAndASet +&qanda.defaultlabel; +&qanda.inherit.numeration; + + +Linking +&link.mailto.url; +&ulink.target; +&olink.fragid; +&olink.outline.ext; +&olink.pubid; +&olink.sysid; +&olink.resolver; + + +Bibliography +&biblioentry.item.separator; +&bibliography.collection; + + +Miscellaneous +&graphic.default.extension; +&formal.procedures; +&runinhead.default.title.end.punct; +&runinhead.title.end.punct; +&show.comments; +&show.revisionflag; +&shade.verbatim; +&shade.verbatim.style; + + +Chunking +&html.ext; +&root.filename; +&base.dir; +&chunk.sections; +&chunk.first.sections; +&saxon.character.representation; +&default.encoding; +&chunk.datafile; + + +The Stylesheet + +The param.xsl stylesheet is just a wrapper +around all these parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +