From: <xm...@us...> - 2006-09-13 08:51:31
|
Revision: 6294 http://svn.sourceforge.net/docbook/?rev=6294&view=rev Author: xmldoc Date: 2006-09-13 01:51:12 -0700 (Wed, 13 Sep 2006) Log Message: ----------- Use index.html files as targets (instead of zero-byte param.html stamp files we were using); quit doing $(RM) *.html in clean and instead do clean using a list of the HTML files that we know we have actually generated. Also add pi directory to list of directory to recurse and make (had been accidentally left out for 1.71.0 build). Modified Paths: -------------- trunk/xsl/doc/Makefile trunk/xsl/doc/Makefile.incl trunk/xsl/doc/fo/Makefile trunk/xsl/doc/html/Makefile trunk/xsl/doc/manpages/Makefile trunk/xsl/doc/pi/Makefile trunk/xsl/doc/slides/Makefile trunk/xsl/doc/website/Makefile trunk/xsl/doc/wordml/Makefile Added Paths: ----------- trunk/xsl/tools/xsl/build/docparam2txt.xsl Modified: trunk/xsl/doc/Makefile =================================================================== --- trunk/xsl/doc/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -16,7 +16,7 @@ VPATH=../docsrc -DIRS=common refentry lib html fo manpages wordml slides website template +DIRS=common refentry lib html fo manpages wordml slides website template pi # build reference.pdf.gz except for snapshot releases ifneq (snapshot,$(findstring snapshot,$(RELVER))) @@ -68,14 +68,18 @@ cat $< | $(GZIP) $(GZIPFLAGS) > $@ clean: - $(RM) *.html for i in $(DIRS) __bogus__; do \ if [ $$i != __bogus__ ] ; then \ echo "$(MAKE) -C $$i clean"; $(MAKE) -C $$i clean; \ fi \ done + $(RM) copyright.html + $(RM) index.html + $(RM) reference.html + $(RM) warranty.html $(RM) reference.fo $(RM) reference.pdf $(RM) reference.txt + $(RM) reference.txt.html $(RM) reference.pdf.gz $(RM) reference.txt.gz Modified: trunk/xsl/doc/Makefile.incl =================================================================== --- trunk/xsl/doc/Makefile.incl 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/Makefile.incl 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,14 +1,17 @@ # Makefile.incl gets included by makefiles in all subdirs +PARAMFILES = $(shell if [ -f $(VPATH)/docparam.xml ]; then $(XSLT) $(VPATH)/docparam.xml $(DOCPARAM2TXT); fi) + all: $(HTMLFILES) %.html : %.xml $(JREFHTML) $(XSLT) $< $(JREFHTML) $@ $(XSLTOPT) -param.html: docparam.xml +index.html: docparam.xml $(XSLT) $< $(CLREFENTRY) $(XSLTOPT) - touch param.html clean: $(RM) $(HTMLFILES) - $(RM) *.html +ifneq ($(PARAMFILES),) + $(RM) $(PARAMFILES) +endif Modified: trunk/xsl/doc/fo/Makefile =================================================================== --- trunk/xsl/doc/fo/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/fo/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/fo -HTMLFILES = param.html table.html +HTMLFILES = index.html table.html include ../Makefile.incl Modified: trunk/xsl/doc/html/Makefile =================================================================== --- trunk/xsl/doc/html/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/html/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/html -HTMLFILES = param.html +HTMLFILES = index.html include ../Makefile.incl Modified: trunk/xsl/doc/manpages/Makefile =================================================================== --- trunk/xsl/doc/manpages/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/manpages/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/manpages -HTMLFILES = param.html +HTMLFILES = index.html include ../Makefile.incl Modified: trunk/xsl/doc/pi/Makefile =================================================================== --- trunk/xsl/doc/pi/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/pi/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,8 +1,7 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/pi -HTMLFILES = pi.html +HTMLFILES = common.html include ../Makefile.incl -pi.html: pi.xml +common.html: pi.xml $(XSLT) $< $(PIREFENTRY) $(XSLTOPT) - touch $@ Modified: trunk/xsl/doc/slides/Makefile =================================================================== --- trunk/xsl/doc/slides/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/slides/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/slides/ -HTMLFILES = param.html +HTMLFILES = index.html include ../Makefile.incl Modified: trunk/xsl/doc/website/Makefile =================================================================== --- trunk/xsl/doc/website/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/website/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/website -HTMLFILES = param.html +HTMLFILES = index.html include ../Makefile.incl Modified: trunk/xsl/doc/wordml/Makefile =================================================================== --- trunk/xsl/doc/wordml/Makefile 2006-09-13 07:20:08 UTC (rev 6293) +++ trunk/xsl/doc/wordml/Makefile 2006-09-13 08:51:12 UTC (rev 6294) @@ -1,4 +1,4 @@ include ../../../releasetools/Variables.mk VPATH=../../docsrc/wordml -HTMLFILES = param.html +HTMLFILES = index.html include ../Makefile.incl Added: trunk/xsl/tools/xsl/build/docparam2txt.xsl =================================================================== --- trunk/xsl/tools/xsl/build/docparam2txt.xsl (rev 0) +++ trunk/xsl/tools/xsl/build/docparam2txt.xsl 2006-09-13 08:51:12 UTC (rev 6294) @@ -0,0 +1,24 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> + +<xsl:output method="text" indent="no"/> + +<!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current for + copyright and other information. + + ******************************************************************** --> + +<xsl:template match="preface|reference|refentry|appendix"> + <xsl:value-of select="concat(@id,'.html','
')"/> + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="text()"/> + +</xsl:stylesheet> Property changes on: trunk/xsl/tools/xsl/build/docparam2txt.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2006-09-14 07:31:09
|
Revision: 6299 http://svn.sourceforge.net/docbook/?rev=6299&view=rev Author: xmldoc Date: 2006-09-14 00:30:40 -0700 (Thu, 14 Sep 2006) Log Message: ----------- Added the html.append and chunk.append parameters. By default, the value of both is empty; but the internal DocBook XSL stylesheets build sets their value to "<xsl:text>
</xsl:text>", in order to ensure that all files in the docbook-xsl-doc package end in a newline character. (Because diff and some other tools may emit error messages and/or not behave as expected when processing files that are not newline-terminated.) Modified Paths: -------------- trunk/xsl/html/chunk-common.xsl trunk/xsl/html/docbook.xsl trunk/xsl/html/graphics.xsl trunk/xsl/html/param.ent trunk/xsl/html/param.xweb trunk/xsl/html/titlepage.xsl trunk/xsl/template/titlepage.xsl trunk/xsl/tools/xsl/build/clrefentry.xsl trunk/xsl/tools/xsl/build/doc-link-docbook.xsl trunk/xsl/tools/xsl/build/jrefhtml.xsl trunk/xsl/tools/xsl/build/reference.xsl Added Paths: ----------- trunk/xsl/params/chunk.append.xml trunk/xsl/params/html.append.xml Modified: trunk/xsl/html/chunk-common.xsl =================================================================== --- trunk/xsl/html/chunk-common.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/chunk-common.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -1241,6 +1241,7 @@ <xsl:call-template name="user.footer.navigation"/> </body> </html> + <xsl:value-of select="$chunk.append"/> </xsl:template> </xsl:stylesheet> Modified: trunk/xsl/html/docbook.xsl =================================================================== --- trunk/xsl/html/docbook.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/docbook.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -422,6 +422,7 @@ </xsl:call-template> </body> </html> + <xsl:value-of select="$html.append"/> </xsl:template> <xsl:template name="root.messages"> Modified: trunk/xsl/html/graphics.xsl =================================================================== --- trunk/xsl/html/graphics.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/graphics.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -1254,6 +1254,7 @@ </xsl:for-each> </body> </html> + <xsl:value-of select="$chunk.append"/> </xsl:with-param> </xsl:call-template> </xsl:if> Modified: trunk/xsl/html/param.ent =================================================================== --- trunk/xsl/html/param.ent 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/param.ent 2006-09-14 07:30:40 UTC (rev 6299) @@ -73,6 +73,7 @@ <!ENTITY header.rule SYSTEM "../params/header.rule.xml"> <!ENTITY highlight.default.language SYSTEM "../params/highlight.default.language.xml"> <!ENTITY highlight.source SYSTEM "../params/highlight.source.xml"> +<!ENTITY html.append SYSTEM "../params/html.append.xml"> <!ENTITY html.base SYSTEM "../params/html.base.xml"> <!ENTITY html.cleanup SYSTEM "../params/html.cleanup.xml"> <!ENTITY html.ext SYSTEM "../params/html.ext.xml"> @@ -252,6 +253,7 @@ <!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml"> <!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml"> <!ENTITY chunk.tocs.and.lots SYSTEM "../params/chunk.tocs.and.lots.xml"> +<!ENTITY chunk.append SYSTEM "../params/chunk.append.xml"> <!ENTITY chunk.tocs.and.lots.has.title SYSTEM "../params/chunk.tocs.and.lots.has.title.xml"> <!ENTITY graphicsize.extension SYSTEM "../params/graphicsize.extension.xml"> <!ENTITY graphicsize.use.img.src.path SYSTEM "../params/graphicsize.use.img.src.path.xml"> Modified: trunk/xsl/html/param.xweb =================================================================== --- trunk/xsl/html/param.xweb 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/param.xweb 2006-09-14 07:30:40 UTC (rev 6299) @@ -150,6 +150,7 @@ &html.longdesc.link; &make.valid.html; &html.cleanup; +&html.append; &draft.mode; &draft.watermark.image; &generate.id.attributes; @@ -343,6 +344,7 @@ &chunk.section.depth; &chunk.first.sections; &chunk.quietly; +&chunk.append; &navig.graphics; &navig.graphics.extension; &navig.graphics.path; @@ -493,6 +495,7 @@ <src:fragref linkend="callout.unicode.start.character.frag"/> <src:fragref linkend="callouts.extension.frag"/> <src:fragref linkend="chapter.autolabel.frag"/> +<src:fragref linkend="chunk.append.frag"/> <src:fragref linkend="chunk.first.sections.frag"/> <src:fragref linkend="chunk.quietly.frag"/> <src:fragref linkend="chunk.section.depth.frag"/> @@ -551,6 +554,7 @@ <src:fragref linkend="header.rule.frag"/> <src:fragref linkend="highlight.default.language.frag"/> <src:fragref linkend="highlight.source.frag"/> +<src:fragref linkend="html.append.frag"/> <src:fragref linkend="html.base.frag"/> <src:fragref linkend="html.cellpadding.frag"/> <src:fragref linkend="html.cellspacing.frag"/> @@ -623,6 +627,7 @@ <src:fragref linkend="index.prefer.titleabbrev.frag"/> <src:fragref linkend="ignore.image.scaling.frag"/> <src:fragref linkend="inherit.keywords.frag"/> +<src:fragref linkend="insert.xref.page.number.frag"/> <src:fragref linkend="keep.relative.image.uris.frag"/> <src:fragref linkend="l10n.gentext.default.language.frag"/> <src:fragref linkend="l10n.gentext.language.frag"/> @@ -750,7 +755,6 @@ <src:fragref linkend="xref.label-title.separator.frag"/> <src:fragref linkend="xref.label-page.separator.frag"/> <src:fragref linkend="xref.title-page.separator.frag"/> -<src:fragref linkend="insert.xref.page.number.frag"/> </xsl:stylesheet> </src:fragment> Modified: trunk/xsl/html/titlepage.xsl =================================================================== --- trunk/xsl/html/titlepage.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/html/titlepage.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -522,6 +522,7 @@ </div> </body> </html> + <xsl:value-of select="$chunk.append"/> </xsl:with-param> </xsl:call-template> </xsl:when> @@ -749,6 +750,7 @@ <xsl:copy-of select="$contents"/> </body> </html> + <xsl:text>
</xsl:text> </xsl:with-param> </xsl:call-template> </xsl:when> Added: trunk/xsl/params/chunk.append.xml =================================================================== --- trunk/xsl/params/chunk.append.xml (rev 0) +++ trunk/xsl/params/chunk.append.xml 2006-09-14 07:30:40 UTC (rev 6299) @@ -0,0 +1,27 @@ +<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + id="chunk.append"> +<refmeta> +<refentrytitle>chunk.append</refentrytitle> + +</refmeta> +<refnamediv> +<refname>chunk.append</refname> +<refpurpose>Specifies content to append to chunked HTML output</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id='chunk.append.frag'><xsl:param name="chunk.append"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Specifies content to append to the end of HTML files output by +the <filename>html/chunk.xsl</filename> stylesheet, after the closing +<code><html></code> tag. You probably don’t want to set any value +for this parameter; but if you do, the only value it should ever be +set to is a newline character: <code>&#x0a;</code> or +<code>&#10;</code></para> + +</refsect1> +</refentry> Property changes on: trunk/xsl/params/chunk.append.xml ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/params/html.append.xml =================================================================== --- trunk/xsl/params/html.append.xml (rev 0) +++ trunk/xsl/params/html.append.xml 2006-09-14 07:30:40 UTC (rev 6299) @@ -0,0 +1,27 @@ +<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + id="html.append"> +<refmeta> +<refentrytitle>html.append</refentrytitle> + +</refmeta> +<refnamediv> +<refname>html.append</refname> +<refpurpose>Specifies content to append to HTML output</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id='html.append.frag'><xsl:param name="html.append"/></src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Specifies content to append to the end of HTML files output by +the <filename>html/docbook.xsl</filename> stylesheet, after the +closing <code><html></code> tag. You probably don’t want to set any +value for this parameter; but if you do, the only value it should ever +be set to is a newline character: <code>&#x0a;</code> or +<code>&#10;</code></para> + +</refsect1> +</refentry> Property changes on: trunk/xsl/params/html.append.xml ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/xsl/template/titlepage.xsl =================================================================== --- trunk/xsl/template/titlepage.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/template/titlepage.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -20,6 +20,12 @@ <!-- ==================================================================== --> +<xsl:template match="/"> + <xsl:text>
</xsl:text> + <xsl:apply-templates/> + <xsl:text>
</xsl:text> +</xsl:template> + <doc:reference xmlns=""> <referenceinfo> <releaseinfo role="meta"> Modified: trunk/xsl/tools/xsl/build/clrefentry.xsl =================================================================== --- trunk/xsl/tools/xsl/build/clrefentry.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/tools/xsl/build/clrefentry.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -9,6 +9,7 @@ <xsl:param name="use.id.as.filename" select="1"/> <xsl:param name="refentry.separator" select="0"/> +<xsl:param name="chunk.append"><xsl:text>
</xsl:text></xsl:param> <!-- n.b. reference pages are one directory down, so we point back up --> <xsl:param name="html.stylesheet" select="'../css/reference.css'"/> Modified: trunk/xsl/tools/xsl/build/doc-link-docbook.xsl =================================================================== --- trunk/xsl/tools/xsl/build/doc-link-docbook.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/tools/xsl/build/doc-link-docbook.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -5,5 +5,6 @@ <xsl:import href="../../../html/docbook.xsl"/> <xsl:include href="tdg-link.xsl"/> <xsl:include href="xsl-param-link.xsl"/> +<xsl:param name="html.append"><xsl:text>
</xsl:text></xsl:param> </xsl:stylesheet> Modified: trunk/xsl/tools/xsl/build/jrefhtml.xsl =================================================================== --- trunk/xsl/tools/xsl/build/jrefhtml.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/tools/xsl/build/jrefhtml.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -28,6 +28,7 @@ <xsl:param name="admon.graphics.path">../images/</xsl:param> <xsl:param name="admon.graphics.extension" select="'.png'"></xsl:param> <xsl:param name="admon.style"/> +<xsl:param name="html.append"><xsl:text>
</xsl:text></xsl:param> <xsl:template match="refentry"> Modified: trunk/xsl/tools/xsl/build/reference.xsl =================================================================== --- trunk/xsl/tools/xsl/build/reference.xsl 2006-09-14 01:34:57 UTC (rev 6298) +++ trunk/xsl/tools/xsl/build/reference.xsl 2006-09-14 07:30:40 UTC (rev 6299) @@ -11,6 +11,7 @@ <xsl:param name="admon.graphics.extension" select="'.png'"></xsl:param> <xsl:param name="admon.style"/> <xsl:param name="generate.toc"/> +<xsl:param name="html.append"><xsl:text>
</xsl:text></xsl:param> <xsl:template match="/legalnotice"> <xsl:apply-templates select="." mode="titlepage.mode"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2006-09-14 07:42:05
|
Revision: 6301 http://svn.sourceforge.net/docbook/?rev=6301&view=rev Author: xmldoc Date: 2006-09-14 00:41:54 -0700 (Thu, 14 Sep 2006) Log Message: ----------- Moved html2roff.xsl in the xsl/builds directory. Added Paths: ----------- trunk/xsl/tools/xsl/build/html2roff.xsl Removed Paths: ------------- trunk/xsl/manpages/html2roff.xsl Deleted: trunk/xsl/manpages/html2roff.xsl =================================================================== --- trunk/xsl/manpages/html2roff.xsl 2006-09-14 07:40:46 UTC (rev 6300) +++ trunk/xsl/manpages/html2roff.xsl 2006-09-14 07:41:54 UTC (rev 6301) @@ -1,56 +0,0 @@ -<?xml version='1.0'?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:ng="http://docbook.org/docbook-ng" - xmlns:db="http://docbook.org/ns/docbook" - xmlns:exsl="http://exslt.org/common" - exclude-result-prefixes="exsl db ng" - version='1.0'> - -<!-- ******************************************************************** - $Id$ - ******************************************************************** - - This file is part of the XSL DocBook Stylesheet distribution. - See ../README or http://docbook.sf.net/release/xsl/current/ for - copyright and other information. - - ******************************************************************** --> - -<!-- * Standalone stylesheet for doing "HTML to roff" transformation of a --> -<!-- * stylesheet; which currently just means that it transforms all --> -<!-- * <br/> instances into a line break, and all <pre></pre> instances --> -<!-- * into roff "no fill region" markup --> - -<!-- ==================================================================== --> - - <xsl:output method="xml" - encoding="UTF-8" - indent="no"/> - - <xsl:template match="/"> - <xsl:apply-templates/> - <xsl:text>
</xsl:text> - </xsl:template> - - <xsl:template match="node() | @*"> - <xsl:copy> - <xsl:apply-templates select="@* | node()"/> - </xsl:copy> - </xsl:template> - - <!-- ==================================================================== --> - - <xsl:template match="br"> - <xsl:element name="xsl:text"> . </xsl:element> - </xsl:template> - - <xsl:template match="pre"> - <xsl:element name="xsl:text">.sp </xsl:element> - <xsl:element name="xsl:text">.nf </xsl:element> - <xsl:copy> - <xsl:apply-templates select="@* | node()"/> - </xsl:copy> - <xsl:element name="xsl:text"> .fi </xsl:element> - </xsl:template> - -</xsl:stylesheet> Copied: trunk/xsl/tools/xsl/build/html2roff.xsl (from rev 6300, trunk/xsl/manpages/html2roff.xsl) =================================================================== --- trunk/xsl/tools/xsl/build/html2roff.xsl (rev 0) +++ trunk/xsl/tools/xsl/build/html2roff.xsl 2006-09-14 07:41:54 UTC (rev 6301) @@ -0,0 +1,56 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" + xmlns:exsl="http://exslt.org/common" + exclude-result-prefixes="exsl db ng" + version='1.0'> + +<!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://docbook.sf.net/release/xsl/current/ for + copyright and other information. + + ******************************************************************** --> + +<!-- * Standalone stylesheet for doing "HTML to roff" transformation of a --> +<!-- * stylesheet; which currently just means that it transforms all --> +<!-- * <br/> instances into a line break, and all <pre></pre> instances --> +<!-- * into roff "no fill region" markup --> + +<!-- ==================================================================== --> + + <xsl:output method="xml" + encoding="UTF-8" + indent="no"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + <xsl:text>
</xsl:text> + </xsl:template> + + <xsl:template match="node() | @*"> + <xsl:copy> + <xsl:apply-templates select="@* | node()"/> + </xsl:copy> + </xsl:template> + + <!-- ==================================================================== --> + + <xsl:template match="br"> + <xsl:element name="xsl:text"> . </xsl:element> + </xsl:template> + + <xsl:template match="pre"> + <xsl:element name="xsl:text">.sp </xsl:element> + <xsl:element name="xsl:text">.nf </xsl:element> + <xsl:copy> + <xsl:apply-templates select="@* | node()"/> + </xsl:copy> + <xsl:element name="xsl:text"> .fi </xsl:element> + </xsl:template> + +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2006-09-21 09:44:41
|
Revision: 6310 http://svn.sourceforge.net/docbook/?rev=6310&view=rev Author: xmldoc Date: 2006-09-21 02:44:24 -0700 (Thu, 21 Sep 2006) Log Message: ----------- Added initial support in manpages output for footnote, annotation, and alt instances. Basically, they all now get handled the same way ulink instances are. They are treated as a class as "note sources": A numbered marker is generated at the place in the main text flow where they occur, then their contents are displayed in an endnotes section at the end of the man page (currently titled REFERENCES, for English output, but will be changed to NOTES). This support is not yet complete. It works for most "normal" cases, but probably mishandles a good number of cases. More testing will be needed to expose the problems. It may well also introduce some bugs and regressions in other areas, including basic paragraph handling, handling of "mixed block" content, handling of other indented content, and handling of authorblurb and personblurb in the AUTHORS section. Modified Paths: -------------- trunk/xsl/manpages/block.xsl trunk/xsl/manpages/docbook.xsl trunk/xsl/manpages/links.xsl trunk/xsl/manpages/other.xsl trunk/xsl/manpages/table.xsl trunk/xsl/manpages/utility.xsl trunk/xsl/params/man.indent.lists.xml trunk/xsl/params/man.indent.width.xml Modified: trunk/xsl/manpages/block.xsl =================================================================== --- trunk/xsl/manpages/block.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/block.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -39,12 +39,42 @@ </xsl:template> <xsl:template match="para"> - <xsl:if test="not(ancestor::footnote[ancestor::table]) and - not(ancestor::authorblurb) and - not(ancestor::personblurb)"> - <xsl:text>.PP </xsl:text> - </xsl:if> + <!-- * FIXME: Need to extract the ancestor::footnote, etc. checking and --> + <!-- * move to named template so that we can call it from templates for --> + <!-- * other block elements also --> + <xsl:choose> + <!-- * If a para is a descendant of a footnote, etc., then indent it --> + <!-- * (unless it is the first child, in which case don't generate --> + <!-- * anything at all to mark its start). --> + <!-- * FIXME: *blurb checking should not be munged in here the way --> + <!-- * it currently is; this probably breaks blurb indenting. --> + <xsl:when test="ancestor::footnote or + ancestor::annotation or + ancestor::authorblurb or + ancestor::personblurb"> + <xsl:if test="preceding-sibling::*[not(name() ='')]"> + <xsl:text>.sp</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>.RS 4n</xsl:text> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:text>.PP</xsl:text> + <xsl:text> </xsl:text> + </xsl:otherwise> + </xsl:choose> <xsl:call-template name="mixed-block"/> + <xsl:if test="ancestor::footnote or + ancestor::annotation or + ancestor::authorblurb or + ancestor::personblurb"> + <xsl:if test="preceding-sibling::*[not(name() ='')]"> + <xsl:text> </xsl:text> + <xsl:text>.RE</xsl:text> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:if> <xsl:text> </xsl:text> </xsl:template> Modified: trunk/xsl/manpages/docbook.xsl =================================================================== --- trunk/xsl/manpages/docbook.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/docbook.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -230,7 +230,7 @@ <!-- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <xsl:if test="$man.links.list.enabled != 0 or $man.links.are.numbered != 0"> - <xsl:call-template name="links.list"/> + <xsl:call-template name="endnotes.list"/> </xsl:if> </xsl:variable> <!-- * end of manpage.contents --> Modified: trunk/xsl/manpages/links.xsl =================================================================== --- trunk/xsl/manpages/links.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/links.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -1,6 +1,9 @@ <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" + exclude-result-prefixes="db ng exsl" version='1.0'> <!-- ******************************************************************** @@ -14,31 +17,65 @@ ******************************************************************** --> <!-- ==================================================================== --> - -<!-- * Make per-Refentry sets of all links in each Refentry which do not --> -<!-- * have the same URL as any preceding link in that same Refentry and --> -<!-- * string value of which does not match value of the url attribute --> <!-- * --> -<!-- * We need this in order to have inline numbering match the --> -<!-- * numbering of the link list. In both places, for any link whose --> -<!-- * URL is a duplicate of that of a preceding link in the same --> -<!-- * Refentry, we assign it the number of that previous link. --> +<!-- * This stylesheet: --> <!-- * --> -<!-- * Note that we don't get links in *info sections or Refmeta or --> +<!-- * 1. Identifies all "note sources" (link, annotation, alt, and --> +<!-- * footnote instances) in a Refentry which do not have the same --> +<!-- * "earmark" as any preceding notesource in that same Refentry --> +<!-- * (and for notesources that are links, then only those links --> +<!-- * whose string value and url attribute value are not identical). --> +<!-- * --> +<!-- * 2. Puts a number inline to mark the place where the notesource --> +<!-- * occurs in the main text flow. --> +<!-- * --> +<!-- * 3. Generates a numbered endnotes list (titled NOTES in --> +<!-- * English) at the end of the man page, with the contents of --> +<!-- * each notesourcse. --> +<!-- * --> +<!-- * Note that table footnotes are not listed in the endnotes list, --> +<!-- * and are not handled by this stylesheet (they are instead --> +<!-- * handled by the table.xsl stylesheet). --> +<!-- * --> +<!-- * Also, we don't get notesources in *info sections or Refmeta or --> <!-- * Refnamediv or Indexterm, because, in manpages output, contents --> <!-- * of those are either suppressed or are displayed out of document --> <!-- * order - for example, the Info/Author content gets moved to the --> -<!-- * end of the page. So, if we were to number links in the Author --> +<!-- * end of the page. So, if we were to number notesources in the Author --> <!-- * content, it would "throw off" the numbering at the beginning of --> <!-- * the main text flow. --> <!-- * --> -<!-- * And note especially that the reason we don't use xsl:key here --> -<!-- * is that the "match" value is an XSLT _pattern_, not an XSLT --> -<!-- * _expression_; XSLT patterns can't contain function calls, but --> -<!-- * XSLT expressions can. We need the calls to the generate-id() --> -<!-- * function in order to determine whether or not two links have --> -<!-- * the same Refentry parent --> -<xsl:variable name="get.all.links.with.unique.urls"> +<!-- * Important: For any notesource whose earmark matches that of a --> +<!-- * preceding notesource in the same Refentry, we assign it the --> +<!-- * number of that previous notesource. --> +<!-- * --> +<!-- * For links, we check to see if the link is empty OR if its --> +<!-- * string value is identical to the value of its url attribute; if --> +<!-- * either of those is true, we just display the value of its url --> +<!-- * attribute (if the link itself is empty), and stop there. --> +<!-- * --> +<!-- * And for the record, one reason we don't use xsl:key to index --> +<!-- * the notesources is that we need to get and check the sets of --> +<!-- * notesources for uniqueness per-Refentry (not per-document). --> +<!-- * --> +<!-- * FIXME: mediaobject and inlinemediaobject should also be handled --> +<!-- * as notesources; should change most link* variable names to --> +<!-- * notesource*; as with "repeat" URLS, alt instances that have the --> +<!-- * same string value as preceding ones (likely to occur for repeat --> +<!-- * acroynyms and abbreviations) should be listed only once in --> +<!-- * the endnotes list, and numbered accordingly inline; split --> +<!-- * man.indent.width into man.indent.width.value (default 4) and --> +<!-- * man.indent.width.units (default n); also, if the first child of --> +<!-- * notesource is some block content other than a (non-formal) --> +<!-- * paragraph, the current code will probably end up generating a --> +<!-- * blank line after the corresponding number in the endnotes --> +<!-- * list... we should probably try to instead display the title of --> +<!-- * that block content there (if there is one: e.g., the list title, --> +<!-- * admonition title, etc.) --> +<!-- * --> +<!-- ==================================================================== --> + +<xsl:template name="get.all.links.with.unique.urls"> <xsl:if test="$man.links.are.numbered != 0"> <xsl:for-each select="//refentry"> <refentry.link.set> @@ -46,7 +83,11 @@ <xsl:value-of select="generate-id()"/> </xsl:attribute> <xsl:for-each - select=".//ulink[node() + select=".//*[self::ulink + or self::footnote[not(ancestor::table)] + or self::annotation + or self::alt] + [node() and not(ancestor::refentryinfo) and not(ancestor::info) and not(ancestor::docinfo) @@ -64,74 +105,67 @@ and not(ancestor::indexterm) and (generate-id(ancestor::refentry) = generate-id(current()))]/@url)]"> - <link> - <xsl:attribute name="url"> - <xsl:value-of select="@url"/> + <notesource> + <xsl:attribute name="earmark"> + <xsl:choose> + <xsl:when test="@url"> + <xsl:value-of select="@url"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="generate-id()"/> + </xsl:otherwise> + </xsl:choose> </xsl:attribute> <xsl:copy> <xsl:copy-of select="node()"/> </xsl:copy> - </link> + </notesource> </xsl:for-each> </refentry.link.set> </xsl:for-each> </xsl:if> -</xsl:variable> +</xsl:template> -<xsl:variable name="all.links.with.unique.urls" - select="exsl:node-set($get.all.links.with.unique.urls)"/> - <!-- ==================================================================== --> -<!-- * We check to see if the link is empty OR if its string value is --> -<!-- * identical to the value of its url attribute; if either of those --> -<!-- * is true, we just display the value of its url attribute (if the --> -<!-- * ulink itself is empty), and stop there. --> -<!-- * --> -<!-- * Otherwise we need to display its contents AND (optionally) --> -<!-- * display its URL. We could display the URL inline, after the --> -<!-- * contents (as we did previously), but that ends up looking --> -<!-- * horrible if you have a lot of links. --> -<!-- * --> -<!-- * So, we instead need to display the URL out-of-line, in a way --> -<!-- * that associates it with the content. How to do that in a --> -<!-- * text-based output format that lacks hyperlinks? --> -<!-- * --> -<!-- * Here's how: Do it the way that most text/curses-based browsers --> -<!-- * (e.g., w3m and lynx) do in the "-dump" output: Put a number --> -<!-- * (in brackets) before the contents, and then put the URL, with --> -<!-- * the corresponding number, in a generated section --> -<!-- * at the end of the page. --> -<!-- * --> -<!-- * For any link whose URL is a duplicate of that of a preceding --> -<!-- * link in the same Refentry, we assign it the number of that --> -<!-- * previous link. --> -<xsl:template match="ulink"> +<xsl:template match="ulink|footnote[not(ancestor::table)]|annotation|alt"> + <xsl:variable name="get.all.links.with.unique.urls"> + <xsl:call-template name="get.all.links.with.unique.urls"/> + </xsl:variable> + <xsl:variable name="all.links.with.unique.urls" + select="exsl:node-set($get.all.links.with.unique.urls)"/> <xsl:variable name="get.links.with.unique.urls"> - <!-- * get the set of all unique links in the ancestor Refentry of --> - <!-- * this Ulink --> + <!-- * get the set of all unique notesources in the ancestor Refentry of --> + <!-- * this notesource --> <xsl:copy-of select="$all.links.with.unique.urls/refentry.link.set - [@idref = generate-id(current()/ancestor::refentry)]/link"/> + [@idref = generate-id(current()/ancestor::refentry)]/notesource"/> </xsl:variable> <xsl:variable name="links.with.unique.urls" select="exsl:node-set($get.links.with.unique.urls)"/> - <!-- * store link URL in variable because we check it multiple times --> - <xsl:variable name="url"> - <xsl:value-of select="@url"/> + <!-- * Identify the "earmark" for this notesource --> + <xsl:variable name="earmark"> + <xsl:choose> + <xsl:when test="@url"> + <xsl:value-of select="@url"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="generate-id()"/> + </xsl:otherwise> + </xsl:choose> </xsl:variable> - <!-- * $link is either the link contents (if the link is non-empty) or --> - <!-- * the URL (if the link is empty) --> - <xsl:variable name="link"> + <!-- * for links, $notesource is either the link contents (if the --> + <!-- * link is non-empty) or the "earmark" URL (if the link is empty) --> + <xsl:variable name="notesource"> <xsl:choose> - <!-- * check to see if the element is empty or not; if it's non-empty, --> - <!-- * get the content --> + <!-- * check to see if the element is empty or not; if it's --> + <!-- * non-empty, get the content --> <xsl:when test="node()"> <xsl:apply-templates/> </xsl:when> <xsl:otherwise> - <!-- * The element is empty, so we just get the value of the URL; --> - <!-- * note that we don't number empty links --> + <!-- * Otherwise this is an empty link, so we just get the --> + <!-- * value of its URL; note that we don't number empty links --> <!-- * --> <!-- * Add hyphenation suppression in URL output only if --> <!-- * break.after.slash is also non-zero --> @@ -140,91 +174,69 @@ <xsl:call-template name="suppress.hyphenation"/> <xsl:text>\%</xsl:text> </xsl:if> - <xsl:value-of select="$url"/> + <xsl:value-of select="$earmark"/> </xsl:otherwise> </xsl:choose> </xsl:variable> - <!-- * if link is non-empty AND its string value is not equal to the --> - <!-- * value of its url attribute AND user wants links numbered, --> - <!-- * then output a number for it --> - <xsl:if test="node() and not(. = @url) and $man.links.are.numbered != 0"> - <!-- * We number links by checking the $links.with.unique.urls set --> - <!-- * and finding the link whose URL matches the URL for this --> - <!-- * link. If this is the only instance in this Refentry of a link --> - <!-- * with this URL, then it gets a unique number. But if this is a --> - <!-- * link for which there are multiple instances of links in this --> - <!-- * Refentry that have the same URL as this link, then the number --> - <!-- * assigned is the number of the _first_ instance of a link in --> - <!-- * this Refentry with the URL for this link (which be the number --> - <!-- * of this link itself, if it happens to be the first instance). --> - <xsl:variable name="link.number"> - <xsl:apply-templates - select="$links.with.unique.urls/link[@url = $url][1]" - mode="link.number"/> - </xsl:variable> - <!-- * format the number by placing it in square brackets. This --> - <!-- * formatting could be made user-configurable - something --> - <!-- * other than square brackets. But what else would work? --> - <!-- * <10> Angle brackets? {10} Braces? --> - <xsl:text>[</xsl:text> - <xsl:value-of select="$link.number"/> - <xsl:text>]\&</xsl:text> - <!-- * Note that the reason for the \& after the closing bracket --> - <!-- * is to prevent a hyphen character from being rendered --> - <!-- * between the closing bracket and the following text - even --> - <!-- * when the following text is preceded by a "hyphenation --> - <!-- * character"; for example: --> - <!-- * --> - <!-- * [26]\&\fI\%COUNTRY\fR\fR --> - <!-- * --> - <!-- * Where COUNTRY is marked up with as <envar>COUNTRY</envar> --> - <!-- * in the source (we generate \% before all Envar output (and --> - <!-- * all other "computer inlines") to prevent it from being --> - <!-- * broken across lines. --> - <!-- * --> - <!-- * Without the \& after the closing bracket, if the --> - <!-- * [26]\fI\%COUNTRY\fR\fR instance fell at the end of a line, --> - <!-- * a hyphen could end up being inserted; for example: --> - <!-- * --> - <!-- * if you are uncertain, check the value of the [26]- --> - <!-- * COUNTRY environment variable --> - <!-- * --> - <!-- * The \& causes [26]COUNTRY to be treated as a unit, --> - <!-- * preventing insertion of the stray hyphen. --> - </xsl:if> + <xsl:if test="self::ulink"> <xsl:choose> <!-- * if user wants links underlined, underline (ital) it --> <xsl:when test="$man.links.are.underlined != 0"> <xsl:variable name="link.wrapper"> - <italic><xsl:value-of select="$link"/></italic> + <italic><xsl:value-of select="$notesource"/></italic> </xsl:variable> <xsl:apply-templates mode="italic" select="exsl:node-set($link.wrapper)"/> </xsl:when> <xsl:otherwise> <!-- * user doesn't want links underlined, so just display content --> - <xsl:value-of select="$link"/> + <xsl:value-of select="$notesource"/> </xsl:otherwise> </xsl:choose> -</xsl:template> + </xsl:if> + <!-- * If link is non-empty AND its string value is not equal to the --> + <!-- * value of its url attribute AND user wants notesources numbered, --> + <!-- * then output a number for it --> + <xsl:if test="node() and not(. = @url) and $man.links.are.numbered != 0"> + <!-- * We number notesources by checking the $links.with.unique.urls --> + <!-- * set and finding the notesource whose earmark matches the --> + <!-- * earmark for this notesource. --> + <!-- * --> + <!-- * If this is the only instance in this Refentry of a notesource --> + <!-- * with this earmark, then it gets a unique number. --> + <!-- * --> + <!-- * But if this is a notesource for which there are multiple --> + <!-- * instances of notesources in this Refentry that have the same --> + <!-- * earmark as this notesource, then the number assigned is the --> + <!-- * number of the _first_ instance of a notesource in this --> + <!-- * Refentry with the earmark for this notesource (which be the --> + <!-- * number of this notesource itself, if it happens to be the --> + <!-- * first instance). --> + <xsl:variable name="notesource.number"> + <xsl:apply-templates + select="$links.with.unique.urls/notesource[@earmark = $earmark][1]" + mode="notesource.number"/> + </xsl:variable> + <!-- * Format the number by placing it in square brackets. FIXME: --> + <!-- * This formatting should probably be made user-configurable, --> + <!-- * to allow something other than just square brackets; e.g., --> + <!-- * Angle brackets<10> or Braces{10} --> + <xsl:text>\&[</xsl:text> + <xsl:value-of select="$notesource.number"/> + <xsl:text>]</xsl:text> + <!-- * Note that the reason for the \& before the opening bracket --> + <!-- * is to prevent any possible linebreak from being introduced --> + <!-- * between the opening bracket and the following text. --> + </xsl:if> + </xsl:template> <!-- ==================================================================== --> -<xsl:template match="*" mode="link.number"> - <!-- * Count all links in this Refentry which do not have the same --> - <!-- * URL as any preceding link in this same Refentry --> - <!-- * --> - <!-- * Note that we don't get links in *info sections or Refmeta or --> - <!-- * Refnamediv or Indexterm, because, in manpages output, --> - <!-- * contents of those are either suppressed or are displayed out --> - <!-- * of document order --> - <!-- * --> - <!-- * And note that the reason we don't just use xsl:number here --> - <!-- * is that the "match" value is an XSLT _pattern_, not an XSLT --> - <!-- * _expression_; XSLT patterns can't contain function calls, but --> - <!-- * XSLT expressions can. We need the calls to the generate-id() --> - <!-- * function in order to determine whether or not two links have --> - <!-- * the same Refentry parent --> - <xsl:value-of select="count(preceding::ulink[node() +<xsl:template match="*" mode="notesource.number"> + <xsl:value-of select="count(preceding::*[(self::ulink + or self::footnote[not(ancestor::table)] + or self::annotation + or self::alt) + and node() and not(ancestor::refentryinfo) and not(ancestor::info) and not(ancestor::docinfo) @@ -248,16 +260,13 @@ <!-- ==================================================================== --> -<xsl:template name="links.list"> - <!-- * Get all links in this Refentry which do not have the same URL --> - <!-- * as any preceding link in this same Refentry --> - <!-- * --> - <!-- * Note that we don't get links in *info sections or Refmeta or --> - <!-- * Refnamediv or Indexterm, because, in manpages output, --> - <!-- * contents of those are either suppressed or are displayed out --> - <!-- * of document order --> - <xsl:variable name="links" - select=".//ulink[node() +<xsl:template name="endnotes.list"> + <xsl:variable name="notesources" + select=".//*[(self::ulink + or self::footnote[not(ancestor::table)] + or self::annotation + or self::alt) + and node() and not(ancestor::refentryinfo) and not(ancestor::info) and not(ancestor::docinfo) @@ -275,38 +284,21 @@ and not(ancestor::indexterm) and (generate-id(ancestor::refentry) = generate-id(current()))]/@url)]"/> - <!-- * check to see if we have actually found any links; if we have, --> - <!-- * we generate the links list, if not, we do nothing --> - <xsl:if test="$links/node()"> - <xsl:call-template name="format.links.list"> - <xsl:with-param name="links" select="$links"/> + <!-- * check to see if we have actually found any notesources; if we --> + <!-- * have, we generate the endnotes list, if not, we do nothing --> + <xsl:if test="$notesources/node()"> + <xsl:call-template name="format.endnotes.list"> + <xsl:with-param name="notesources" select="$notesources"/> </xsl:call-template> </xsl:if> </xsl:template> <!-- ==================================================================== --> -<xsl:template name="format.links.list"> - <xsl:param name="links"/> - <!-- * The value of $padding.length is used for determining how much --> - <!-- * to right-pad numbers in the LINKS list. So, for $length, we --> - <!-- * count how many links there are, then take the number of digits --> - <!-- * in that count, and add 2 to it. The reason we add 2 is that we --> - <!-- * also prepend a dot and no-break space to each link number in --> - <!-- * the list, so we need to consider what length to pad out to. --> - <xsl:param name="padding.length"> - <xsl:choose> - <xsl:when test="$man.links.are.numbered != 0"> - <xsl:value-of select="string-length(count($links)) + 2"/> - </xsl:when> - <xsl:otherwise> - <!-- * if links aren't numbered, just set padding to zero --> - <xsl:value-of select="0"/> - </xsl:otherwise> - </xsl:choose> - </xsl:param> +<xsl:template name="format.endnotes.list"> + <xsl:param name="notesources"/> <xsl:call-template name="mark.subheading"/> - <!-- * make the link-list section heading (REFERENCES) --> + <!-- * make the endnotes-list section heading --> <xsl:text>.SH "</xsl:text> <xsl:call-template name="string.upper"> <xsl:with-param name="string"> @@ -317,6 +309,7 @@ </xsl:when> <xsl:otherwise> <!-- * otherwise, get localized heading from gentext --> + <!-- * (in English, NOTES) --> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'References'"/> </xsl:call-template> @@ -325,118 +318,65 @@ </xsl:with-param> </xsl:call-template> <xsl:text>" </xsl:text> - <xsl:for-each select="$links"> - <!-- * number the link, in the form " 1." followed by a --> - <!-- * non-breaking space; --> - <xsl:variable name="link.number"> - <xsl:apply-templates select="." mode="link.number"/> - <xsl:text>. </xsl:text> + <xsl:for-each select="$notesources"> + <!-- * make paragraph with hanging indent, and starting with a --> + <!-- * number in the form " 1." (padded to $man.indent.width - 1) --> + <xsl:text>.IP</xsl:text> + <xsl:text> "</xsl:text> + <xsl:variable name="endnote.number"> + <xsl:apply-templates select="." mode="notesource.number"/> + <xsl:text>.</xsl:text> </xsl:variable> - <!-- * make paragraph with hanging indent; length of indent is --> - <!-- * same as value of $padding.length --> - <xsl:text>.TP </xsl:text> - <xsl:value-of select="$padding.length"/> - <xsl:text> </xsl:text> - <!-- * right-pad each number out to the correct length --> - <!-- * So, if there are 10 or more links, numbers --> - <!-- * 1 through 9 will have a space in front of them; if --> - <!-- * there are 100 or more, 1 through 9 will have two --> - <!-- * spaces, 10 through 99 will have one space, etc. --> <xsl:call-template name="prepend-pad"> - <xsl:with-param name="padVar" select="$link.number"/> - <xsl:with-param name="length" select="$padding.length"/> + <xsl:with-param name="padVar" select="$endnote.number"/> + <!-- FIXME: the following assumes that $man.indent.width is in --> + <!-- en's; also, this should probably use $list.indent instead --> + <xsl:with-param name="length" select="$man.indent.width - 1"/> </xsl:call-template> - <!-- * Print the links contents --> - <!-- * IMPORTANT: If there are multiple links in this Refentry --> - <!-- * with the same URL, this gets the contents of the _first --> - <!-- * instance_ of the link in this Refentry with that URL --> - <xsl:variable name="link.contents"> - <xsl:value-of select="."/> - </xsl:variable> - <xsl:value-of select="normalize-space($link.contents)"/> - <xsl:text> </xsl:text> - <!-- * Print the link's URL --> - <!-- * Add hyphenation suppression in URL output only if --> - <!-- * break.after.slash is also non-zero --> - <xsl:if test="$man.hyphenate.urls = 0 and - $man.break.after.slash = 0"> - <xsl:call-template name="suppress.hyphenation"/> - <xsl:text>\%</xsl:text> + <xsl:text>"</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text> </xsl:text> + <xsl:value-of select="$list-indent"/> </xsl:if> - <xsl:value-of select="@url"/> <xsl:text> </xsl:text> - </xsl:for-each> -</xsl:template> - -<xsl:template match="footnote"/> - - <!-- * ============================================================== --> - <!-- * Handle table footnotes --> - <!-- * ============================================================== --> - <xsl:template match="footnote" mode="table.footnote.mode"> - <xsl:variable name="footnotes" select=".//footnote"/> - <xsl:variable name="table.footnotes" - select=".//tgroup//footnote"/> - <xsl:value-of select="$man.table.footnotes.divider"/> - <xsl:text> </xsl:text> - <xsl:text>.br </xsl:text> - <xsl:apply-templates select="*[1]" mode="footnote.body.number"/> - <xsl:apply-templates select="*[position() > 1]"/> - </xsl:template> - - <!-- * The following template for footnote.body.number mode was just --> - <!-- * lifted from the HTML stylesheets with some minor adjustments --> - <xsl:template match="*" mode="footnote.body.number"> - <xsl:variable name="name"> - <xsl:text>ftn.</xsl:text> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="ancestor::footnote"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="href"> - <xsl:text>#</xsl:text> - <xsl:call-template name="object.id"> - <xsl:with-param name="object" select="ancestor::footnote"/> - </xsl:call-template> - </xsl:variable> - <xsl:variable name="footnote.mark"> - <xsl:text>[</xsl:text> - <xsl:apply-templates select="ancestor::footnote" - mode="footnote.number"/> - <xsl:text>] </xsl:text> - </xsl:variable> - <xsl:variable name="html"> - <xsl:apply-templates select="."/> - </xsl:variable> + <!-- * Print the endnote contents --> + <!-- * --> + <!-- * IMPORTANT: If there are multiple notesources in this Refentry --> + <!-- * with the same earmark, this gets the contents of the first --> + <!-- * instance of the notesource in this Refentry with that earmark --> <xsl:choose> - <xsl:when test="function-available('exsl:node-set')"> - <xsl:variable name="html-nodes" select="exsl:node-set($html)"/> - <xsl:choose> - <xsl:when test="$html-nodes//p"> - <xsl:apply-templates select="$html-nodes" mode="insert.html.p"> - <xsl:with-param name="mark" select="$footnote.mark"/> - </xsl:apply-templates> - </xsl:when> - <xsl:otherwise> - <xsl:apply-templates select="$html-nodes" mode="insert.html.text"> - <xsl:with-param name="mark" select="$footnote.mark"/> - </xsl:apply-templates> - </xsl:otherwise> - </xsl:choose> + <xsl:when test="self::ulink"> + <xsl:variable name="contents"> + <xsl:apply-templates/> + </xsl:variable> + <xsl:value-of select="normalize-space($contents)"/> </xsl:when> <xsl:otherwise> - <xsl:copy-of select="$html"/> + <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> - </xsl:template> + <xsl:text> </xsl:text> + <xsl:if test="@url"> + <xsl:text>.RS</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text> </xsl:text> + <xsl:value-of select="$list-indent"/> + </xsl:if> + <xsl:text> </xsl:text> + <!-- * This is a link, so print its URL. --> + <!-- * Add hyphenation suppression in URL output only if --> + <!-- * $break.after.slash is also non-zero --> + <xsl:if test="$man.hyphenate.urls = 0 + and $man.break.after.slash = 0"> + <xsl:call-template name="suppress.hyphenation"/> + <xsl:text>\%</xsl:text> + </xsl:if> + <xsl:value-of select="@url"/> + <xsl:text> </xsl:text> + <xsl:text>.RE</xsl:text> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:for-each> +</xsl:template> - <!-- * The HTML stylesheets output <sup><a>...</a></sup> around --> - <!-- * footnote markers in tables --> - <xsl:template match="th/sup"> - <xsl:apply-templates/> - </xsl:template> - <xsl:template match="a"> - <xsl:apply-templates/> - </xsl:template> - </xsl:stylesheet> Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/other.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -145,6 +145,7 @@ <xsl:param name="refname"/> <!-- redefine this any way you'd like to output messages --> <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE --> + <!-- <xsl:if test="//footnote"> <xsl:call-template name="log.message"> <xsl:with-param name="level">Warn</xsl:with-param> @@ -154,6 +155,7 @@ >Output for footnote element is not yet supported.</xsl:with-param> </xsl:call-template> </xsl:if> + --> </xsl:template> <!-- ==================================================================== --> Modified: trunk/xsl/manpages/table.xsl =================================================================== --- trunk/xsl/manpages/table.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/table.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -560,4 +560,73 @@ <xsl:template match="colgroup"/> <xsl:template match="col"/> + <!-- * ============================================================== --> + <!-- * table footnotes --> + <!-- * ============================================================== --> + <xsl:template match="footnote" mode="table.footnote.mode"> + <xsl:variable name="footnotes" select=".//footnote"/> + <xsl:variable name="table.footnotes" + select=".//tgroup//footnote"/> + <xsl:value-of select="$man.table.footnotes.divider"/> + <xsl:text> </xsl:text> + <xsl:text>.br </xsl:text> + <xsl:apply-templates select="*[1]" mode="footnote.body.number"/> + <xsl:apply-templates select="*[position() > 1]"/> + </xsl:template> + + <!-- * The following template for footnote.body.number mode was just --> + <!-- * lifted from the HTML stylesheets with some minor adjustments --> + <xsl:template match="*" mode="footnote.body.number"> + <xsl:variable name="name"> + <xsl:text>ftn.</xsl:text> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="ancestor::footnote"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="href"> + <xsl:text>#</xsl:text> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="ancestor::footnote"/> + </xsl:call-template> + </xsl:variable> + <xsl:variable name="footnote.mark"> + <xsl:text>[</xsl:text> + <xsl:apply-templates select="ancestor::footnote" + mode="footnote.number"/> + <xsl:text>] </xsl:text> + </xsl:variable> + <xsl:variable name="html"> + <xsl:apply-templates select="."/> + </xsl:variable> + <xsl:choose> + <xsl:when test="function-available('exsl:node-set')"> + <xsl:variable name="html-nodes" select="exsl:node-set($html)"/> + <xsl:choose> + <xsl:when test="$html-nodes//p"> + <xsl:apply-templates select="$html-nodes" mode="insert.html.p"> + <xsl:with-param name="mark" select="$footnote.mark"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="$html-nodes" mode="insert.html.text"> + <xsl:with-param name="mark" select="$footnote.mark"/> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$html"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- * The HTML stylesheets output <sup><a>...</a></sup> around --> + <!-- * footnote markers in tables --> + <xsl:template match="th/sup"> + <xsl:apply-templates/> + </xsl:template> + <xsl:template match="a"> + <xsl:apply-templates/> + </xsl:template> + </xsl:stylesheet> Modified: trunk/xsl/manpages/utility.xsl =================================================================== --- trunk/xsl/manpages/utility.xsl 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/manpages/utility.xsl 2006-09-21 09:44:24 UTC (rev 6310) @@ -149,6 +149,7 @@ self::screen|self::synopsis"> <xsl:text> </xsl:text> <xsl:text>.sp </xsl:text> + <xsl:call-template name="mark.up.block.start"/> <xsl:apply-templates select="."/> </xsl:when> <!-- * Check to see if this node is a list; if it is, we don't --> @@ -160,6 +161,7 @@ self::segmentedlist| self::caution|self::important| self::note|self::tip|self::warning)"> + <xsl:call-template name="mark.up.block.start"/> <xsl:apply-templates select="."/> </xsl:when> <xsl:when test="self::text()"> @@ -221,10 +223,88 @@ </xsl:otherwise> </xsl:choose> </xsl:for-each> + <xsl:call-template name="mark.up.block.end"/> </xsl:template> <!-- ================================================================== --> + <!-- * Footnote and annotation contents are displayed using a hanging --> + <!-- * indent out to $man.indent.width If a paragraph-level block --> + <!-- * element (verbatim, list, or admonition) is the first block --> + <!-- * element nested at its same level within the same footnote or --> + <!-- * annotation, then we push it over by the same indent width. --> + <!-- * --> + <!-- * We don't reset the indent for each following sibling, but --> + <!-- * instead do it after for-eaching over all block siblings at --> + <!-- * the same level. So the effect is that if there are any --> + <!-- * following-sibling blocks after the block that starts this --> + <!-- * indent, then they just retain the indent that was already set --> + + <xsl:template name="mark.up.block.start"> + <xsl:choose> + <xsl:when test="(ancestor::footnote + or ancestor::annotation)"> + <xsl:if test="not(preceding-sibling::address| + preceding-sibling::literallayout| + preceding-sibling::programlisting| + preceding-sibling::screen| + preceding-sibling::synopsis| + preceding-sibling::itemizedlist| + preceding-sibling::orderedlist| + preceding-sibling::variablelist| + preceding-sibling::glosslist| + preceding-sibling::simplelist[@type !='inline']| + preceding-sibling::segmentedlist| + preceding-sibling::caution| + preceding-sibling::important| + preceding-sibling::note| + preceding-sibling::tip| + preceding-sibling::warning)"> + <xsl:text>.RS</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text> </xsl:text> + <xsl:value-of select="$list-indent"/> + </xsl:if> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:when> + </xsl:choose> + </xsl:template> + + <!-- * Check to see if we were called from a block within a footnote or --> + <!-- * annotation; if so, and the block contains any nested block --> + <!-- * content, then we know the mark.up.block.end template was already --> + <!-- * called to generate a .RS macro to indent that nested block --> + <!-- * content; so we need to generated a .RE to set the margin back to --> + <!-- * where it was prior to the .RS call. --> + <xsl:template name="mark.up.block.end"> + <xsl:if test="(ancestor::footnote + or ancestor::annotation)"> + <xsl:if test="address| + literallayout| + programlisting| + screen| + synopsis| + itemizedlist| + orderedlist| + variablelist| + glosslist| + simplelist[@type !='inline']| + segmentedlist| + caution| + important| + note| + tip| + warning"> + <xsl:text> </xsl:text> + <xsl:text>.RE</xsl:text> + <xsl:text> </xsl:text> + </xsl:if> + </xsl:if> + </xsl:template> + + <!-- ================================================================== --> + <!-- * The person.name template in the HTML stylesheets outputs extra --> <!-- * spaces that we need to strip out for manpages output. This --> <!-- * template calls person.name, then tries to do some smart --> Modified: trunk/xsl/params/man.indent.lists.xml =================================================================== --- trunk/xsl/params/man.indent.lists.xml 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/params/man.indent.lists.xml 2006-09-21 09:44:24 UTC (rev 6310) @@ -24,7 +24,7 @@ <sgmltag>variablelist</sgmltag> output (and output of some other lists) is set to the value of the <parameter>man.indent.width</parameter> parameter -(<literal>3n</literal> by default). If instead the value of +(<literal>4n</literal> by default). If instead the value of <parameter>man.indent.lists</parameter> is zero, the built-in roff default width (<literal>7.2n</literal>) is used.</para> Modified: trunk/xsl/params/man.indent.width.xml =================================================================== --- trunk/xsl/params/man.indent.width.xml 2006-09-19 14:53:14 UTC (rev 6309) +++ trunk/xsl/params/man.indent.width.xml 2006-09-21 09:44:24 UTC (rev 6310) @@ -8,7 +8,7 @@ <refsynopsisdiv> <src:fragment id='man.indent.width.frag'> -<xsl:param name="man.indent.width">3n</xsl:param> +<xsl:param name="man.indent.width">4</xsl:param> </src:fragment> </refsynopsisdiv> @@ -23,8 +23,8 @@ <para>The value of <parameter>man.indent.width</parameter> should include a valid roff measurement unit (for example, <literal>n</literal> or <literal>u</literal>). The default value of -<literal>3n</literal> specifies a 3-en width; when viewed on a -console, that amounts to the width of three characters. For details +<literal>4n</literal> specifies a 4-en width; when viewed on a +console, that amounts to the width of four characters. For details about roff measurment units, see the <literal>Measurements</literal> node in the groff info page.</para> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2006-09-21 12:42:43
|
Revision: 6311 http://svn.sourceforge.net/docbook/?rev=6311&view=rev Author: kosek Date: 2006-09-21 05:42:15 -0700 (Thu, 21 Sep 2006) Log Message: ----------- Added support for profiling based on xml:lang and status attributes. Modified Paths: -------------- trunk/xsl/fo/param.ent trunk/xsl/fo/param.xweb trunk/xsl/html/param.ent trunk/xsl/html/param.xweb trunk/xsl/profiling/profile-mode.xsl trunk/xsl/profiling/profile.xsl Added Paths: ----------- trunk/xsl/params/profile.status.xml Modified: trunk/xsl/fo/param.ent =================================================================== --- trunk/xsl/fo/param.ent 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/fo/param.ent 2006-09-21 12:42:15 UTC (rev 6311) @@ -155,6 +155,7 @@ <!ENTITY profile.role SYSTEM "../params/profile.role.xml"> <!ENTITY profile.security SYSTEM "../params/profile.security.xml"> <!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> +<!ENTITY profile.status SYSTEM "../params/profile.status.xml"> <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml"> <!ENTITY profile.value SYSTEM "../params/profile.value.xml"> <!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> Modified: trunk/xsl/fo/param.xweb =================================================================== --- trunk/xsl/fo/param.xweb 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/fo/param.xweb 2006-09-21 12:42:15 UTC (rev 6311) @@ -504,6 +504,7 @@ &profile.revisionflag; &profile.role; &profile.security; +&profile.status; &profile.userlevel; &profile.vendor; &profile.attribute; @@ -765,6 +766,7 @@ <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> <src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.status.frag"/> <src:fragref linkend="profile.userlevel.frag"/> <src:fragref linkend="profile.value.frag"/> <src:fragref linkend="profile.vendor.frag"/> Modified: trunk/xsl/html/param.ent =================================================================== --- trunk/xsl/html/param.ent 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/html/param.ent 2006-09-21 12:42:15 UTC (rev 6311) @@ -194,6 +194,7 @@ <!ENTITY profile.role SYSTEM "../params/profile.role.xml"> <!ENTITY profile.security SYSTEM "../params/profile.security.xml"> <!ENTITY profile.separator SYSTEM "../params/profile.separator.xml"> +<!ENTITY profile.status SYSTEM "../params/profile.status.xml"> <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml"> <!ENTITY profile.value SYSTEM "../params/profile.value.xml"> <!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml"> Modified: trunk/xsl/html/param.xweb =================================================================== --- trunk/xsl/html/param.xweb 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/html/param.xweb 2006-09-21 12:42:15 UTC (rev 6311) @@ -367,6 +367,7 @@ &profile.revisionflag; &profile.role; &profile.security; +&profile.status; &profile.userlevel; &profile.vendor; &profile.attribute; @@ -689,6 +690,7 @@ <src:fragref linkend="profile.role.frag"/> <src:fragref linkend="profile.security.frag"/> <src:fragref linkend="profile.separator.frag"/> +<src:fragref linkend="profile.status.frag"/> <src:fragref linkend="profile.userlevel.frag"/> <src:fragref linkend="profile.value.frag"/> <src:fragref linkend="profile.vendor.frag"/> Added: trunk/xsl/params/profile.status.xml =================================================================== --- trunk/xsl/params/profile.status.xml (rev 0) +++ trunk/xsl/params/profile.status.xml 2006-09-21 12:42:15 UTC (rev 6311) @@ -0,0 +1,35 @@ +<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + id="profile.status"> +<refmeta> +<refentrytitle>profile.status</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>profile.status</refname> +<refpurpose>Target profile for <sgmltag class="attribute">status</sgmltag> +attribute</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id='profile.status.frag'> +<xsl:param name="profile.status" select="''"/> +</src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Value of this parameter specifies profiles which should be +included in the output. You can specify multiple profiles by +separating them by semicolon. You can change separator character by +<parameter>profile.separator</parameter> +parameter.</para> + +<para>This parameter has effect only when you are using profiling +stylesheets (<filename>profile-docbook.xsl</filename>, +<filename>profile-chunk.xsl</filename>, …) instead of normal +ones (<filename>docbook.xsl</filename>, +<filename>chunk.xsl</filename>, …).</para> + +</refsect1> +</refentry> Modified: trunk/xsl/profiling/profile-mode.xsl =================================================================== --- trunk/xsl/profiling/profile-mode.xsl 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/profiling/profile-mode.xsl 2006-09-21 12:42:15 UTC (rev 6311) @@ -48,15 +48,15 @@ $conformance.content != '' or @conformance = ''"/> <xsl:variable name="lang.content"> - <xsl:if test="@lang"> + <xsl:if test="@lang | @xml:lang"> <xsl:call-template name="cross.compare"> <xsl:with-param name="a" select="$profile.lang"/> - <xsl:with-param name="b" select="@lang"/> + <xsl:with-param name="b" select="(@lang | @xml:lang)[1]"/> </xsl:call-template> </xsl:if> </xsl:variable> - <xsl:variable name="lang.ok" select="not(@lang) or not($profile.lang) or - $lang.content != '' or @lang = ''"/> + <xsl:variable name="lang.ok" select="not(@lang | @xml:lang) or not($profile.lang) or + $lang.content != '' or @lang = '' or @xml:lang = ''"/> <xsl:variable name="os.content"> <xsl:if test="@os"> @@ -113,6 +113,17 @@ <xsl:variable name="security.ok" select="not(@security) or not($profile.security) or $security.content != '' or @security = ''"/> + <xsl:variable name="status.content"> + <xsl:if test="@status"> + <xsl:call-template name="cross.compare"> + <xsl:with-param name="a" select="$profile.status"/> + <xsl:with-param name="b" select="@status"/> + </xsl:call-template> + </xsl:if> + </xsl:variable> + <xsl:variable name="status.ok" select="not(@status) or not($profile.status) or + $status.content != '' or @status = ''"/> + <xsl:variable name="userlevel.content"> <xsl:if test="@userlevel"> <xsl:call-template name="cross.compare"> @@ -150,7 +161,7 @@ <xsl:if test="$arch.ok and $condition.ok and $conformance.ok and $lang.ok and $os.ok and $revision.ok and $revisionflag.ok and $role.ok and $security.ok - and $userlevel.ok and $vendor.ok and $attribute.ok"> + and $status.ok and $userlevel.ok and $vendor.ok and $attribute.ok"> <xsl:copy> <xsl:copy-of select="@*"/> Modified: trunk/xsl/profiling/profile.xsl =================================================================== --- trunk/xsl/profiling/profile.xsl 2006-09-21 09:44:24 UTC (rev 6310) +++ trunk/xsl/profiling/profile.xsl 2006-09-21 12:42:15 UTC (rev 6311) @@ -31,6 +31,7 @@ <xsl:param name="profile.revisionflag" select="''"/> <xsl:param name="profile.role" select="''"/> <xsl:param name="profile.security" select="''"/> +<xsl:param name="profile.status" select="''"/> <xsl:param name="profile.userlevel" select="''"/> <xsl:param name="profile.vendor" select="''"/> <xsl:param name="profile.attribute" select="''"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-08 06:13:29
|
Revision: 6346 http://svn.sourceforge.net/docbook/?rev=6346&view=rev Author: bobstayton Date: 2006-10-07 23:13:19 -0700 (Sat, 07 Oct 2006) Log Message: ----------- Made xref template target variables into params to fix bug #1559689. Modified Paths: -------------- trunk/xsl/fo/xref.xsl trunk/xsl/html/xref.xsl Modified: trunk/xsl/fo/xref.xsl =================================================================== --- trunk/xsl/fo/xref.xsl 2006-10-04 11:49:42 UTC (rev 6345) +++ trunk/xsl/fo/xref.xsl 2006-10-08 06:13:19 UTC (rev 6346) @@ -24,9 +24,9 @@ <!-- ==================================================================== --> <xsl:template match="xref" name="xref"> - <xsl:variable name="targets" select="key('id',@linkend)"/> - <xsl:variable name="target" select="$targets[1]"/> - <xsl:variable name="refelem" select="local-name($target)"/> + <xsl:param name="targets" select="key('id',@linkend)"/> + <xsl:param name="target" select="$targets[1]"/> + <xsl:param name="refelem" select="local-name($target)"/> <xsl:call-template name="check.id.unique"> <xsl:with-param name="linkend" select="@linkend"/> Modified: trunk/xsl/html/xref.xsl =================================================================== --- trunk/xsl/html/xref.xsl 2006-10-04 11:49:42 UTC (rev 6345) +++ trunk/xsl/html/xref.xsl 2006-10-08 06:13:19 UTC (rev 6346) @@ -25,8 +25,8 @@ <xsl:template match="xref" name="xref"> <xsl:param name="targets" select="key('id',@linkend)"/> - <xsl:variable name="target" select="$targets[1]"/> - <xsl:variable name="refelem" select="local-name($target)"/> + <xsl:param name="target" select="$targets[1]"/> + <xsl:param name="refelem" select="local-name($target)"/> <xsl:call-template name="check.id.unique"> <xsl:with-param name="linkend" select="@linkend"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-08 06:59:54
|
Revision: 6347 http://svn.sourceforge.net/docbook/?rev=6347&view=rev Author: bobstayton Date: 2006-10-07 23:59:48 -0700 (Sat, 07 Oct 2006) Log Message: ----------- Fixed bug 1566358 to add space between orgname and orgdiv. Modified Paths: -------------- trunk/xsl/fo/titlepage.xsl trunk/xsl/html/titlepage.xsl Modified: trunk/xsl/fo/titlepage.xsl =================================================================== --- trunk/xsl/fo/titlepage.xsl 2006-10-08 06:13:19 UTC (rev 6346) +++ trunk/xsl/fo/titlepage.xsl 2006-10-08 06:59:48 UTC (rev 6347) @@ -435,6 +435,9 @@ </xsl:template> <xsl:template match="orgdiv" mode="titlepage.mode"> + <xsl:if test="preceding-sibling::*[1][self::orgname]"> + <xsl:text> </xsl:text> + </xsl:if> <xsl:apply-templates mode="titlepage.mode"/> </xsl:template> Modified: trunk/xsl/html/titlepage.xsl =================================================================== --- trunk/xsl/html/titlepage.xsl 2006-10-08 06:13:19 UTC (rev 6346) +++ trunk/xsl/html/titlepage.xsl 2006-10-08 06:59:48 UTC (rev 6347) @@ -550,6 +550,9 @@ </xsl:template> <xsl:template match="orgdiv" mode="titlepage.mode"> + <xsl:if test="preceding-sibling::*[1][self::orgname]"> + <xsl:text> </xsl:text> + </xsl:if> <span class="{name(.)}"> <xsl:apply-templates mode="titlepage.mode"/> <br/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-09 06:30:09
|
Revision: 6350 http://svn.sourceforge.net/docbook/?rev=6350&view=rev Author: bobstayton Date: 2006-10-08 23:29:58 -0700 (Sun, 08 Oct 2006) Log Message: ----------- Add support for Xalan to add root node xml:base for db5 docs. Modified Paths: -------------- trunk/xsl/fo/docbook.xsl trunk/xsl/html/chunk-code.xsl trunk/xsl/html/docbook.xsl Modified: trunk/xsl/fo/docbook.xsl =================================================================== --- trunk/xsl/fo/docbook.xsl 2006-10-09 06:27:01 UTC (rev 6349) +++ trunk/xsl/fo/docbook.xsl 2006-10-09 06:29:58 UTC (rev 6350) @@ -117,13 +117,17 @@ <xsl:template match="/"> <xsl:choose> - <xsl:when test="function-available('exsl:node-set') - and (*/self::ng:* or */self::db:*)"> + <!-- include extra test for Xalan quirk --> + <xsl:when test="(function-available('exsl:node-set') or + contains(system-property('xsl:vendor'), + 'Apache Software Foundation')) + and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, toss the namespace and continue. Someday we'll reverse this logic and add the namespace to documents that don't have one. But not before the whole stylesheet has been converted to use namespaces. i.e., don't hold your breath --> + <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> <xsl:apply-templates mode="stripNS"/> </xsl:variable> Modified: trunk/xsl/html/chunk-code.xsl =================================================================== --- trunk/xsl/html/chunk-code.xsl 2006-10-09 06:27:01 UTC (rev 6349) +++ trunk/xsl/html/chunk-code.xsl 2006-10-09 06:29:58 UTC (rev 6350) @@ -467,14 +467,17 @@ <xsl:template match="/"> <xsl:choose> - <xsl:when test="function-available('exsl:node-set') - and (*/self::ng:* or */self::db:*)"> + <!-- include extra test for Xalan quirk --> + <xsl:when test="(function-available('exsl:node-set') or + contains(system-property('xsl:vendor'), + 'Apache Software Foundation')) + and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, toss the namespace and continue. Someday we'll reverse this logic and add the namespace to documents that don't have one. But not before the whole stylesheet has been converted to use namespaces. i.e., don't hold your breath --> - <xsl:message>Stripping NS from DocBook 5/NG document.</xsl:message> + <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> <xsl:apply-templates mode="stripNS"/> </xsl:variable> Modified: trunk/xsl/html/docbook.xsl =================================================================== --- trunk/xsl/html/docbook.xsl 2006-10-09 06:27:01 UTC (rev 6349) +++ trunk/xsl/html/docbook.xsl 2006-10-09 06:29:58 UTC (rev 6350) @@ -85,13 +85,16 @@ <xsl:template match="*"> <xsl:message> - <xsl:text>No template matches </xsl:text> - <xsl:value-of select="name(.)"/> + <xsl:text>Element </xsl:text> + <xsl:value-of select="local-name(.)"/> + <xsl:text> in namespace '</xsl:text> + <xsl:value-of select="namespace-uri(.)"/> + <xsl:text>' encountered</xsl:text> <xsl:if test="parent::*"> <xsl:text> in </xsl:text> <xsl:value-of select="name(parent::*)"/> </xsl:if> - <xsl:text>.</xsl:text> + <xsl:text>, but no template matches.</xsl:text> </xsl:message> <font color="red"> @@ -324,14 +327,17 @@ <xsl:template match="/"> <xsl:choose> - <xsl:when test="function-available('exsl:node-set') - and (*/self::ng:* or */self::db:*)"> + <!-- include extra test for Xalan quirk --> + <xsl:when test="(function-available('exsl:node-set') or + contains(system-property('xsl:vendor'), + 'Apache Software Foundation')) + and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, toss the namespace and continue. Someday we'll reverse this logic and add the namespace to documents that don't have one. But not before the whole stylesheet has been converted to use namespaces. i.e., don't hold your breath --> - <xsl:message>Stripping NS from DocBook 5/NG document.</xsl:message> + <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> <xsl:apply-templates mode="stripNS"/> </xsl:variable> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-10-09 07:35:24
|
Revision: 6351 http://svn.sourceforge.net/docbook/?rev=6351&view=rev Author: bobstayton Date: 2006-10-09 00:35:16 -0700 (Mon, 09 Oct 2006) Log Message: ----------- Terminate with message if processing DB5 and cannot strip the namespace. Modified Paths: -------------- trunk/xsl/fo/docbook.xsl trunk/xsl/html/chunk-code.xsl trunk/xsl/html/docbook.xsl Modified: trunk/xsl/fo/docbook.xsl =================================================================== --- trunk/xsl/fo/docbook.xsl 2006-10-09 06:29:58 UTC (rev 6350) +++ trunk/xsl/fo/docbook.xsl 2006-10-09 07:35:16 UTC (rev 6351) @@ -2,8 +2,8 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:fo="http://www.w3.org/1999/XSL/Format" - xmlns:ng="http://docbook.org/docbook-ng" - xmlns:db="http://docbook.org/ns/docbook" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" exclude-result-prefixes="db ng exsl" version='1.0'> @@ -123,16 +123,23 @@ 'Apache Software Foundation')) and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, - toss the namespace and continue. Someday we'll reverse this logic - and add the namespace to documents that don't have one. - But not before the whole stylesheet has been converted to use - namespaces. i.e., don't hold your breath --> + toss the namespace and continue. Someday we'll reverse this logic + and add the namespace to documents that don't have one. + But not before the whole stylesheet has been converted to use + namespaces. i.e., don't hold your breath --> <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> <xsl:apply-templates mode="stripNS"/> </xsl:variable> <xsl:apply-templates select="exsl:node-set($nons)"/> </xsl:when> + <!-- Can't process unless namespace removed --> + <xsl:when test="*/self::ng:* or */self::db:*"> + <xsl:message terminate="yes"> + <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text> + <xsl:text> cannot proceed.</xsl:text> + </xsl:message> + </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="$rootid != ''"> @@ -243,12 +250,12 @@ <xsl:if test="$fop1.extensions != 0"> <xsl:variable name="bookmarks"> <xsl:apply-templates select="$document.element" - mode="fop1.outline"/> + mode="fop1.outline"/> </xsl:variable> <xsl:if test="string($bookmarks) != ''"> <fo:bookmark-tree> <xsl:copy-of select="$bookmarks"/> - </fo:bookmark-tree> + </fo:bookmark-tree> </xsl:if> </xsl:if> @@ -265,13 +272,13 @@ <xsl:if test="$arbortext.extensions != 0 and $ati.xsl11.bookmarks != 0"> <xsl:variable name="bookmarks"> - <xsl:apply-templates select="$document.element" - mode="ati.xsl11.bookmarks"/> + <xsl:apply-templates select="$document.element" + mode="ati.xsl11.bookmarks"/> </xsl:variable> <xsl:if test="string($bookmarks) != ''"> - <fo:bookmark-tree> - <xsl:copy-of select="$bookmarks"/> - </fo:bookmark-tree> + <fo:bookmark-tree> + <xsl:copy-of select="$bookmarks"/> + </fo:bookmark-tree> </xsl:if> </xsl:if> Modified: trunk/xsl/html/chunk-code.xsl =================================================================== --- trunk/xsl/html/chunk-code.xsl 2006-10-09 06:29:58 UTC (rev 6350) +++ trunk/xsl/html/chunk-code.xsl 2006-10-09 07:35:16 UTC (rev 6351) @@ -1,8 +1,8 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" - xmlns:ng="http://docbook.org/docbook-ng" - xmlns:db="http://docbook.org/ns/docbook" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" version="1.0" exclude-result-prefixes="exsl cf ng db"> @@ -248,7 +248,7 @@ |preceding::bibliography[parent::article or parent::book or parent::part][1] |preceding::glossary[parent::article or parent::book or parent::part][1] |preceding::index[$generate.index != 0] - [parent::article or parent::book or parent::part][1] + [parent::article or parent::book or parent::part][1] |preceding::setindex[$generate.index != 0][1] |ancestor::set |ancestor::book[1] @@ -333,7 +333,7 @@ |following::bibliography[parent::article or parent::book or parent::part][1] |following::glossary[parent::article or parent::book or parent::part][1] |following::index[$generate.index != 0] - [parent::article or parent::book or parent::part][1] + [parent::article or parent::book or parent::part][1] |following::article[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] @@ -344,7 +344,7 @@ |descendant::bibliography[parent::article or parent::book or parent::part][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] - [parent::article or parent::book or parent::part][1] + [parent::article or parent::book or parent::part][1] |descendant::colophon[1] |descendant::setindex[$generate.index != 0][1] |descendant::part[1] @@ -394,7 +394,7 @@ |preceding::bibliography[parent::article or parent::book or parent::part][1] |preceding::glossary[parent::article or parent::book or parent::part][1] |preceding::index[$generate.index != 0] - [parent::article or parent::book or parent::part][1] + [parent::article or parent::book or parent::part][1] |preceding::setindex[$generate.index != 0][1] |ancestor::set |ancestor::book[1] @@ -436,7 +436,7 @@ |following::bibliography[parent::article or parent::book or parent::part][1] |following::glossary[parent::article or parent::book or parent::part][1] |following::index[$generate.index != 0] - [parent::article or parent::book][1] + [parent::article or parent::book][1] |following::article[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] @@ -447,7 +447,7 @@ |descendant::bibliography[parent::article or parent::book][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] - [parent::article or parent::book][1] + [parent::article or parent::book][1] |descendant::colophon[1] |descendant::setindex[$generate.index != 0][1] |descendant::part[1] @@ -473,67 +473,74 @@ 'Apache Software Foundation')) and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, - toss the namespace and continue. Someday we'll reverse this logic - and add the namespace to documents that don't have one. - But not before the whole stylesheet has been converted to use - namespaces. i.e., don't hold your breath --> + toss the namespace and continue. Someday we'll reverse this logic + and add the namespace to documents that don't have one. + But not before the whole stylesheet has been converted to use + namespaces. i.e., don't hold your breath --> <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> - <xsl:apply-templates mode="stripNS"/> + <xsl:apply-templates mode="stripNS"/> </xsl:variable> <xsl:message>Processing stripped document.</xsl:message> <xsl:apply-templates select="exsl:node-set($nons)"/> </xsl:when> + <!-- Can't process unless namespace removed --> + <xsl:when test="*/self::ng:* or */self::db:*"> + <xsl:message terminate="yes"> + <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text> + <xsl:text> cannot proceed.</xsl:text> + </xsl:message> + </xsl:when> <xsl:otherwise> <xsl:choose> - <xsl:when test="$rootid != ''"> - <xsl:choose> - <xsl:when test="count(key('id',$rootid)) = 0"> - <xsl:message terminate="yes"> - <xsl:text>ID '</xsl:text> - <xsl:value-of select="$rootid"/> - <xsl:text>' not found in document.</xsl:text> - </xsl:message> - </xsl:when> - <xsl:otherwise> - <xsl:if test="$collect.xref.targets = 'yes' or - $collect.xref.targets = 'only'"> - <xsl:apply-templates select="key('id', $rootid)" - mode="collect.targets"/> - </xsl:if> - <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="key('id',$rootid)" - mode="process.root"/> - <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="key('id',$rootid)" - mode="collect.tex.math"/> - </xsl:if> - <xsl:if test="$generate.manifest != 0"> - <xsl:call-template name="generate.manifest"> - <xsl:with-param name="node" select="key('id',$rootid)"/> - </xsl:call-template> - </xsl:if> - </xsl:if> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:if test="$collect.xref.targets = 'yes' or - $collect.xref.targets = 'only'"> - <xsl:apply-templates select="/" mode="collect.targets"/> - </xsl:if> - <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="/" mode="process.root"/> - <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="/" mode="collect.tex.math"/> - </xsl:if> - <xsl:if test="$generate.manifest != 0"> - <xsl:call-template name="generate.manifest"> - <xsl:with-param name="node" select="/"/> - </xsl:call-template> - </xsl:if> - </xsl:if> - </xsl:otherwise> + <xsl:when test="$rootid != ''"> + <xsl:choose> + <xsl:when test="count(key('id',$rootid)) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="key('id', $rootid)" + mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="key('id',$rootid)" + mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="key('id',$rootid)" + mode="collect.tex.math"/> + </xsl:if> + <xsl:if test="$generate.manifest != 0"> + <xsl:call-template name="generate.manifest"> + <xsl:with-param name="node" select="key('id',$rootid)"/> + </xsl:call-template> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="/" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="/" mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="/" mode="collect.tex.math"/> + </xsl:if> + <xsl:if test="$generate.manifest != 0"> + <xsl:call-template name="generate.manifest"> + <xsl:with-param name="node" select="/"/> + </xsl:call-template> + </xsl:if> + </xsl:if> + </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> @@ -736,11 +743,11 @@ <xsl:with-param name="next" select="/foo"/> <xsl:with-param name="nav.context" select="'toc'"/> <xsl:with-param name="content"> - <xsl:if test="$chunk.tocs.and.lots.has.title != 0"> - <h1> - <xsl:apply-templates select="." mode="object.title.markup"/> - </h1> - </xsl:if> + <xsl:if test="$chunk.tocs.and.lots.has.title != 0"> + <h1> + <xsl:apply-templates select="." mode="object.title.markup"/> + </h1> + </xsl:if> <xsl:copy-of select="$lots"/> </xsl:with-param> </xsl:call-template> @@ -994,18 +1001,18 @@ <!-- FIXME: When chunking, only the annotations actually used in this chunk should be referenced. I don't think it - does any harm to reference them all, but it adds - unnecessary bloat to each chunk. --> + does any harm to reference them all, but it adds + unnecessary bloat to each chunk. --> <xsl:if test="$annotation.support != 0 and //annotation"> <div class="annotation-list"> <div class="annotation-nocss"> - <p>The following annotations are from this essay. You are seeing - them here because your browser doesn’t support the user-interface - techniques used to make them appear as ‘popups’ on modern browsers.</p> + <p>The following annotations are from this essay. You are seeing + them here because your browser doesn’t support the user-interface + techniques used to make them appear as ‘popups’ on modern browsers.</p> </div> <xsl:apply-templates select="//annotation" - mode="annotation-popup"/> + mode="annotation-popup"/> </div> </xsl:if> </xsl:template> Modified: trunk/xsl/html/docbook.xsl =================================================================== --- trunk/xsl/html/docbook.xsl 2006-10-09 06:29:58 UTC (rev 6350) +++ trunk/xsl/html/docbook.xsl 2006-10-09 07:35:16 UTC (rev 6351) @@ -1,7 +1,7 @@ <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:ng="http://docbook.org/docbook-ng" - xmlns:db="http://docbook.org/ns/docbook" + xmlns:ng="http://docbook.org/docbook-ng" + xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" exclude-result-prefixes="db ng exsl" version='1.0'> @@ -266,24 +266,24 @@ <!-- FIXME: When chunking, only the annotations actually used in this chunk should be referenced. I don't think it - does any harm to reference them all, but it adds - unnecessary bloat to each chunk. --> + does any harm to reference them all, but it adds + unnecessary bloat to each chunk. --> <xsl:if test="$annotation.support != 0 and //annotation"> <xsl:call-template name="add.annotation.links"/> <script type="text/javascript"> <xsl:text> // Create PopupWindow objects</xsl:text> <xsl:for-each select="//annotation"> - <xsl:text> var popup_</xsl:text> - <xsl:value-of select="generate-id(.)"/> - <xsl:text> = new PopupWindow("popup-</xsl:text> - <xsl:value-of select="generate-id(.)"/> - <xsl:text>"); </xsl:text> - <xsl:text>popup_</xsl:text> - <xsl:value-of select="generate-id(.)"/> - <xsl:text>.offsetY = 15; </xsl:text> - <xsl:text>popup_</xsl:text> - <xsl:value-of select="generate-id(.)"/> - <xsl:text>.autoHide(); </xsl:text> + <xsl:text> var popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text> = new PopupWindow("popup-</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>"); </xsl:text> + <xsl:text>popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>.offsetY = 15; </xsl:text> + <xsl:text>popup_</xsl:text> + <xsl:value-of select="generate-id(.)"/> + <xsl:text>.autoHide(); </xsl:text> </xsl:for-each> </script> @@ -333,67 +333,74 @@ 'Apache Software Foundation')) and (*/self::ng:* or */self::db:*)"> <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, - toss the namespace and continue. Someday we'll reverse this logic - and add the namespace to documents that don't have one. - But not before the whole stylesheet has been converted to use - namespaces. i.e., don't hold your breath --> + toss the namespace and continue. Someday we'll reverse this logic + and add the namespace to documents that don't have one. + But not before the whole stylesheet has been converted to use + namespaces. i.e., don't hold your breath --> <xsl:message>Stripping namespace from DocBook 5 document.</xsl:message> <xsl:variable name="nons"> - <xsl:apply-templates mode="stripNS"/> + <xsl:apply-templates mode="stripNS"/> </xsl:variable> <!-- <xsl:message>Saving stripped document.</xsl:message> <xsl:call-template name="write.chunk"> - <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/> - <xsl:with-param name="method" select="'xml'"/> - <xsl:with-param name="content"> - <xsl:copy-of select="exsl:node-set($nons)"/> - </xsl:with-param> + <xsl:with-param name="filename" select="'/tmp/stripped.xml'"/> + <xsl:with-param name="method" select="'xml'"/> + <xsl:with-param name="content"> + <xsl:copy-of select="exsl:node-set($nons)"/> + </xsl:with-param> </xsl:call-template> --> <xsl:message>Processing stripped document.</xsl:message> <xsl:apply-templates select="exsl:node-set($nons)"/> </xsl:when> + <!-- Can't process unless namespace removed --> + <xsl:when test="*/self::ng:* or */self::db:*"> + <xsl:message terminate="yes"> + <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text> + <xsl:text> cannot proceed.</xsl:text> + </xsl:message> + </xsl:when> <xsl:otherwise> <xsl:choose> - <xsl:when test="$rootid != ''"> - <xsl:choose> - <xsl:when test="count(key('id',$rootid)) = 0"> - <xsl:message terminate="yes"> - <xsl:text>ID '</xsl:text> - <xsl:value-of select="$rootid"/> - <xsl:text>' not found in document.</xsl:text> - </xsl:message> - </xsl:when> - <xsl:otherwise> - <xsl:if test="$collect.xref.targets = 'yes' or - $collect.xref.targets = 'only'"> - <xsl:apply-templates select="key('id', $rootid)" - mode="collect.targets"/> - </xsl:if> - <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="key('id',$rootid)" - mode="process.root"/> - <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="key('id',$rootid)" - mode="collect.tex.math"/> - </xsl:if> - </xsl:if> - </xsl:otherwise> - </xsl:choose> - </xsl:when> - <xsl:otherwise> - <xsl:if test="$collect.xref.targets = 'yes' or - $collect.xref.targets = 'only'"> - <xsl:apply-templates select="/" mode="collect.targets"/> - </xsl:if> - <xsl:if test="$collect.xref.targets != 'only'"> - <xsl:apply-templates select="/" mode="process.root"/> - <xsl:if test="$tex.math.in.alt != ''"> - <xsl:apply-templates select="/" mode="collect.tex.math"/> - </xsl:if> - </xsl:if> - </xsl:otherwise> + <xsl:when test="$rootid != ''"> + <xsl:choose> + <xsl:when test="count(key('id',$rootid)) = 0"> + <xsl:message terminate="yes"> + <xsl:text>ID '</xsl:text> + <xsl:value-of select="$rootid"/> + <xsl:text>' not found in document.</xsl:text> + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="key('id', $rootid)" + mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="key('id',$rootid)" + mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="key('id',$rootid)" + mode="collect.tex.math"/> + </xsl:if> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:if test="$collect.xref.targets = 'yes' or + $collect.xref.targets = 'only'"> + <xsl:apply-templates select="/" mode="collect.targets"/> + </xsl:if> + <xsl:if test="$collect.xref.targets != 'only'"> + <xsl:apply-templates select="/" mode="process.root"/> + <xsl:if test="$tex.math.in.alt != ''"> + <xsl:apply-templates select="/" mode="collect.tex.math"/> + </xsl:if> + </xsl:if> + </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2006-10-10 14:10:53
|
Revision: 6352 http://svn.sourceforge.net/docbook/?rev=6352&view=rev Author: kosek Date: 2006-10-10 07:10:29 -0700 (Tue, 10 Oct 2006) Log Message: ----------- For backward compatability autoidx-ng.xsl is invoking "kosek" indexing method again. Modified Paths: -------------- trunk/xsl/fo/autoidx-kosek.xsl trunk/xsl/fo/autoidx-ng.xsl trunk/xsl/html/autoidx-kosek.xsl trunk/xsl/html/autoidx-ng.xsl Removed Paths: ------------- trunk/xsl/common/autoidx-ng.xsl Deleted: trunk/xsl/common/autoidx-ng.xsl =================================================================== --- trunk/xsl/common/autoidx-ng.xsl 2006-10-09 07:35:16 UTC (rev 6351) +++ trunk/xsl/common/autoidx-ng.xsl 2006-10-10 14:10:29 UTC (rev 6352) @@ -1,146 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE xsl:stylesheet [ -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> -<!-- Documents using the kimber index method must have a lang attribute --> -<!-- Only one of these should be present in the entity --> - -<!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'> -]> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0" - xmlns:func="http://exslt.org/functions" - xmlns:exslt="http://exslt.org/common" - xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" - xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService" - extension-element-prefixes="func exslt" - exclude-result-prefixes="func exslt i l k" - xmlns:i="urn:cz-kosek:functions:index"> - -<!-- ******************************************************************** - $Id$ - ******************************************************************** - - This file is part of the DocBook XSL Stylesheet distribution. - See ../README or http://docbook.sf.net/ for copyright - and other information. - - ******************************************************************** --> - -<!-- Returns index group code for given term --> -<func:function name="i:group-index"> - <xsl:param name="term"/> - - <xsl:variable name="letters-rtf"> - <xsl:variable name="lang"> - <xsl:call-template name="l10n.language"/> - </xsl:variable> - - <xsl:variable name="local.l10n.letters" - select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/> - - <xsl:variable name="l10n.letters" - select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/> - - <xsl:choose> - <xsl:when test="count($local.l10n.letters) > 0"> - <xsl:copy-of select="$local.l10n.letters"/> - </xsl:when> - <xsl:when test="count($l10n.letters) > 0"> - <xsl:copy-of select="$l10n.letters"/> - </xsl:when> - <xsl:otherwise> - <xsl:message> - <xsl:text>No "</xsl:text> - <xsl:value-of select="$lang"/> - <xsl:text>" localization of index grouping letters exists</xsl:text> - <xsl:choose> - <xsl:when test="$lang = 'en'"> - <xsl:text>.</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>; using "en".</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:message> - - <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/> - - <xsl:variable name="long-letter-index" select="$letters/l:l[. = substring($term,1,2)]/@i"/> - <xsl:variable name="short-letter-index" select="$letters/l:l[. = substring($term,1,1)]/@i"/> - <xsl:variable name="letter-index"> - <xsl:choose> - <xsl:when test="$long-letter-index"> - <xsl:value-of select="$long-letter-index"/> - </xsl:when> - <xsl:when test="$short-letter-index"> - <xsl:value-of select="$short-letter-index"/> - </xsl:when> - <xsl:otherwise>0</xsl:otherwise> - </xsl:choose> - </xsl:variable> - <func:result select="number($letter-index)"/> -</func:function> - -<!-- Return index group letter for given group code --> -<func:function name="i:group-letter"> - <xsl:param name="index"/> - - <xsl:variable name="letters-rtf"> - <xsl:variable name="lang"> - <xsl:call-template name="l10n.language"/> - </xsl:variable> - - <xsl:variable name="local.l10n.letters" - select="($local.l10n.xml//l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/> - - <xsl:variable name="l10n.letters" - select="($l10n.xml/l:i18n/l:l10n[@language=$lang]/l:letters)[1]"/> - - <xsl:choose> - <xsl:when test="count($local.l10n.letters) > 0"> - <xsl:copy-of select="$local.l10n.letters"/> - </xsl:when> - <xsl:when test="count($l10n.letters) > 0"> - <xsl:copy-of select="$l10n.letters"/> - </xsl:when> - <xsl:otherwise> - <xsl:message> - <xsl:text>No "</xsl:text> - <xsl:value-of select="$lang"/> - <xsl:text>" localization of index grouping letters exists</xsl:text> - <xsl:choose> - <xsl:when test="$lang = 'en'"> - <xsl:text>.</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>; using "en".</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:message> - - <xsl:copy-of select="($l10n.xml/l:i18n/l:l10n[@language='en']/l:letters)[1]"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="letters" select="exslt:node-set($letters-rtf)/*"/> - - <func:result select="$letters/l:l[@i=$index][1]"/> -</func:function> - -<!-- The following key used in the kosek indexing method. --> -<xsl:key name="group-code" - match="indexterm" - use="i:group-index(&primary;)"/> - -<!-- The following key used in the kimber indexing method. --> -<xsl:key name="k-group" - match="indexterm" - use="k:getIndexGroupKey(⟨, &primary;)"/> - -</xsl:stylesheet> Modified: trunk/xsl/fo/autoidx-kosek.xsl =================================================================== --- trunk/xsl/fo/autoidx-kosek.xsl 2006-10-09 07:35:16 UTC (rev 6351) +++ trunk/xsl/fo/autoidx-kosek.xsl 2006-10-10 14:10:29 UTC (rev 6352) @@ -72,7 +72,7 @@ <xsl:message terminate="yes"> <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text> <xsl:text>index extension functions be imported:
</xsl:text> - <xsl:text> xsl:import href="common/autoidx-ng.xsl"</xsl:text> + <xsl:text> xsl:import href="common/autoidx-kosek.xsl"</xsl:text> </xsl:message> </xsl:if> Modified: trunk/xsl/fo/autoidx-ng.xsl =================================================================== --- trunk/xsl/fo/autoidx-ng.xsl 2006-10-09 07:35:16 UTC (rev 6351) +++ trunk/xsl/fo/autoidx-ng.xsl 2006-10-10 14:10:29 UTC (rev 6352) @@ -14,7 +14,7 @@ <!-- You should have this directly in your customization file. --> <!-- This file is there only to retain backward compatibility. --> -<xsl:import href="../common/autoidx-ng.xsl"/> +<xsl:import href="autoidx-kosek.xsl"/> <xsl:param name="index.method">kosek</xsl:param> </xsl:stylesheet> Modified: trunk/xsl/html/autoidx-kosek.xsl =================================================================== --- trunk/xsl/html/autoidx-kosek.xsl 2006-10-09 07:35:16 UTC (rev 6351) +++ trunk/xsl/html/autoidx-kosek.xsl 2006-10-10 14:10:29 UTC (rev 6352) @@ -65,7 +65,7 @@ <xsl:message terminate="yes"> <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text> <xsl:text>index extension functions be imported:
</xsl:text> - <xsl:text> xsl:import href="common/autoidx-ng.xsl"</xsl:text> + <xsl:text> xsl:import href="common/autoidx-kosek.xsl"</xsl:text> </xsl:message> </xsl:if> Modified: trunk/xsl/html/autoidx-ng.xsl =================================================================== --- trunk/xsl/html/autoidx-ng.xsl 2006-10-09 07:35:16 UTC (rev 6351) +++ trunk/xsl/html/autoidx-ng.xsl 2006-10-10 14:10:29 UTC (rev 6352) @@ -14,7 +14,7 @@ <!-- You should have this directly in your customization file. --> <!-- This file is there only to retain backward compatibility. --> -<xsl:import href="../common/autoidx-ng.xsl"/> +<xsl:import href="autoidx-kosek.xsl"/> <xsl:param name="index.method">kosek</xsl:param> </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2006-10-19 07:03:14
|
Revision: 6366 http://svn.sourceforge.net/docbook/?rev=6366&view=rev Author: xmldoc Date: 2006-10-19 00:02:51 -0700 (Thu, 19 Oct 2006) Log Message: ----------- Removed param.xml and param.html targets from stylesheet makefiles (param.xml is now built by the doc target, and the param.html is obsolete). Also, added mechanism for appending terminal newlines to param.xsl files (because Saxon doesn't newline-terminate its outuput). Modified Paths: -------------- trunk/xsl/docsrc/fo/.cvsignore trunk/xsl/docsrc/html/.cvsignore trunk/xsl/docsrc/manpages/.cvsignore trunk/xsl/docsrc/wordml/.cvsignore trunk/xsl/fo/Makefile trunk/xsl/html/Makefile trunk/xsl/lib/Makefile trunk/xsl/manpages/Makefile trunk/xsl/wordml/Makefile Added Paths: ----------- trunk/xsl/tools/xsl/build/addnewline.xsl trunk/xsl/tools/xsl/build/identity.xsl Property Changed: ---------------- trunk/xsl/docsrc/fo/ trunk/xsl/docsrc/html/ trunk/xsl/docsrc/manpages/ trunk/xsl/docsrc/wordml/ Property changes on: trunk/xsl/docsrc/fo ___________________________________________________________________ Name: svn:ignore - *.xml + *.xml Makefile.param Modified: trunk/xsl/docsrc/fo/.cvsignore =================================================================== --- trunk/xsl/docsrc/fo/.cvsignore 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/docsrc/fo/.cvsignore 2006-10-19 07:02:51 UTC (rev 6366) @@ -1 +1,2 @@ *.xml +Makefile.param Property changes on: trunk/xsl/docsrc/html ___________________________________________________________________ Name: svn:ignore - *.xml + *.xml Makefile.param Modified: trunk/xsl/docsrc/html/.cvsignore =================================================================== --- trunk/xsl/docsrc/html/.cvsignore 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/docsrc/html/.cvsignore 2006-10-19 07:02:51 UTC (rev 6366) @@ -1 +1,2 @@ *.xml +Makefile.param Property changes on: trunk/xsl/docsrc/manpages ___________________________________________________________________ Name: svn:ignore - *.xml + *.xml Makefile.param Modified: trunk/xsl/docsrc/manpages/.cvsignore =================================================================== --- trunk/xsl/docsrc/manpages/.cvsignore 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/docsrc/manpages/.cvsignore 2006-10-19 07:02:51 UTC (rev 6366) @@ -1 +1,2 @@ *.xml +Makefile.param Property changes on: trunk/xsl/docsrc/wordml ___________________________________________________________________ Name: svn:ignore - *.xml + *.xml Makefile.param Modified: trunk/xsl/docsrc/wordml/.cvsignore =================================================================== --- trunk/xsl/docsrc/wordml/.cvsignore 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/docsrc/wordml/.cvsignore 2006-10-19 07:02:51 UTC (rev 6366) @@ -1 +1,2 @@ *.xml +Makefile.param Modified: trunk/xsl/fo/Makefile =================================================================== --- trunk/xsl/fo/Makefile 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/fo/Makefile 2006-10-19 07:02:51 UTC (rev 6366) @@ -2,27 +2,22 @@ PARAMPROF=.param.profiled PARAMSTRIP=.param.stripped -LREFENTRY=../tools/xsl/build/lrefentry.xsl include Makefile.param all: titlepage.templates.xsl param.xsl profile-docbook.xsl -param.html: param.xml - $(XSLT) $< $(LREFENTRY) $@ - -param.xml: param.xweb $(PARAMS) - ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo - $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@ - $(RM) $(PARAMPROF) $(PARAMSTRIP) - param.xsl: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=fo $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition +ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ +else + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp + $(XSLT) $@.tmp $(ADDNEWLINE) $@ + $(RM) $@.tmp +endif $(RM) $(PARAMPROF) $(PARAMSTRIP) titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl @@ -30,12 +25,13 @@ Makefile.param: ../../cvstools/paramchk -m $@ param.xweb + $(MAKE) profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl $(XSLT) $< ../profiling/xsl2profile.xsl $@ clean: - $(RM) param.xml param.html param.xsl \ + $(RM) param.xml \ profile-docbook.xsl \ titlepage.templates.xsl $(RM) Makefile.param Modified: trunk/xsl/html/Makefile =================================================================== --- trunk/xsl/html/Makefile 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/html/Makefile 2006-10-19 07:02:51 UTC (rev 6366) @@ -2,32 +2,23 @@ PARAMPROF=.param.profiled PARAMSTRIP=.param.stripped -LREFENTRY=../tools/xsl/build/lrefentry.xsl include Makefile.param all: titlepage.templates.xsl param.xsl \ profile-docbook.xsl profile-chunk-code.xsl -xml: param.xml - -html: param.html - -param.html: param.xml titlepage.templates.xsl - $(XSLT) $< $(LREFENTRY) $@ - -param.xml: param.xweb $(PARAMS) - ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html - $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@ - $(RM) $(PARAMPROF) $(PARAMSTRIP) - param.xsl: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition +ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ +else + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp + $(XSLT) $@.tmp $(ADDNEWLINE) $@ + $(RM) $@.tmp +endif $(RM) $(PARAMPROF) $(PARAMSTRIP) titlepage.templates.xsl: titlepage.templates.xml ../template/titlepage.xsl @@ -35,7 +26,7 @@ Makefile.param: ../../cvstools/paramchk -m $@ param.xweb - make + $(MAKE) profile-docbook.xsl: docbook.xsl ../profiling/xsl2profile.xsl $(XSLT) $< ../profiling/xsl2profile.xsl $@ @@ -44,7 +35,7 @@ $(XSLT) $< ../profiling/xsl2profile.xsl $@ clean: - $(RM) param.xml param.html param.xsl \ + $(RM) param.xsl \ profile-docbook.xsl profile-chunk-code.xsl \ titlepage.templates.xsl $(RM) Makefile.param Modified: trunk/xsl/lib/Makefile =================================================================== --- trunk/xsl/lib/Makefile 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/lib/Makefile 2006-10-19 07:02:51 UTC (rev 6366) @@ -12,13 +12,25 @@ lib.xml: lib.xweb $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition +ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@ +else + $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@.tmp + $(XSLT) $@.tmp $(ADDNEWLINE) $@ + $(RM) $@.tmp +endif $(RM) $(PARAMPROF) $(PARAMSTRIP) lib.xsl: lib.xweb $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition +ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ +else + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp + $(XSLT) $@.tmp $(ADDNEWLINE) $@ + $(RM) $@.tmp +endif $(RM) $(PARAMPROF) $(PARAMSTRIP) clean: Modified: trunk/xsl/manpages/Makefile =================================================================== --- trunk/xsl/manpages/Makefile 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/manpages/Makefile 2006-10-19 07:02:51 UTC (rev 6366) @@ -3,32 +3,11 @@ PARAMPROF=.param.profiled PARAMSTRIP=.param.stripped HTML2ROFF=../tools/xsl/build/html2roff.xsl -LREFENTRY=../tools/xsl/build/lrefentry.xsl include Makefile.param all: param.xsl html-synop.xsl -xml: param.xml - -html: param.html - -param.html: param.xml - $(XSLT) $< $(LREFENTRY) $@ - -param.xml: param.xweb $(PARAMS) - ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html - $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition -ifeq ($(ADDNEWLINE),) - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@ -else - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@.tmp - $(XSLT) $@.tmp $(ADDNEWLINE) $@ - $(RM) $@.tmp -endif - $(RM) $(PARAMPROF) $(PARAMSTRIP) - param.xsl: param.xweb $(PARAMS) ../../cvstools/paramchk -m Makefile.param $< $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html @@ -44,7 +23,7 @@ Makefile.param: ../../cvstools/paramchk -m $@ param.xweb - make + $(MAKE) html-synop.xsl: ../html/synop.xsl $(XSLT) $< $(HTML2ROFF) $@ Added: trunk/xsl/tools/xsl/build/addnewline.xsl =================================================================== --- trunk/xsl/tools/xsl/build/addnewline.xsl (rev 0) +++ trunk/xsl/tools/xsl/build/addnewline.xsl 2006-10-19 07:02:51 UTC (rev 6366) @@ -0,0 +1,13 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> + <xsl:import href="./identity.xsl"/> + + <xsl:output method="xml" + indent="no"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + <xsl:text>
</xsl:text> + </xsl:template> + +</xsl:stylesheet> Property changes on: trunk/xsl/tools/xsl/build/addnewline.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/tools/xsl/build/identity.xsl =================================================================== --- trunk/xsl/tools/xsl/build/identity.xsl (rev 0) +++ trunk/xsl/tools/xsl/build/identity.xsl 2006-10-19 07:02:51 UTC (rev 6366) @@ -0,0 +1,13 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version='1.0'> + + <xsl:output method="xml" + indent="no"/> + + <xsl:template match="node() | @*"> + <xsl:copy> + <xsl:apply-templates select="@* | node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> Property changes on: trunk/xsl/tools/xsl/build/identity.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/xsl/wordml/Makefile =================================================================== --- trunk/xsl/wordml/Makefile 2006-10-19 06:58:14 UTC (rev 6365) +++ trunk/xsl/wordml/Makefile 2006-10-19 07:02:51 UTC (rev 6366) @@ -5,7 +5,6 @@ PARAMPROF=.param.profiled PARAMSTRIP=.param.stripped -LREFENTRY=../tools/xsl/build/lrefentry.xsl WORDML = $(STYLESHEETDIR)/docbook.xsl PAGES = $(STYLESHEETDIR)/docbook-pages.xsl @@ -23,32 +22,25 @@ all: param.xsl -xml: param.xml - -html: param.html - -param.html: param.xml - $(XSLT) $< $(LREFENTRY) $@ - -param.xml: param.xweb $(PARAMS) - ../../cvstools/paramchk -m Makefile.param $< - $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=html - $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition - $(XSLT) $(PARAMSTRIP) ../../litprog/w2docbook.xsl $@ - $(RM) $(PARAMPROF) $(PARAMSTRIP) - param.xsl: param.xweb ../../cvstools/paramchk -m Makefile.param $< $(XSLT) $< ../profiling/profile.xsl $(PARAMPROF) profile.condition=wordml $(XSLT) $(PARAMPROF) ../profiling/strip-attributes.xsl $(PARAMSTRIP) attributes=condition +ifeq ($(ADDNEWLINE),) $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@ +else + $(XSLT) $(PARAMSTRIP) ../../litprog/xtangle.xsl $@.tmp + $(XSLT) $@.tmp $(ADDNEWLINE) $@ + $(RM) $@.tmp +endif $(RM) $(PARAMPROF) $(PARAMSTRIP) Makefile.param: ../../cvstools/paramchk -m $@ param.xweb + $(MAKE) clean: - $(RM) param.xml param.html param.xsl + $(RM) param.xsl $(RM) Makefile.param echo "# foo" > Makefile.param This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2006-10-19 08:41:17
|
Revision: 6369 http://svn.sourceforge.net/docbook/?rev=6369&view=rev Author: xmldoc Date: 2006-10-19 01:40:35 -0700 (Thu, 19 Oct 2006) Log Message: ----------- Made some minor doc refinements. Modified Paths: -------------- trunk/xsl/docsrc/pi/pi.xml trunk/xsl/fo/param.xweb trunk/xsl/html/param.xweb trunk/xsl/lib/lib.xweb trunk/xsl/manpages/param.xweb trunk/xsl/wordml/param.xweb Modified: trunk/xsl/docsrc/pi/pi.xml =================================================================== --- trunk/xsl/docsrc/pi/pi.xml 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/docsrc/pi/pi.xml 2006-10-19 08:40:35 UTC (rev 6369) @@ -16,22 +16,18 @@ <year>2003</year> <holder>Jiří Kosek</holder> </copyright> +<abstract> + <para>This is technical reference documentation for the DocBook XSL + Stylesheets. It documents processing instructions (PIs) recognized by + the stylesheets.</para> + + <para>These PIs can be usually used to change behaviour of stylesheets + in a particular place. If you want to change some setting globally it + is better to do it via setting appropriate stylesheet + parameter if there is such one.</para> +</abstract> </bookinfo> -<preface id="intro"> -<title>Introduction</title> - -<para>This is technical reference documentation for the DocBook XSL -Stylesheets. It documents processing instructions (PIs) recognized by -the stylesheets.</para> - -<para>These PIs can be usually used to change behaviour of stylesheets -in a particular place. If you want to change some setting globally it -is better to do it via setting appropriate stylesheet -parameter if there is such one.</para> - -</preface> - <reference id="html"> <title>HTML PIs</title> Modified: trunk/xsl/fo/param.xweb =================================================================== --- trunk/xsl/fo/param.xweb 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/fo/param.xweb 2006-10-19 08:40:35 UTC (rev 6369) @@ -19,16 +19,13 @@ <year>2001</year> <holder>Norman Walsh</holder> </copyright> +<abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook XSL FO stylesheets (for generating + XSL-FO output destined for final print/PDF output).</para> +</abstract> </bookinfo> -<preface id="intro"><title>Introduction</title> - -<para>This is reference documentation for all user-configurable -parameters in the DocBook XSL FO stylesheets (for generating -XSL-FO output destined for final print/PDF otutput).</para> - -</preface> - <reference id="admons"><title>Admonitions</title> &admon.graphics; &admon.graphics.extension; Modified: trunk/xsl/html/param.xweb =================================================================== --- trunk/xsl/html/param.xweb 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/html/param.xweb 2006-10-19 08:40:35 UTC (rev 6369) @@ -19,39 +19,13 @@ <year>2001</year> <holder>Norman Walsh</holder> </copyright> +<abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook XSL HTML stylesheets (for generating + HTML output).</para> +</abstract> </bookinfo> -<preface id="intro"><title>Introduction</title> - -<para>This is reference documentation for all user-configurable -parameters in the DocBook XSL HTML stylesheets (for generating -HTML output).</para> - -<para>This reference describes each of the HTML Stylesheet parameters. -These are the <quote>easily customizable</quote> 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 <quote>driver</quote> stylesheet.</para> - -<para>For example, if you want to change the <literal>html.stylesheet</literal> -to <filename>reference.css</filename>, you might create a driver -stylesheet like this:</para> - -<programlisting><![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version='1.0'> - - <xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/> - - <xsl:param name="html.stylesheet">reference.css</xsl:param> - -</xsl:stylesheet>]]></programlisting> - -<para>Naturally, you have to change the -<sgmltag class='attribute'>href</sgmltag> attribute on -<literal><xsl:import></literal> to point to -<filename>docbook.xsl</filename> on your system. (Or -<filename>chunk.xsl</filename>, if you're using chunking.)</para> -</preface> - <reference id="admons"><title>Admonitions</title> &admon.graphics.extension; &admon.graphics.path; Modified: trunk/xsl/lib/lib.xweb =================================================================== --- trunk/xsl/lib/lib.xweb 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/lib/lib.xweb 2006-10-19 08:40:35 UTC (rev 6369) @@ -7,7 +7,7 @@ <title>XSL Library Template Reference</title> <releaseinfo role="cvs">$Id$ </releaseinfo> -<corpauthor>DocBook Open Repository Team</corpauthor> +<corpauthor>The DocBook Project</corpauthor> <copyright> <year>1999</year> <year>2000</year> Modified: trunk/xsl/manpages/param.xweb =================================================================== --- trunk/xsl/manpages/param.xweb 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/manpages/param.xweb 2006-10-19 08:40:35 UTC (rev 6369) @@ -17,17 +17,19 @@ <year>2005</year> <holder>The DocBook Project</holder> </copyright> + <abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook XSL "manpages" stylesheet (for + generating groff/nroff output). Note that the manpages + stylesheet is a customization layer of the DocBook XSL HTML + stylesheet. Therefore, you can also use a number of <ulink + url="http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html" + >HTML stylesheet parameters</ulink> to control manpages output + (in addition to the manpages-specific parameters listed in this + section).</para> + </abstract> </bookinfo> - <preface id="preface"> - <title>Introduction</title> - - <para>This is reference documentation for all user-configurable - parameters in the DocBook XSL "manpages" stylesheets (for - generating groff/nroff output).</para> - - </preface> - <reference id="general"> <title>Hyphenation, justification, and breaking</title> &man.hyphenate; Modified: trunk/xsl/wordml/param.xweb =================================================================== --- trunk/xsl/wordml/param.xweb 2006-10-19 08:32:25 UTC (rev 6368) +++ trunk/xsl/wordml/param.xweb 2006-10-19 08:40:35 UTC (rev 6369) @@ -19,15 +19,13 @@ <year>2004</year> <holder>Steve Ball</holder> </copyright> + <abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook WordML Stylesheets (for generating + WordML or Apple Pages output).</para> + </abstract> </bookinfo> - <preface id="preface"> - <title>Introduction</title> - - <para>This is technical documentation for the DocBook XSL Stylesheets to produce WordML output (or Apple Pages); it documents the parameters, templates and usage of the stylesheet(s).</para> - - <para>This is not intended to be <quote>user</quote> documentation. It is provided for developers writing customisation layers for the stylesheets, and for anyone who's interested in <quote>how it works</quote>.</para> - </preface> <reference id="params"> <title>Parameters</title> &wordml.template; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-11-16 23:14:06
|
Revision: 6417 http://svn.sourceforge.net/docbook/?rev=6417&view=rev Author: bobstayton Date: 2006-11-16 15:13:56 -0800 (Thu, 16 Nov 2006) Log Message: ----------- Use number() in some comparisons to ensure number data type. Modified Paths: -------------- trunk/xsl/common/table.xsl trunk/xsl/fo/table.xsl trunk/xsl/html/table.xsl Modified: trunk/xsl/common/table.xsl =================================================================== --- trunk/xsl/common/table.xsl 2006-11-16 07:36:38 UTC (rev 6416) +++ trunk/xsl/common/table.xsl 2006-11-16 23:13:56 UTC (rev 6417) @@ -213,11 +213,11 @@ <xsl:choose> <xsl:when test="$namest != '' and $nameend != ''"> <xsl:choose> - <xsl:when test="$ecol >= $scol"> - <xsl:value-of select="$ecol - $scol + 1"/> + <xsl:when test="number($ecol) >= number($scol)"> + <xsl:value-of select="number($ecol) - number($scol) + 1"/> </xsl:when> <xsl:otherwise> - <xsl:value-of select="$scol - $ecol + 1"/> + <xsl:value-of select="number($scol) - number($ecol) + 1"/> </xsl:otherwise> </xsl:choose> </xsl:when> Modified: trunk/xsl/fo/table.xsl =================================================================== --- trunk/xsl/fo/table.xsl 2006-11-16 07:36:38 UTC (rev 6416) +++ trunk/xsl/fo/table.xsl 2006-11-16 23:13:56 UTC (rev 6417) @@ -247,7 +247,7 @@ <xsl:variable name="colsep"> <xsl:choose> <!-- If this is the last column, colsep never applies. --> - <xsl:when test="$colnum >= ancestor::tgroup/@cols">0</xsl:when> + <xsl:when test="number($colnum) >= ancestor::tgroup/@cols">0</xsl:when> <xsl:otherwise> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> @@ -272,7 +272,7 @@ </xsl:call-template> </xsl:if> - <xsl:if test="$colsep > 0 and $colnum < ancestor::tgroup/@cols"> + <xsl:if test="$colsep > 0 and number($colnum) < ancestor::tgroup/@cols"> <xsl:call-template name="border"> <xsl:with-param name="side" select="'right'"/> </xsl:call-template> @@ -874,7 +874,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="$entry.colnum > $col"> + <xsl:when test="number($entry.colnum) > $col"> <xsl:call-template name="empty.table.cell"> <xsl:with-param name="colnum" select="$col"/> </xsl:call-template> @@ -1186,7 +1186,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="$entry.colnum > $col"> + <xsl:when test="number($entry.colnum) > $col"> <xsl:text>0:</xsl:text> <xsl:call-template name="sentry"> <xsl:with-param name="col" select="$col+$entry.colspan"/> Modified: trunk/xsl/html/table.xsl =================================================================== --- trunk/xsl/html/table.xsl 2006-11-16 07:36:38 UTC (rev 6416) +++ trunk/xsl/html/table.xsl 2006-11-16 23:13:56 UTC (rev 6417) @@ -48,7 +48,7 @@ <xsl:variable name="colsep"> <xsl:choose> <!-- If this is the last column, colsep never applies. --> - <xsl:when test="$colnum >= ancestor::tgroup/@cols">0</xsl:when> + <xsl:when test="number($colnum) >= ancestor::tgroup/@cols">0</xsl:when> <xsl:otherwise> <xsl:call-template name="inherited.table.attribute"> <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/> @@ -789,7 +789,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="$entry.colnum > $col"> + <xsl:when test="number($entry.colnum) > $col"> <xsl:call-template name="empty.table.cell"/> <xsl:call-template name="entry"> <xsl:with-param name="col" select="$col+1"/> @@ -952,7 +952,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="$entry.colnum > $col"> + <xsl:when test="number($entry.colnum) > $col"> <xsl:text>0:</xsl:text> <xsl:call-template name="sentry"> <xsl:with-param name="col" select="$col+$entry.colspan"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-12-01 07:57:42
|
Revision: 6446 http://svn.sourceforge.net/docbook/?rev=6446&view=rev Author: bobstayton Date: 2006-11-30 23:57:40 -0800 (Thu, 30 Nov 2006) Log Message: ----------- Fixed bug #1603790: no space between package and classname. Modified Paths: -------------- trunk/xsl/fo/synop.xsl trunk/xsl/html/synop.xsl Modified: trunk/xsl/fo/synop.xsl =================================================================== --- trunk/xsl/fo/synop.xsl 2006-11-26 07:01:22 UTC (rev 6445) +++ trunk/xsl/fo/synop.xsl 2006-12-01 07:57:40 UTC (rev 6446) @@ -376,11 +376,11 @@ <xsl:apply-templates mode="java"/> </xsl:template> -<xsl:template match="modifier" mode="java"> +<xsl:template match="modifier|package" mode="java"> <xsl:apply-templates mode="java"/> - <xsl:if test="following-sibling::*"> - <xsl:text> </xsl:text> - </xsl:if> + <xsl:if test="following-sibling::*"> + <xsl:text> </xsl:text> + </xsl:if> </xsl:template> <xsl:template match="classname" mode="java"> @@ -544,7 +544,7 @@ <xsl:apply-templates mode="cpp"/> </xsl:template> -<xsl:template match="modifier" mode="cpp"> +<xsl:template match="modifier|package" mode="cpp"> <xsl:apply-templates mode="cpp"/> <xsl:if test="following-sibling::*"> <xsl:text> </xsl:text> @@ -701,7 +701,7 @@ <xsl:apply-templates mode="idl"/> </xsl:template> -<xsl:template match="modifier" mode="idl"> +<xsl:template match="modifier|package" mode="idl"> <xsl:apply-templates mode="idl"/> <xsl:if test="following-sibling::*"> <xsl:text> </xsl:text> @@ -847,7 +847,7 @@ <xsl:apply-templates mode="perl"/> </xsl:template> -<xsl:template match="modifier" mode="perl"> +<xsl:template match="modifier|package" mode="perl"> <xsl:apply-templates mode="perl"/> <xsl:if test="following-sibling::*"> <xsl:text> </xsl:text> Modified: trunk/xsl/html/synop.xsl =================================================================== --- trunk/xsl/html/synop.xsl 2006-11-26 07:01:22 UTC (rev 6445) +++ trunk/xsl/html/synop.xsl 2006-12-01 07:57:40 UTC (rev 6446) @@ -842,7 +842,7 @@ </span> </xsl:template> -<xsl:template match="modifier" mode="java"> +<xsl:template match="modifier|package" mode="java"> <span> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates mode="java"/> @@ -1049,7 +1049,7 @@ </span> </xsl:template> -<xsl:template match="modifier" mode="cpp"> +<xsl:template match="modifier|package" mode="cpp"> <span> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates mode="cpp"/> @@ -1244,7 +1244,7 @@ </span> </xsl:template> -<xsl:template match="modifier" mode="idl"> +<xsl:template match="modifier|package" mode="idl"> <span> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates mode="idl"/> @@ -1426,7 +1426,7 @@ </span> </xsl:template> -<xsl:template match="modifier" mode="perl"> +<xsl:template match="modifier|package" mode="perl"> <span> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates mode="perl"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-12-07 17:54:38
|
Revision: 6450 http://svn.sourceforge.net/docbook/?rev=6450&view=rev Author: bobstayton Date: 2006-12-07 09:54:17 -0800 (Thu, 07 Dec 2006) Log Message: ----------- Moved all properties to attribute-sets so can be customized more easily. Modified Paths: -------------- trunk/xsl/fo/verbatim.xsl trunk/xsl/params/verbatim.properties.xml Modified: trunk/xsl/fo/verbatim.xsl =================================================================== --- trunk/xsl/fo/verbatim.xsl 2006-12-05 18:59:47 UTC (rev 6449) +++ trunk/xsl/fo/verbatim.xsl 2006-12-07 17:54:17 UTC (rev 6450) @@ -49,9 +49,6 @@ <xsl:choose> <xsl:when test="$shade.verbatim != 0"> <fo:block id="{$id}" - white-space-collapse='false' - white-space-treatment='preserve' - linefeed-treatment='preserve' xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> <xsl:choose> <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')"> @@ -65,9 +62,6 @@ </xsl:when> <xsl:otherwise> <fo:block id="{$id}" - white-space-collapse='false' - white-space-treatment='preserve' - linefeed-treatment="preserve" xsl:use-attribute-sets="monospace.verbatim.properties"> <xsl:choose> <xsl:when test="$hyphenate.verbatim != 0 and function-available('exsl:node-set')"> @@ -110,9 +104,6 @@ <xsl:choose> <xsl:when test="$shade.verbatim != 0"> <fo:block id="{$id}" - white-space-collapse='false' - white-space-treatment='preserve' - linefeed-treatment="preserve" xsl:use-attribute-sets="monospace.verbatim.properties shade.verbatim.style"> <xsl:copy-of select="$content"/> @@ -120,9 +111,6 @@ </xsl:when> <xsl:otherwise> <fo:block id="{$id}" - white-space-collapse='false' - white-space-treatment='preserve' - linefeed-treatment="preserve" xsl:use-attribute-sets="monospace.verbatim.properties"> <xsl:copy-of select="$content"/> </fo:block> @@ -133,22 +121,12 @@ <xsl:choose> <xsl:when test="$shade.verbatim != 0"> <fo:block id="{$id}" - wrap-option='no-wrap' - white-space-collapse='false' - white-space-treatment='preserve' - text-align='start' - linefeed-treatment="preserve" xsl:use-attribute-sets="verbatim.properties shade.verbatim.style"> <xsl:copy-of select="$content"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:block id="{$id}" - wrap-option='no-wrap' - white-space-collapse='false' - white-space-treatment='preserve' - text-align='start' - linefeed-treatment="preserve" xsl:use-attribute-sets="verbatim.properties"> <xsl:copy-of select="$content"/> </fo:block> @@ -179,11 +157,7 @@ </xsl:choose> </xsl:variable> - <fo:block wrap-option='no-wrap' - white-space-collapse='false' - white-space-treatment='preserve' - linefeed-treatment="preserve" - xsl:use-attribute-sets="verbatim.properties"> + <fo:block xsl:use-attribute-sets="verbatim.properties"> <xsl:copy-of select="$content"/> </fo:block> </xsl:template> Modified: trunk/xsl/params/verbatim.properties.xml =================================================================== --- trunk/xsl/params/verbatim.properties.xml 2006-12-05 18:59:47 UTC (rev 6449) +++ trunk/xsl/params/verbatim.properties.xml 2006-12-07 17:54:17 UTC (rev 6450) @@ -16,6 +16,11 @@ <xsl:attribute name="space-after.optimum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">1.2em</xsl:attribute> <xsl:attribute name="hyphenate">false</xsl:attribute> + <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> + <xsl:attribute name="white-space-collapse">false</xsl:attribute> + <xsl:attribute name="white-space-treatment">preserve</xsl:attribute> + <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute> + <xsl:attribute name="text-align">start</xsl:attribute> </xsl:attribute-set></src:fragment> </refsynopsisdiv> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2006-12-13 09:21:35
|
Revision: 6451 http://svn.sourceforge.net/docbook/?rev=6451&view=rev Author: bobstayton Date: 2006-12-13 01:21:23 -0800 (Wed, 13 Dec 2006) Log Message: ----------- Fix bug #1614469 for citation linking to biblioentry. Modified Paths: -------------- trunk/xsl/fo/inline.xsl trunk/xsl/html/inline.xsl Modified: trunk/xsl/fo/inline.xsl =================================================================== --- trunk/xsl/fo/inline.xsl 2006-12-07 17:54:17 UTC (rev 6450) +++ trunk/xsl/fo/inline.xsl 2006-12-13 09:21:23 UTC (rev 6451) @@ -1083,13 +1083,25 @@ <xsl:template match="citation"> <!-- todo: integrate with bibliography collection --> <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/> + <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> - <xsl:when test="$targets"> - <xsl:call-template name="xref"> - <xsl:with-param name="targets" select="$targets"/> - </xsl:call-template> + <!-- try automatic linking based on match to abbrev --> + <xsl:when test="$target and not(xref) and not(link)"> + + <xsl:text>[</xsl:text> + <fo:basic-link> + <xsl:attribute name="internal-destination"> + <xsl:call-template name="object.id"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:call-template name="inline.charseq"/> + </fo:basic-link> + <xsl:text>]</xsl:text> </xsl:when> + <xsl:otherwise> <xsl:text>[</xsl:text> <xsl:call-template name="inline.charseq"/> Modified: trunk/xsl/html/inline.xsl =================================================================== --- trunk/xsl/html/inline.xsl 2006-12-07 17:54:17 UTC (rev 6450) +++ trunk/xsl/html/inline.xsl 2006-12-13 09:21:23 UTC (rev 6451) @@ -1225,12 +1225,23 @@ <xsl:template match="citation"> <!-- todo: integrate with bibliography collection --> <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/> + <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> - <xsl:when test="$targets"> - <xsl:call-template name="xref"> - <xsl:with-param name="targets" select="$targets"/> - </xsl:call-template> + <!-- try automatic linking based on match to abbrev --> + <xsl:when test="$target and not(xref) and not(link)"> + + <xsl:text>[</xsl:text> + <a> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$target"/> + </xsl:call-template> + </xsl:attribute> + + <xsl:call-template name="inline.charseq"/> + </a> + <xsl:text>]</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>[</xsl:text> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-02 10:23:10
|
Revision: 6457 http://svn.sourceforge.net/docbook/?rev=6457&view=rev Author: xmldoc Date: 2007-01-02 02:23:06 -0800 (Tue, 02 Jan 2007) Log Message: ----------- This is a first attempt at ensuring that list content nested in itemizedlist and orderedlist instances is properly indented. This is a switch from using .TP to format those lists to using .RS/.RE to format them instead (because .TP does not allow nesting). This probably breaks something else and therefore will likely need some refinement after more testing. Closes bug #1602616. Thanks to Daniel Leidert. Modified Paths: -------------- trunk/xsl/manpages/lists.xsl trunk/xsl/params/man.string.subst.map.xml Modified: trunk/xsl/manpages/lists.xsl =================================================================== --- trunk/xsl/manpages/lists.xsl 2006-12-21 17:23:19 UTC (rev 6456) +++ trunk/xsl/manpages/lists.xsl 2007-01-02 10:23:06 UTC (rev 6457) @@ -128,30 +128,57 @@ <!-- * the roff bullet) because, when we do character-map --> <!-- * processing before final output, the character-map will --> <!-- * handle conversion of the • to "\(bu" for us --> - <xsl:text>• </xsl:text> - <xsl:apply-templates/> - <xsl:if test="following-sibling::listitem"> - <xsl:text>.TP</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>.RS</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text> </xsl:text> + <xsl:value-of select="$list-indent"/> + </xsl:if> + <xsl:text> </xsl:text> + <xsl:text>\h'-</xsl:text> <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> - </xsl:if> - <xsl:text> </xsl:text> + <xsl:text>0</xsl:text> + <xsl:value-of select="$list-indent"/> </xsl:if> + <xsl:text>'</xsl:text> + <xsl:text>•</xsl:text> + <xsl:text>\h'+</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text>0</xsl:text> + <xsl:value-of select="$list-indent - 1"/> + <xsl:text>'</xsl:text> + </xsl:if> + <xsl:apply-templates/> + <xsl:text>.RE </xsl:text> </xsl:template> <xsl:template match="orderedlist/listitem|procedure/step"> - <xsl:number format="1."/> <xsl:text> </xsl:text> - <xsl:apply-templates/> - <xsl:if test="position()!=last()"> - <xsl:text>.TP</xsl:text> + <xsl:text>.RS</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text> </xsl:text> + <xsl:value-of select="$list-indent"/> + </xsl:if> + <xsl:text> </xsl:text> + <xsl:text>\h'-</xsl:text> <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> - </xsl:if> - <xsl:text> </xsl:text> + <xsl:text>0</xsl:text> + <xsl:value-of select="$list-indent"/> </xsl:if> + <xsl:text>'</xsl:text> + <xsl:if test="count(preceding-sibling::listitem) < 9"> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:number format="1."/> + <xsl:text>\h'+</xsl:text> + <xsl:if test="not($list-indent = '')"> + <xsl:text>0</xsl:text> + <xsl:value-of select="$list-indent - 2"/> + <xsl:text>'</xsl:text> + </xsl:if> + <xsl:apply-templates/> + <xsl:text>.RE </xsl:text> + <xsl:text> </xsl:text> </xsl:template> <xsl:template match="itemizedlist|orderedlist|procedure"> @@ -165,12 +192,6 @@ <!-- * content (if any) before getting the list items --> <xsl:apply-templates select="*[not(self::listitem) and not(self::title)]"/> - <xsl:text>.TP</xsl:text> - <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> - </xsl:if> - <xsl:text> </xsl:text> <xsl:apply-templates select="listitem"/> <!-- * If this list is a child of para and has content following --> <!-- * it, within the same para, then add a blank line and move --> @@ -184,25 +205,12 @@ <xsl:template match="itemizedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]| orderedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]| procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]"> - <xsl:text>.RS</xsl:text> - <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> - </xsl:if> - <xsl:text> </xsl:text> <xsl:if test="title"> <xsl:text>.PP </xsl:text> <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> - <xsl:text>.TP</xsl:text> - <xsl:if test="not($list-indent = '')"> - <xsl:text> </xsl:text> - <xsl:value-of select="$list-indent"/> - </xsl:if> - <xsl:text> </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> <xsl:if test="following-sibling::node() or parent::para[following-sibling::node()] or parent::simpara[following-sibling::node()] or Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2006-12-21 17:23:19 UTC (rev 6456) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-02 10:23:06 UTC (rev 6457) @@ -20,6 +20,7 @@ <substitution oldstring="\\fI" newstring="\fI"/> <substitution oldstring="\\fR" newstring="\fR"/> <substitution oldstring="\\n" newstring="\n"/> + <substitution oldstring="\\h" newstring="\h"/> <!-- * requests in .SH sectsions output from Refsect1-level source --> <!-- * end up getting capitalized... --> <substitution oldstring="\\FB" newstring="\fB"/> @@ -37,6 +38,7 @@ <substitution oldstring="-" newstring="\-"/> <!-- * now, we need to restore single-hypens in all roff requests --> <!-- * (because the substitution above added backslashes before them) --> + <substitution oldstring="\h'\-" newstring="\h'-"/> <substitution oldstring=".sp \-" newstring=".sp -"/> <substitution oldstring=".it 1 an\-trap" newstring=".it 1 an-trap"/> <substitution oldstring=".nr an\-no\-space\-flag 1" newstring=".nr an-no-space-flag 1"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2007-01-05 03:22:58
|
Revision: 6463 http://svn.sourceforge.net/docbook/?rev=6463&view=rev Author: balls Date: 2007-01-04 19:22:54 -0800 (Thu, 04 Jan 2007) Log Message: ----------- rename to roundtrip, add OpenOffice support Modified Paths: -------------- trunk/xsl/roundtrip/docbook-pages.xsl trunk/xsl/roundtrip/docbook.xsl trunk/xsl/roundtrip/specifications.xml trunk/xsl/roundtrip/template.dot trunk/xsl/roundtrip/template.xml trunk/xsl/roundtrip/wordml-final.xsl Added Paths: ----------- trunk/xsl/roundtrip/ trunk/xsl/roundtrip/dbk2ooo.xsl trunk/xsl/roundtrip/dbk2pages.xsl trunk/xsl/roundtrip/dbk2wordml.xsl trunk/xsl/roundtrip/dbk2wp.xsl Removed Paths: ------------- trunk/xsl/wordml/ Copied: trunk/xsl/roundtrip (from rev 6457, trunk/xsl/wordml) Added: trunk/xsl/roundtrip/dbk2ooo.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2ooo.xsl (rev 0) +++ trunk/xsl/roundtrip/dbk2ooo.xsl 2007-01-05 03:22:54 UTC (rev 6463) @@ -0,0 +1,160 @@ +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:office="http://openoffice.org/2000/office" + xmlns:style="http://openoffice.org/2000/style" + xmlns:text="http://openoffice.org/2000/text" + xmlns:table="http://openoffice.org/2000/table" + xmlns:draw="http://openoffice.org/2000/drawing" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:number="http://openoffice.org/2000/datastyle" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:chart="http://openoffice.org/2000/chart" + xmlns:dr3d="http://openoffice.org/2000/dr3d" + xmlns:math="http://www.w3.org/1998/Math/MathML" + xmlns:form="http://openoffice.org/2000/form" + xmlns:script="http://openoffice.org/2000/script" + xmlns:doc='http://docbook.org/ns/docbook' + exclude-result-prefixes='doc'> + + <xsl:import href='dbk2wp.xsl'/> + + <xsl:output method="xml" indent='yes'/> + + <!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://nwalsh.com/docbook/xsl/ for copyright + and other information. + + ******************************************************************** --> + + <xsl:include href='../VERSION'/> + + <xsl:template match="/" name='ooo.top'> + <xsl:param name='doc' select='/'/> + + <office:document + office:class='text' + office:version='1.0'> + + <office:script/> + <office:font-decls> + <style:font-decl style:name="Lucida Grande1" fo:font-family="'Lucida Grande'"/> + <style:font-decl style:name="Arial1" fo:font-family="Arial" style:font-pitch="variable"/> + <style:font-decl style:name="Hiragino Mincho Pro W3" fo:font-family="'Hiragino Mincho Pro W3'" style:font-pitch="variable"/> + <style:font-decl style:name="Lucida Grande" fo:font-family="'Lucida Grande'" style:font-pitch="variable"/> + <style:font-decl style:name="Times New Roman" fo:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable"/> + <style:font-decl style:name="Arial" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/> + </office:font-decls> + <office:automatic-styles/> + + <xsl:apply-templates select='$doc/*' + mode='doc:toplevel'/> + </office:document> + </xsl:template> + + <xsl:template name='doc:make-body'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <office:body> + <text:sequence-decls> + <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/> + <text:sequence-decl text:display-outline-level="0" text:name="Table"/> + <text:sequence-decl text:display-outline-level="0" text:name="Text"/> + <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/> + </text:sequence-decls> + + <xsl:copy-of select='$content'/> + </office:body> + </xsl:template> + + <xsl:template name='doc:make-subsection'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <xsl:copy-of select='$content'/> + </xsl:template> + + <xsl:template name='doc:make-paragraph'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='outline.level' select='0'/> + <xsl:param name='attributes.node' select='.'/> + + <text:p text:style-name='{$style}'> + + <xsl:call-template name='attributes'> + <xsl:with-param name='node' select='$attributes.node'/> + </xsl:call-template> + + <xsl:copy-of select='$content'/> + </text:p> + </xsl:template> + + <xsl:template name='doc:make-phrase'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <text:span text:style-name='{$style}'> + <xsl:copy-of select='$content'/> + </text:span> + </xsl:template> + + <xsl:template name='doc:make-hyperlink'/> + <xsl:template name='doc:make-hyperlink-not-implemented'> + <xsl:param name='target'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <text:link href='{$target}'> + </text:link> + </xsl:template> + + <xsl:template name='doc:make-table'/> + <xsl:template name='doc:make-table-not-yet-implemented'> + <xsl:param name='columns'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + </xsl:template> + + <xsl:template name='doc:make-table-row'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='is-header' select='false()'/> + + </xsl:template> + + <xsl:template name='doc:make-table-cell'> + <xsl:param name='width' select='0'/> + <xsl:param name='hidden' select='false()'/> + <xsl:param name='rowspan' select='1'/> + <xsl:param name='colspan' select='1'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + </xsl:template> + + <xsl:template name='doc:make-soft-break'> + <text:br/> + </xsl:template> + + <xsl:template name='attributes'> + <xsl:param name='node' select='.'/> + + </xsl:template> +</xsl:stylesheet> Property changes on: trunk/xsl/roundtrip/dbk2ooo.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/roundtrip/dbk2pages.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2pages.xsl (rev 0) +++ trunk/xsl/roundtrip/dbk2pages.xsl 2007-01-05 03:22:54 UTC (rev 6463) @@ -0,0 +1,277 @@ +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:sfa="http://developer.apple.com/namespaces/sfa" + xmlns:sf="http://developer.apple.com/namespaces/sf" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:sl="http://developer.apple.com/namespaces/sl" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:w='urn:not-yet-implemented' + xmlns:wx='urn:not-yet-implemented' + xmlns:aml='urn:not-yet-implemented' + xmlns:doc='http://docbook.org/ns/docbook' + exclude-result-prefixes='doc xi w wx aml'> + + <xsl:import href='dbk2wp.xsl'/> + + <xsl:output method="xml" indent='yes' encoding='ascii'/> + + <!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://nwalsh.com/docbook/xsl/ for copyright + and other information. + + ******************************************************************** --> + + <xsl:include href='../VERSION'/> + <xsl:include href='param.xsl'/> + + <xsl:variable name='templatedoc' select='document($pages.template)'/> + + <!-- Lookup style identifiers from their user-visible name --> + <xsl:variable name='paragraph-styles' + select='$templatedoc//sf:paragraphstyle'/> + <xsl:variable name='character-styles' + select='$templatedoc//sf:characterstyle'/> + + <xsl:template match="/" name='pages.top'> + <xsl:param name='doc' select='/'/> + + <xsl:if test='not($pages.template)'> + <xsl:message terminate='yes'>Please specify the template document with the "pages.template" parameter</xsl:message> + </xsl:if> + <xsl:if test='not($templatedoc)'> + <xsl:message terminate='yes'>Unable to open template document "<xsl:value-of select='$pages.template'/>"</xsl:message> + </xsl:if> + + <sl:document + sfa:ID="SLPublicationModel-0" + sl:version="2004093000" + sl:generator="slingshot" + sl:app_build_date="Mar 4 2005, 11:22:49"> + + <xsl:apply-templates select='$templatedoc/sl:document/*[not(self::sf:text-storage)]' + mode='doc:copy'/> + + <xsl:apply-templates select='$doc/*' + mode='doc:toplevel'/> + + <xsl:apply-templates select='$templatedoc/sl:document/sf:text-storage/following-sibling::*' + mode='doc:copy'/> + </sl:document> + </xsl:template> + + <xsl:template name='doc:make-body'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <sf:text-storage sf:kind='body' sfa:ID='SFWPStorage-7'> + <sf:stylesheet-ref sfa:IDREF='SFSStylesheet-1'/> + <sf:text-body> + <sf:page-start sf:page-index='0'/> + <sf:container-hint sf:page-index="0" sf:cindex="0" sf:sindex="0" sf:lindex="0" sf:frame-x="56.692913055419922" sf:frame-y="56.692913055419922" sf:frame-w="481.61416625976562" sf:frame-h="714" sf:anchor-loc="0"/> + + <sf:section sf:name="Chapter 1" sf:style="section-style-0"> + <sf:layout sf:style="layout-style-20"> + <xsl:copy-of select='$content'/> + </sf:layout> + </sf:section> + </sf:text-body> + </sf:text-storage> + </xsl:template> + + <xsl:template name='doc:make-subsection'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <xsl:copy-of select='$content'/> + </xsl:template> + + <xsl:template name='doc:make-paragraph'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='outline.level' select='0'/> + <xsl:param name='attributes.node' select='.'/> + + <sf:p> + <xsl:if test='$style != ""'> + <xsl:attribute name='sf:style'> + <xsl:call-template name='doc:lookup-paragraph-style'> + <xsl:with-param name='style' select='$style'/> + </xsl:call-template> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name='attributes'> + <xsl:with-param name='node' select='$attributes.node'/> + </xsl:call-template> + + <xsl:copy-of select='$content'/> + <sf:br/> + </sf:p> + </xsl:template> + + <xsl:template name='doc:make-phrase'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <sf:span> + <xsl:if test='$style != ""'> + <xsl:attribute name='sf:style'> + <xsl:call-template name='doc:lookup-character-style'> + <xsl:with-param name='style' select='$style'/> + </xsl:call-template> + </xsl:attribute> + </xsl:if> + + <xsl:copy-of select='$content'/> + </sf:span> + </xsl:template> + + <xsl:template name='doc:make-hyperlink'> + <xsl:param name='target'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <sf:link href='{$target}'> + <sf:span> + <xsl:attribute name='sf:style'> + <xsl:call-template name='doc:lookup-character-style'> + <xsl:with-param name='style'>email</xsl:with-param> + </xsl:call-template> + </xsl:attribute> + <xsl:copy-of select='$content'/> + </sf:span> + </sf:link> + </xsl:template> + + <xsl:template name='doc:make-table'/> + <xsl:template name='doc:make-table-not-yet-implemented'> + <xsl:param name='columns'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:tbl> + <w:tblPr> + <w:tblW w:w="0" w:type="auto"/> + <w:tblInd w:w="108" w:type="dxa"/> + <w:tblLayout w:type="Fixed"/> + </w:tblPr> + <w:tblGrid> + <xsl:copy-of select='$columns'/> + </w:tblGrid> + <xsl:copy-of select='$content'/> + </w:tbl> + </xsl:template> + + <xsl:template name='doc:make-column'> + <xsl:param name='width' select='0'/> + + <w:gridcol w:w='{$width}'/> + </xsl:template> + + <xsl:template name='doc:make-table-row'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='is-header' select='false()'/> + + <w:tr> + <w:trPr> + <xsl:if test='$is-header'> + <w:tblHeader/> + </xsl:if> + </w:trPr> + <xsl:copy-of select='$content'/> + </w:tr> + </xsl:template> + + <xsl:template name='doc:make-table-cell'> + <xsl:param name='width' select='0'/> + <xsl:param name='hidden' select='false()'/> + <xsl:param name='rowspan' select='1'/> + <xsl:param name='colspan' select='1'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:tc> + <xsl:if test='$colspan != 1 or + $width != 0'> + <w:tcPr> + <xsl:if test='$colspan != 1 or + $width != 0'> + <w:tcW w:w='{$width}' w:type='dxa'/> + </xsl:if> + <xsl:if test='$hidden'> + <w:vmerge w:val='{$hidden}'/> + </xsl:if> + <xsl:if test='$rowspan != 1'> + <w:vmerge w:val='restart'/> + </xsl:if> + <xsl:if test='$colspan != 1'> + <w:gridspan w:val='{$colspan}'/> + </xsl:if> + </w:tcPr> + </xsl:if> + + <xsl:copy-of select='$content'/> + </w:tc> + </xsl:template> + + <xsl:template name='doc:make-soft-break'> + <sf:br/> + </xsl:template> + + <xsl:template name='attributes'> + <xsl:param name='node' select='.'/> + + <xsl:for-each select='$node/@*'> + <sf:span> + <xsl:attribute name='sf:style'> + <xsl:call-template name='doc:lookup-character-style'> + <xsl:with-param name='style'>attribute-name</xsl:with-param> + </xsl:call-template> + </xsl:attribute> + <xsl:value-of select='name()'/> + </sf:span> + <sf:span> + <xsl:attribute name='sf:style'> + <xsl:call-template name='doc:lookup-character-style'> + <xsl:with-param name='style'>attribute-value</xsl:with-param> + </xsl:call-template> + </xsl:attribute> + <xsl:value-of select='.'/> + </sf:span> + </xsl:for-each> + </xsl:template> + + <xsl:template name='doc:lookup-paragraph-style'> + <xsl:param name='style'/> + + <xsl:if test='not($paragraph-styles[@sf:name = $style])'> + <xsl:message>unable to find paragraph style "<xsl:value-of select='$style'/>"</xsl:message> + </xsl:if> + + <xsl:value-of select='$paragraph-styles[@sf:name = $style]/@sf:ident'/> + </xsl:template> + <xsl:template name='doc:lookup-character-style'> + <xsl:param name='style'/> + + <xsl:if test='not($character-styles[@sf:name = $style])'> + <xsl:message>unable to find character style "<xsl:value-of select='$style'/>"</xsl:message> + </xsl:if> + + <xsl:value-of select='$character-styles[@sf:name = $style]/@sf:ident'/> + </xsl:template> +</xsl:stylesheet> Property changes on: trunk/xsl/roundtrip/dbk2pages.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/roundtrip/dbk2wordml.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2wordml.xsl (rev 0) +++ trunk/xsl/roundtrip/dbk2wordml.xsl 2007-01-05 03:22:54 UTC (rev 6463) @@ -0,0 +1,382 @@ +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:w='http://schemas.microsoft.com/office/word/2003/wordml' + xmlns:v='urn:schemas-microsoft-com:vml' + xmlns:w10="urn:schemas-microsoft-com:office:word" + xmlns:aml="http://schemas.microsoft.com/aml/2001/core" + xmlns:wx='http://schemas.microsoft.com/office/word/2003/auxHint' + xmlns:o="urn:schemas-microsoft-com:office:office" + xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" + xmlns:sl='http://schemas.microsoft.com/schemaLibrary/2003/core' + xmlns:doc='http://docbook.org/ns/docbook' + exclude-result-prefixes='doc'> + + <xsl:import href='dbk2wp.xsl'/> + + <xsl:output method="xml" indent='yes' standalone='yes' encoding='UTF-8'/> + + <!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://nwalsh.com/docbook/xsl/ for copyright + and other information. + + ******************************************************************** --> + + <xsl:include href='../VERSION'/> + <xsl:include href='param.xsl'/> + + <xsl:variable name='templatedoc' select='document($wordml.template)'/> + + <xsl:template match="/" name='wordml.top'> + <xsl:param name='doc' select='/'/> + + <xsl:if test='not($wordml.template)'> + <xsl:message terminate='yes'>Please specify the template document with the "wordml.template" parameter</xsl:message> + </xsl:if> + <xsl:if test='not($templatedoc)'> + <xsl:message terminate='yes'>Unable to open template document "<xsl:value-of select='$wordml.template'/>"</xsl:message> + </xsl:if> + + <xsl:processing-instruction name='mso-application'> + <xsl:text>progid="Word.Document"</xsl:text> + </xsl:processing-instruction> + <xsl:text>
</xsl:text> + + <xsl:variable name='info' + select='$doc/book/bookinfo|$doc/article/articleinfo'/> + <xsl:variable name='authors' select='$info/author|$info/authorinitials|$info/authorgroup/author|$info/authorgroup/editor'/> + + <w:wordDocument + w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no"> + <xsl:attribute name='xml:space'>preserve</xsl:attribute> + + <o:DocumentProperties> + <o:Author> + <xsl:choose> + <xsl:when test='$authors'> + <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/> + </xsl:when> + <xsl:otherwise>Unknown</xsl:otherwise> + </xsl:choose> + </o:Author> + <o:LastAuthor> + <xsl:choose> + <xsl:when test='$info/revhistory/revision[1]/*[self::author|self::authorinitials]'> + <xsl:apply-templates select='$info/revhistory/revision[1]/*[self::author|self::authorinitials]' mode='doc:docprop.author'/> + </xsl:when> + <xsl:when test='$authors'> + <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/> + </xsl:when> + <xsl:otherwise>Unknown</xsl:otherwise> + </xsl:choose> + </o:LastAuthor> + <o:Revision>1</o:Revision> + <o:TotalTime></o:TotalTime> + + <!-- dummy values --> + <o:Created>2004-01-01T07:07:00Z</o:Created> + <o:LastSaved>2004-01-01T08:08:00Z</o:LastSaved> + + <o:Pages>1</o:Pages> + <o:Words>1</o:Words> + <o:Characters>1</o:Characters> + + <!-- could derive this from author --> + <o:Company>DocBook</o:Company> + + <o:Lines>1</o:Lines> + <o:Paragraphs>1</o:Paragraphs> + <o:CharactersWithSpaces>1</o:CharactersWithSpaces> + <o:Version>11.6113</o:Version> + </o:DocumentProperties> + + <xsl:apply-templates select='$templatedoc/w:wordDocument/o:CustomDocumentProperties|$templatedoc/w:wordDocument/w:fonts|$templatedoc/w:wordDocument/w:lists|$templatedoc/w:wordDocument/w:styles' mode='doc:copy'/> + + <w:docPr> + <w:view w:val="print"/> + <w:zoom w:percent="100"/> + <w:doNotEmbedSystemFonts/> + <w:attachedTemplate w:val=""/> + <w:defaultTabStop w:val="720"/> + <w:autoHyphenation/> + <w:hyphenationZone w:val="357"/> + <w:doNotHyphenateCaps/> + <w:evenAndOddHeaders/> + <w:characterSpacingControl w:val="DontCompress"/> + <w:optimizeForBrowser/> + <w:validateAgainstSchema/> + <w:saveInvalidXML w:val="off"/> + <w:ignoreMixedContent w:val="off"/> + <w:alwaysShowPlaceholderText w:val="off"/> + <w:footnotePr> + <w:footnote w:type="separator"> + <w:p> + <w:r> + <w:separator/> + </w:r> + </w:p> + </w:footnote> + <w:footnote w:type="continuation-separator"> + <w:p> + <w:r> + <w:continuationSeparator/> + </w:r> + </w:p> + </w:footnote> + </w:footnotePr> + <w:endnotePr> + <w:endnote w:type="separator"> + <w:p> + <w:r> + <w:separator/> + </w:r> + </w:p> + </w:endnote> + <w:endnote w:type="continuation-separator"> + <w:p> + <w:r> + <w:continuationSeparator/> + </w:r> + </w:p> + </w:endnote> + </w:endnotePr> + <w:compat> + <w:breakWrappedTables/> + <w:snapToGridInCell/> + <w:wrapTextWithPunct/> + <w:useAsianBreakRules/> + <w:useWord2002TableStyleRules/> + </w:compat> + <w:docVars> + </w:docVars> + </w:docPr> + + <xsl:apply-templates select='$doc/*' mode='doc:toplevel'/> + + </w:wordDocument> + </xsl:template> + + <xsl:template name='doc:make-body'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:body> + <wx:sect> + <wx:sub-section> + <xsl:copy-of select='$content'/> + </wx:sub-section> + </wx:sect> + </w:body> + </xsl:template> + + <xsl:template name='doc:make-subsection'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <wx:sub-section> + <xsl:copy-of select='$content'/> + </wx:sub-section> + </xsl:template> + + <xsl:template name='doc:make-paragraph'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='outline.level' select='0'/> + <xsl:param name='attributes.node' select='.'/> + + <w:p> + <xsl:if test='$style != "" or + $outline.level != 0'> + <w:pPr> + <xsl:if test='$style != ""'> + <w:pStyle w:val='{$style}'/> + </xsl:if> + + <xsl:if test='$outline.level != 0'> + <w:outlineLvl w:val='{$outline.level}'/> + </xsl:if> + </w:pPr> + </xsl:if> + + <xsl:call-template name='attributes'> + <xsl:with-param name='node' select='$attributes.node'/> + </xsl:call-template> + + <xsl:copy-of select='$content'/> + </w:p> + </xsl:template> + + <xsl:template name='doc:make-phrase'> + <xsl:param name='style' select='"unknown"'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:r> + <xsl:if test='$style != ""'> + <w:rPr> + <w:rStyle w:val='{$style}'/> + </w:rPr> + </xsl:if> + + <w:t> + <xsl:copy-of select='$content'/> + </w:t> + </w:r> + </xsl:template> + + <xsl:template name='doc:make-hyperlink'> + <xsl:param name='target'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:hlink w:dest='{$target}'> + <xsl:copy-of select='$content'/> + </w:hlink> + </xsl:template> + + <xsl:template name='doc:make-table'> + <xsl:param name='columns'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:tbl> + <w:tblPr> + <w:tblW w:w="0" w:type="auto"/> + <w:tblInd w:w="108" w:type="dxa"/> + <w:tblLayout w:type="Fixed"/> + </w:tblPr> + <w:tblGrid> + <xsl:copy-of select='$columns'/> + </w:tblGrid> + <xsl:copy-of select='$content'/> + </w:tbl> + </xsl:template> + + <xsl:template name='doc:make-column'> + <xsl:param name='width' select='0'/> + + <w:gridcol w:w='{$width}'/> + </xsl:template> + + <xsl:template name='doc:make-table-row'> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + <xsl:param name='is-header' select='false()'/> + + <w:tr> + <w:trPr> + <xsl:if test='$is-header'> + <w:tblHeader/> + </xsl:if> + </w:trPr> + <xsl:copy-of select='$content'/> + </w:tr> + </xsl:template> + + <xsl:template name='doc:make-table-cell'> + <xsl:param name='width' select='0'/> + <xsl:param name='hidden' select='false()'/> + <xsl:param name='rowspan' select='1'/> + <xsl:param name='colspan' select='1'/> + <xsl:param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:param> + + <w:tc> + <xsl:if test='$colspan != 1 or + $width != 0'> + <w:tcPr> + <xsl:if test='$colspan != 1 or + $width != 0'> + <w:tcW w:w='{$width}' w:type='dxa'/> + </xsl:if> + <xsl:if test='$hidden'> + <w:vmerge w:val='{$hidden}'/> + </xsl:if> + <xsl:if test='$rowspan != 1'> + <w:vmerge w:val='restart'/> + </xsl:if> + <xsl:if test='$colspan != 1'> + <w:gridspan w:val='{$colspan}'/> + </xsl:if> + </w:tcPr> + </xsl:if> + + <xsl:copy-of select='$content'/> + </w:tc> + </xsl:template> + + <xsl:template name='doc:make-soft-break'> + <w:br/> + </xsl:template> + + <xsl:template name='attributes'> + <xsl:param name='node' select='.'/> + + <xsl:if test='$node/@*'> + <aml:annotation aml:id='{count(preceding::*) + 1}' w:type='Word.Comment.Start'/> + <w:r> + <w:rPr> + <w:rStyle w:val='attributes'/> + </w:rPr> + <w:t> + <xsl:text> </xsl:text> + </w:t> + </w:r> + <aml:annotation aml:id='{count(preceding::*) + 1}' w:type='Word.Comment.End'/> + <w:r> + <w:rPr> + <w:rStyle w:val='CommentReference'/> + </w:rPr> + <aml:annotation aml:id='{count(preceding::*) + 1}' aml:author="DocBook" aml:createdate='2004-12-23T00:01:00' w:type='Word.Comment' w:initials='DBK'> + <aml:content> + <w:p> + <w:pPr> + <w:pStyle w:val='CommentText'/> + </w:pPr> + <w:r> + <w:rPr> + <w:rStyle w:val='CommentReference'/> + </w:rPr> + <w:annotationRef/> + </w:r> + <xsl:for-each select='$node/@*'> + <w:r> + <w:rPr> + <w:rStyle w:val='attribute-name'/> + </w:rPr> + <w:t> + <xsl:value-of select='name()'/> + </w:t> + </w:r> + <w:r> + <w:t>=</w:t> + </w:r> + <w:r> + <w:rPr> + <w:rStyle w:val='attribute-value'/> + </w:rPr> + <w:t> + <xsl:value-of select='.'/> + </w:t> + </w:r> + </xsl:for-each> + </w:p> + </aml:content> + </aml:annotation> + </w:r> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> Property changes on: trunk/xsl/roundtrip/dbk2wordml.xsl ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/roundtrip/dbk2wp.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2wp.xsl (rev 0) +++ trunk/xsl/roundtrip/dbk2wp.xsl 2007-01-05 03:22:54 UTC (rev 6463) @@ -0,0 +1,1044 @@ +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:doc='http://docbook.org/ns/docbook' + exclude-result-prefixes='doc'> + + <!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part of the XSL DocBook Stylesheet distribution. + See ../README or http://nwalsh.com/docbook/xsl/ for copyright + and other information. + + ******************************************************************** --> + + <xsl:include href='../VERSION'/> + + <!-- doc:docprop.author mode is for creating document metadata --> + + <xsl:template match='author|editor' mode='doc:docprop.author'> + <xsl:apply-templates select='firstname|personname/firstname' mode='doc:docprop.author'/> + <xsl:text> </xsl:text> + <xsl:apply-templates select='surname|personname/surname' mode='doc:docprop.author'/> + </xsl:template> + <xsl:template match='authorinitials' mode='doc:docprop.author'> + <xsl:value-of select='.'/> + </xsl:template> + + <!-- doc:toplevel mode is for processing whole documents --> + + <xsl:template match='*' mode='doc:toplevel'> + <xsl:call-template name='doc:make-body'/> + </xsl:template> + + <!-- doc:body mode is for processing components of a document --> + + <xsl:template match='book|article|chapter|section|sect1|sect2|sect3|sect4|sect5|simplesect' mode='doc:body'> + <xsl:call-template name='doc:make-subsection'/> + </xsl:template> + + <xsl:template match='articleinfo | + chapterinfo | + bookinfo' mode='doc:body'> + <xsl:apply-templates select='title|subtitle|titleabbrev' mode='doc:body'/> + <xsl:apply-templates select='author|releaseinfo' mode='doc:body'/> + <!-- current implementation ignores all other metadata --> + <xsl:for-each select='*[not(self::title|self::subtitle|self::titleabbrev|self::author|self::releaseinfo)]'> + <xsl:call-template name='doc:nomatch'/> + </xsl:for-each> + </xsl:template> + + <xsl:template match='title|subtitle|titleabbrev' mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style'> + <xsl:choose> + <xsl:when test='(parent::section or + parent::sectioninfo/parent::section) and + count(ancestor::section) > 5'> + <xsl:call-template name='doc:warning'> + <xsl:with-param name='message'>section nested deeper than 5 levels</xsl:with-param> + </xsl:call-template> + <xsl:text>sect5-</xsl:text> + <xsl:value-of select='name()'/> + </xsl:when> + <xsl:when test='parent::section or + parent::sectioninfo/parent::section'> + <xsl:text>sect</xsl:text> + <xsl:value-of select='count(ancestor::section)'/> + <xsl:text>-</xsl:text> + <xsl:value-of select='name()'/> + </xsl:when> + <xsl:when test='contains(name(..), "info")'> + <xsl:value-of select='name(../..)'/> + <xsl:text>-</xsl:text> + <xsl:value-of select='name()'/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select='name(..)'/> + <xsl:text>-</xsl:text> + <xsl:value-of select='name()'/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name='outline.level' + select='count(ancestor::*) - count(parent::*[contains(name(), "info")]) - 1'/> + <xsl:with-param name='attributes.node' + select='../parent::*[contains(name(current()), "info")] | + parent::*[not(contains(name(current()), "info"))]'/> + <xsl:with-param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <doc:template name='metadata' xmlns=''> + <title>Metadata</title> + + <para>TODO: Handle all metadata elements, apart from titles.</para> + </doc:template> + <xsl:template match='*[contains(name(), "info")]/*[not(self::title|self::subtitle|self::titleabbrev)]' + priority='0' + mode='doc:body'/> + + <xsl:template match='author|editor|othercredit' mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' + select='name()'/> + <xsl:with-param name='content'> + <xsl:apply-templates select='personname|surname|firstname|honorific|lineage|othername|contrib' + mode='doc:body'/> + </xsl:with-param> + </xsl:call-template> + + <xsl:apply-templates select='affiliation|address' mode='doc:body'/> + <xsl:apply-templates select='authorblurb|personblurb' mode='doc:body'/> + </xsl:template> + <xsl:template match='affiliation' mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"affiliation"'/> + <xsl:with-param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + <xsl:template match='address[parent::author|parent::editor|parent::othercredit]' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"para-continue"'/> + <xsl:with-param name='content'> + <xsl:apply-templates mode='doc:body'/> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + <!-- do not attempt to handle recursive structures --> + <xsl:template match='address[not(parent::author|parent::editor|parent::othercredit)]' + mode='doc:body'> + <xsl:apply-templates select='node()[not(self::affiliation|self::authorblurb)]'/> + </xsl:template> + <!-- TODO --> + <xsl:template match='authorblurb|personblurb' + mode='doc:body'/> + + <!-- TODO: handle inline markup (eg. emphasis) --> + <xsl:template match='surname|firstname|honorific|lineage|othername|contrib|email|shortaffil|jobtitle|orgname|orgdiv|street|pob|postcode|city|state|country|phone|fax|citetitle' + mode='doc:body'> + <xsl:if test='preceding-sibling::*'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:text> </xsl:text> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style' select='name()'/> + </xsl:call-template> + </xsl:template> + <xsl:template match='email' + mode='doc:body'> + <xsl:variable name='address'> + <xsl:choose> + <xsl:when test='starts-with(., "mailto:")'> + <xsl:value-of select='.'/> + </xsl:when> + <xsl:otherwise> + <xsl:text>mailto:</xsl:text> + <xsl:value-of select='.'/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:call-template name='doc:make-hyperlink'> + <xsl:with-param name='target' select='$address'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style'>Hyperlink</xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + <!-- otheraddr often contains ulink --> + <xsl:template match='otheraddr' + mode='doc:body'> + <xsl:choose> + <xsl:when test='ulink'> + <xsl:for-each select='ulink'> + <xsl:variable name='prev' select='preceding-sibling::ulink[1]'/> + <xsl:choose> + <xsl:when test='$prev'> + <xsl:for-each + select='preceding-sibling::node()[generate-id(following-sibling::ulink[1]) = generate-id(current())]'> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style'>otheraddr</xsl:with-param> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + <xsl:when test='preceding-sibling::node()'> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style'>otheraddr</xsl:with-param> + </xsl:call-template> + </xsl:when> + </xsl:choose> + <xsl:apply-templates select='.'/> + </xsl:for-each> + <xsl:if test='ulink[last()]/following-sibling::node()'> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='content' + select='ulink[last()]/following-sibling::node()'/> + <xsl:with-param name='style'>otheraddr</xsl:with-param> + </xsl:call-template> + </xsl:if> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style'>otheraddr</xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match='ulink' + mode='doc:body'> + <xsl:call-template name='doc:make-hyperlink'> + <xsl:with-param name='target' select='@url'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:handle-linebreaks'> + <xsl:with-param name='style'>Hyperlink</xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <!-- Cannot round-trip this element --> + <xsl:template match='personname' + mode='doc:body'> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match='releaseinfo' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='releaseinfo'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='para' + mode='doc:body'> + <xsl:param name='class'/> + + <xsl:variable name='block' select='blockquote|calloutlist|classsynopsis|funcsynopsis|figure|glosslist|graphic|informalfigure|informaltable|itemizedlist|literallayout|mediaobject|mediaobjectco|note|caution|warning|important|tip|orderedlist|programlisting|revhistory|segmentedlist|simplelist|table|variablelist'/> + + <xsl:choose> + <xsl:when test='$block'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style'> + <xsl:choose> + <xsl:when test='$class != ""'> + <xsl:value-of select='$class'/> + </xsl:when> + <xsl:otherwise>para</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name='content' + select='$block[1]/preceding-sibling::node()'/> + </xsl:call-template> + + <xsl:for-each select='$block'> + <xsl:apply-templates select='.'/> + + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style'> + <xsl:choose> + <xsl:when test='$class != ""'> + <xsl:value-of select='$class'/> + </xsl:when> + <xsl:otherwise>Normal</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name='content' + select='following-sibling::node()[generate-id(preceding-sibling::*[self::blockquote|self::calloutlist|self::figure|self::glosslist|self::graphic|self::informalfigure|self::informaltable|self::itemizedlist|self::literallayout|self::mediaobject|self::mediaobjectco|self::note|self::caution|self::warning|self::important|self::tip|self::orderedlist|self::programlisting|self::revhistory|self::segmentedlist|self::simplelist|self::table|self::variablelist][1]) = generate-id(current())]'/> + </xsl:call-template> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style'> + <xsl:choose> + <xsl:when test='$class != ""'> + <xsl:value-of select='$class'/> + </xsl:when> + <xsl:otherwise>Normal</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match='simpara' + mode='doc:body'> + <xsl:param name='class'/> + + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style'> + <xsl:choose> + <xsl:when test='$class != ""'> + <xsl:value-of select='concat("sim-", $class)'/> + </xsl:when> + <xsl:otherwise>simpara</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match='emphasis' + mode='doc:body'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='italic'> + <xsl:choose> + <xsl:when test='not(@role)'>1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name='bold'> + <xsl:choose> + <xsl:when test='@role = "bold" or @role = "strong"'>1</xsl:when> + <xsl:otherwise>0</xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match='informalfigure' + mode='doc:body'> + <xsl:if test='mediaobject/imageobject/imagedata'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"informalfigure-imagedata"'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:apply-templates select='mediaobject/imageobject/imagedata/@fileref' + mode='textonly'/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + <xsl:for-each select='*[not(self::mediaobject)]'> + <xsl:call-template name='doc:nomatch'/> + </xsl:for-each> + </xsl:template> + + <xsl:template match='mediaobject|mediaobjectco' + mode='doc:body'> + <xsl:apply-templates select='objectinfo/title'/> + <xsl:apply-templates select='objectinfo/subtitle'/> + <!-- TODO: indicate error for other children of objectinfo --> + + <xsl:apply-templates select='*[not(self::objectinfo)]'/> + </xsl:template> + <xsl:template match='imageobject|imageobjectco|audioobject|videoobject' + mode='doc:body'> + <xsl:apply-templates select='objectinfo/title'/> + <xsl:apply-templates select='objectinfo/subtitle'/> + <!-- TODO: indicate error for other children of objectinfo --> + + <xsl:apply-templates select='areaspec'/> + + <xsl:choose> + <xsl:when test='imagedata|audiodata|videodata'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' + select='concat(name(), "-", name(imagedata|audiodata|videodata))'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:apply-templates select='*/@fileref' + mode='textonly'/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test='self::imageobjectco/imageobject/imagedata'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' + select='concat(name(), "-imagedata")'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:apply-templates select='*/@fileref' + mode='textonly'/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + </xsl:choose> + <xsl:apply-templates select='calloutlist'/> + + <xsl:for-each select='*[not(self::imageobject | + self::imagedata | + self::audiodata | + self::videodata | + self::areaspec | + self::calloutlist)]'> + <xsl:call-template name='doc:nomatch'/> + </xsl:for-each> + </xsl:template> + <xsl:template match='textobject' + mode='doc:body'> + <xsl:choose> + <xsl:when test='objectinfo/title|objectinfo|subtitle'> + <xsl:apply-templates select='objectinfo/title'/> + <xsl:apply-templates select='objectinfo/subtitle'/> + <!-- TODO: indicate error for other children of objectinfo --> + </xsl:when> + <xsl:otherwise> + <!-- synthesize a title so that the parent textobject + can be recreated. + --> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"textobject-title"'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:text>Text Object </xsl:text> + <xsl:number level='any'/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates select='*[not(self::objectinfo)]'/> + </xsl:template> + + <xsl:template match='caption' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"caption"'/> + <xsl:with-param name='content'> + <xsl:choose> + <xsl:when test='not(*)'> + <xsl:apply-templates/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select='para[1]/node()'/> + <xsl:for-each select='text()|*[not(self::para)]|para[position() != 1]'> + <xsl:call-template name='doc:nomatch'/> + </xsl:for-each> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match='area|areaspec' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='name()'/> + <xsl:with-param name='content'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='calloutlist' + mode='doc:body'> + <xsl:apply-templates select='callout'/> + </xsl:template> + + <xsl:template match='callout' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"callout"'/> + <xsl:with-param name='content'> + <!-- Normally a para would be the first child of a callout --> + <xsl:apply-templates select='*[1][self::para]/node()' mode='list'/> + </xsl:with-param> + </xsl:call-template> + + <!-- This is to catch the case where a listitem's first child is not a paragraph. + - We may not be able to represent this properly. + --> + <xsl:apply-templates select='*[1][not(self::para)]' mode='list'/> + + <xsl:apply-templates select='*[position() != 1]' mode='list'/> + </xsl:template> + + <xsl:template match='table|informaltable' mode='doc:body'> + <xsl:call-template name='doc:make-table'> + <xsl:with-param name='columns'> + <xsl:apply-templates select='tgroup/colspec' mode='doc:column'/> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match='colspec' mode='doc:column'> + <xsl:call-template name='doc:make-column'> + <xsl:with-param name='width' select='@colwidth'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='colspec' mode='doc:body'/> + + <xsl:template name='doc:repeat'> + <xsl:param name='repeats' select='0'/> + <xsl:param name='content'/> + + <xsl:if test='$repeats > 0'> + <xsl:copy-of select='$content'/> + <xsl:call-template name='doc:repeat'> + <xsl:with-param name='repeats' select='$repeats - 1'/> + <xsl:with-param name='content' select='$content'/> + </xsl:call-template> + </xsl:if> + </xsl:template> + <xsl:template match='tgroup|tbody|thead' mode='doc:body'> + <xsl:apply-templates/> + </xsl:template> + <xsl:template match='row' mode='doc:body'> + <xsl:call-template name='doc:make-table-row'> + <xsl:with-param name='is-header' select='boolean(parent::thead)'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='entry' mode='doc:body'> + + <!-- + Position = Sum(i,preceding-sibling[@colspan = ""]) + entry[i].@colspan) + --> + + <xsl:variable name='position'> + <xsl:call-template name='doc:sum-sibling'> + <xsl:with-param name='sum' select='"1"'/> + <xsl:with-param name='node' select='.'/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name='limit' select='$position + @colspan'/> + + <xsl:call-template name='doc:make-table-cell'> + <xsl:with-param name='width'> + <xsl:choose> + <xsl:when test='@colspan != ""'> + + <!-- Select all the colspec nodes which correspond to the + column. That is all the nodes between the current + column number and the column number plus the span. + --> + + <xsl:variable name='combinedWidth'> + <xsl:call-template name='sum'> + <xsl:with-param name='nodes' select='ancestor::*[self::table|self::informaltable][1]/tgroup/colspec[not(position() < $position) and position() < $limit]'/> + <xsl:with-param name='sum' select='"0"'/> + </xsl:call-template> + </xsl:variable> + <xsl:value-of select='$combinedWidth'/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select='ancestor::*[self::table|self::informaltable][1]/tgroup/colspec[position() = $position]/@colwidth'/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + + <xsl:with-param name='hidden' select='@hidden'/> + <xsl:with-param name='rowspan' select='@rowspan'/> + <xsl:with-param name='colspan' select='@colspan'/> + + <xsl:with-param name='content'> + <xsl:choose> + <xsl:when test='not(para)'> + <!-- TODO: check for any block elements --> + <xsl:call-template name='doc:make-paragraph'/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <!-- Calculates the position by adding the + count of the preceding siblings where they aren't colspans + and adding the colspans of those entries which do. + --> + + <xsl:template name='doc:sum-sibling'> + <xsl:param name='sum'/> + <xsl:param name='node'/> + + <xsl:variable name='add'> + <xsl:choose> + <xsl:when test='$node/preceding-sibling::entry/@colspan != ""'> + <xsl:value-of select='$node/preceding-sibling::entry/@colspan'/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select='"1"'/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:choose> + <xsl:when test='count($node/preceding-sibling::entry) > 0'> + <xsl:call-template name='doc:sum-sibling'> + <xsl:with-param name='sum' select='$sum + $add'/> + <xsl:with-param name='node' select='$node/preceding-sibling::entry[1]'/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select='$sum'/> + </xsl:otherwise> + </xsl:choose> + + </xsl:template> + + <xsl:template name='doc:sum'> + <xsl:param name='sum' select='"0"'/> + <xsl:param name='nodes'/> + + <xsl:variable name='tmpSum' select='$sum + $nodes[1]/@colwidth'/> + + <xsl:choose> + <xsl:when test='count($nodes) > 1'> + <xsl:call-template name='doc:sum'> + <xsl:with-param name='nodes' select='$nodes[position() != 1]'/> + <xsl:with-param name='sum' select='$tmpSum'/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select='$tmpSum'/> + </xsl:otherwise> + </xsl:choose> + + </xsl:template> + + <xsl:template match='*[self::para|self::simpara]/text()[string-length(normalize-space(.)) != 0]' + mode='doc:body'> + <xsl:call-template name='doc:handle-linebreaks'/> + </xsl:template> + + <xsl:template match='text()[not(parent::para|parent::simpara|parent::literallayout|parent::programlisting)][string-length(normalize-space(.)) != 0]' + mode='doc:body'> + <xsl:call-template name='doc:handle-linebreaks'/> + </xsl:template> + <xsl:template match='text()[string-length(normalize-space(.)) = 0]' + mode='doc:body'/> + <xsl:template match='literallayout/text()|programlisting/text()' + mode='doc:body'> + <xsl:call-template name='doc:handle-linebreaks'/> + </xsl:template> + <xsl:template name='doc:handle-linebreaks'> + <xsl:param name='content' select='.'/> + <xsl:param name='style'/> + + <xsl:choose> + <xsl:when test='not($content)'/> + <xsl:when test='contains($content, "
")'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='style' select='$style'/> + <xsl:with-param name='content' + select='substring-before($content, "
")'/> + </xsl:call-template> + + <xsl:call-template name='doc:handle-linebreaks-aux'> + <xsl:with-param name='content' + select='substring-after($content, "
")'/> + <xsl:with-param name='style' select='$style'/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='style' select='$style'/> + <xsl:with-param name='content' select='$content'/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- pre-condition: leading linefeed has been stripped --> + <xsl:template name='doc:handle-linebreaks-aux'> + <xsl:param name='content'/> + <xsl:param name='style'/> + + <xsl:choose> + <xsl:when test='contains($content, "
")'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='style' select='$style'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-soft-break'/> + <xsl:value-of select='substring-before($text, "
")'/> + </xsl:with-param> + </xsl:call-template> + <xsl:call-template name='doc:handle-linebreaks-aux'> + <xsl:with-param name='content' + select='substring-after($content, "
")'/> + <xsl:with-param name='style' select='$style'/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='style' select='$style'/> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-soft-break'/> + <xsl:value-of select='$text'/> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match='authorblurb|formalpara|legalnotice|note|caution|warning|important|tip' + mode='doc:body'> + <xsl:apply-templates select='*'> + <xsl:with-param name='class'> + <xsl:value-of select='name()'/> + </xsl:with-param> + </xsl:apply-templates> + </xsl:template> + + <xsl:template match='blockquote' + mode='doc:body'> + <xsl:apply-templates select='blockinfo|title'> + <xsl:with-param name='class'> + <xsl:value-of select='name()'/> + </xsl:with-param> + </xsl:apply-templates> + <xsl:apply-templates select='*[not(self::blockinfo|self::title|self::attribution)]'> + <xsl:with-param name='class' select='"blockquote"'/> + </xsl:apply-templates> + <xsl:if test='attribution'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"blockquote-attribution"'/> + <xsl:with-param name='content'> + <xsl:apply-templates select='attribution/node()'/> + </xsl:with-param> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template match='literallayout|programlisting' + mode='doc:body'> + <xsl:param name='class'/> + + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='name()'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='bridgehead' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"bridgehead"'/> + </xsl:call-template> + </xsl:template> + + <xsl:template match='itemizedlist|orderedlist' + mode='doc:body'> + <xsl:apply-templates select='listitem' + mode='doc:body'/> + </xsl:template> + + <xsl:template match='listitem' + mode='doc:body'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' + select='concat(name(..), + count(ancestor::itemizedlist|ancestor::orderedlist))'/> + <xsl:with-param name='is-listitem' select='true()'/> + + <xsl:with-param name='content'> + <!-- Normally a para would be the first child of a listitem --> + <xsl:apply-templates select='*[1][self::para]/node()' mode='list'/> + </xsl:with-param> + </xsl:call-template> + + <!-- This is to catch the case where a listitem's first child is not a paragraph. + - We may not be able to represent this properly. + --> + <xsl:apply-templates select='*[1][not(self::para)]' mode='doc:list'/> + + <xsl:apply-templates select='*[position() != 1]' mode='doc:list'/> + </xsl:template> + + <xsl:template match='*' mode='doc:list'> + <xsl:apply-templates select='.'> + <xsl:with-param name='class' select='"para-continue"'/> + </xsl:apply-templates> + </xsl:template> + + <xsl:template match='variablelist' + mode='doc:body'> + <xsl:apply-templates select='*[not(self::varlistentry)]'/> + + <xsl:call-template name='doc:make-table'> + <xsl:with-param name='columns'> + <xsl:call-template name='doc:make-column'> + <xsl:with-param name='width' select='"1"'/> + <xsl:with-param name='width' select='"3"'/> + </xsl:call-template> + </xsl:with-param> + <xsl:with-param name='rows'> + <xsl:apply-templates select='varlistentry'/> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + <xsl:template match='varlistentry' + mode='doc:body'> + <xsl:call-template name='doc:make-table-row'> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-table-cell'> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-paragraph'> + <xsl:with-param name='style' select='"variablelist-term"'/> + <xsl:with-param name='content'> + <xsl:apply-templates select='term[1]/node()'/> + <xsl:for-each select='term[position() != 1]'> + <xsl:call-template name='doc:make-phrase'> + <xsl:with-param name='content'> + <xsl:call-template name='doc:make-soft-break'/> + </xsl:with-param> + </xsl:call-template> + <xsl:apply-templates/> + </xsl:for-each> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + <xsl:call-template name='doc:make-table-cell'> + <xsl:with-param name='content'> + <xsl:apply-templates select='listitem/node()'/> + </xsl:with-param> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <!-- These elements are not displayed. + - However, they may need to be added (perhaps as hidden text) + - for round-tripping. + --> + <xsl:template match='anchor|areaset|audiodata|audioobject| + beginpage| + constraint| + indexterm|itermset| + keywordset| + msg' + mode='doc:body'/> + + <xsl:template match='*' name='doc:nomatch'> + <xsl:message> + <xsl:value-of select='name()'/> + <xsl:text> encountered</xsl:text> + <xsl:if test='parent::*'> + <xsl:text> in </xsl:text> + <xsl:value-of select='name(parent::*)'/> + </xsl:if> + <xsl:text>, but no template matches.</xsl:text> + </xsl:message> + + <xsl:choose> + <xsl:when test='self::abstract | + self::ackno | + self::address | + self::answer | + se... [truncated message content] |
From: <bob...@us...> - 2007-01-06 18:32:55
|
Revision: 6475 http://svn.sourceforge.net/docbook/?rev=6475&view=rev Author: bobstayton Date: 2007-01-06 10:32:52 -0800 (Sat, 06 Jan 2007) Log Message: ----------- Move show-destination="replace" property from template to attribute-set so it can be customized. Modified Paths: -------------- trunk/xsl/fo/xref.xsl trunk/xsl/params/olink.properties.xml Modified: trunk/xsl/fo/xref.xsl =================================================================== --- trunk/xsl/fo/xref.xsl 2007-01-06 18:31:14 UTC (rev 6474) +++ trunk/xsl/fo/xref.xsl 2007-01-06 18:32:52 UTC (rev 6475) @@ -1083,8 +1083,7 @@ </xsl:when> <xsl:when test="$axf.extensions != 0"> <fo:basic-link external-destination="{$href}" - xsl:use-attribute-sets="olink.properties" - show-destination="replace"> + xsl:use-attribute-sets="olink.properties"> <xsl:copy-of select="$hottext"/> </fo:basic-link> <xsl:copy-of select="$olink.page.citation"/> @@ -1092,8 +1091,7 @@ </xsl:when> <xsl:otherwise> <fo:basic-link external-destination="{$href}" - xsl:use-attribute-sets="olink.properties" - show-destination="replace"> + xsl:use-attribute-sets="olink.properties"> <xsl:copy-of select="$hottext"/> </fo:basic-link> <xsl:copy-of select="$olink.page.citation"/> Modified: trunk/xsl/params/olink.properties.xml =================================================================== --- trunk/xsl/params/olink.properties.xml 2007-01-06 18:31:14 UTC (rev 6474) +++ trunk/xsl/params/olink.properties.xml 2007-01-06 18:32:52 UTC (rev 6475) @@ -10,14 +10,15 @@ <refsynopsisdiv> <src:fragment id='olink.properties.frag'> <xsl:attribute-set name="olink.properties"> + <xsl:attribute name="show-destination">replace</xsl:attribute> </xsl:attribute-set> </src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> -<para>This attribute set is used on cross reference text -from an olink. It is not applied to the +<para>This attribute set is applied to the <sgmltag>fo:basic-link</sgmltag> +element of an olink. It is not applied to the optional page number or optional title of the external document.</para> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-14 20:21:40
|
Revision: 6492 http://svn.sourceforge.net/docbook/?rev=6492&view=rev Author: xmldoc Date: 2007-01-14 12:21:31 -0800 (Sun, 14 Jan 2007) Log Message: ----------- Replaced all dots in roff requests with U+2302 ("house" character), and added escaping in output for all instances of dot that are not in roff requests. This fixes the problem case where a string beginning with a dot (for example, the string ".bashrc") might occur at the beginning of a line in output, in which case would mistakenly get interpreted as a roff request. Thanks to Eric S. Raymond for pushing to fix this. Modified Paths: -------------- trunk/xsl/manpages/block.xsl trunk/xsl/manpages/info.xsl trunk/xsl/manpages/links.xsl trunk/xsl/manpages/lists.xsl trunk/xsl/manpages/other.xsl trunk/xsl/manpages/refentry.xsl trunk/xsl/manpages/synop.xsl trunk/xsl/manpages/table.xsl trunk/xsl/manpages/utility.xsl trunk/xsl/params/man.string.subst.map.xml trunk/xsl/tools/xsl/build/html2roff.xsl Modified: trunk/xsl/manpages/block.xsl =================================================================== --- trunk/xsl/manpages/block.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/block.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -25,7 +25,7 @@ <xsl:variable name="title.wrapper"> <bold><xsl:value-of select="normalize-space(title[1])"/></bold> </xsl:variable> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <!-- * don't put linebreak after head; instead render it as a "run in" --> <!-- * head, that is, inline, with a period and space following it --> <xsl:apply-templates mode="bold" select="exsl:node-set($title.wrapper)"/> @@ -53,14 +53,14 @@ ancestor::authorblurb or ancestor::personblurb"> <xsl:if test="preceding-sibling::*[not(name() ='')]"> - <xsl:text>.sp</xsl:text> + <xsl:text>⌂sp</xsl:text> <xsl:text> </xsl:text> - <xsl:text>.RS 4n</xsl:text> + <xsl:text>⌂RS 4n</xsl:text> <xsl:text> </xsl:text> </xsl:if> </xsl:when> <xsl:otherwise> - <xsl:text>.PP</xsl:text> + <xsl:text>⌂PP</xsl:text> <xsl:text> </xsl:text> </xsl:otherwise> </xsl:choose> @@ -71,7 +71,7 @@ ancestor::personblurb"> <xsl:if test="preceding-sibling::*[not(name() ='')]"> <xsl:text> </xsl:text> - <xsl:text>.RE</xsl:text> + <xsl:text>⌂RE</xsl:text> <xsl:text> </xsl:text> </xsl:if> </xsl:if> @@ -86,7 +86,7 @@ <xsl:text> </xsl:text> <xsl:if test="not(ancestor::authorblurb) and not(ancestor::personblurb)"> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:if> </xsl:template> @@ -119,12 +119,12 @@ parent::td|parent::th" /> <!-- do nothing --> <xsl:otherwise> <xsl:text> </xsl:text> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:otherwise> </xsl:choose> <xsl:if test="$indent = 'Yes'"> <!-- * start indented section --> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($man.indent.width = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$man.indent.width"/> @@ -150,31 +150,31 @@ <!-- * default to be non-bold - because it's a convention that's --> <!-- * followed is the vast majority of existing man pages that document --> <!-- * functions, and we need to follow it by default, like it or no. --> - <xsl:text>.ft </xsl:text> + <xsl:text>⌂ft </xsl:text> <xsl:value-of select="$man.font.funcsynopsisinfo"/> <xsl:text> </xsl:text> - <xsl:text>.nf </xsl:text> + <xsl:text>⌂nf </xsl:text> <xsl:apply-templates/> <xsl:text> </xsl:text> - <xsl:text>.fi </xsl:text> - <xsl:text>.ft </xsl:text> + <xsl:text>⌂fi </xsl:text> + <xsl:text>⌂ft </xsl:text> </xsl:when> <xsl:otherwise> <!-- * Other verbatims do not need to get bolded --> - <xsl:text>.nf </xsl:text> + <xsl:text>⌂nf </xsl:text> <xsl:apply-templates/> <xsl:text> </xsl:text> - <xsl:text>.fi </xsl:text> + <xsl:text>⌂fi </xsl:text> </xsl:otherwise> </xsl:choose> <xsl:if test="$indent = 'Yes'"> <!-- * end indented section --> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:if> <!-- * if first following sibling node of this verbatim --> <!-- * environment is a text node, output a line of space before it --> <xsl:if test="following-sibling::node()[1][name(.) = '']"> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:if> </xsl:template> @@ -214,7 +214,7 @@ </xsl:choose> </xsl:variable> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:call-template name="formal.object"> <xsl:with-param name="placement" select="$placement"/> </xsl:call-template> Modified: trunk/xsl/manpages/info.xsl =================================================================== --- trunk/xsl/manpages/info.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/info.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -202,7 +202,7 @@ $info//othercredit)"> </xsl:value-of> </xsl:variable> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:call-template name="make.authorsecttitle"> <xsl:with-param name="authorcount" select="$authorcount"/> </xsl:call-template> @@ -256,7 +256,7 @@ <xsl:variable name="person-name-node"> <bold><xsl:value-of select="$person-name"/></bold> </xsl:variable> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <!-- * Display person name in bold --> <xsl:apply-templates mode="bold" select="exsl:node-set($person-name-node)"/> <!-- * Display e-mail address(es) and ulink(s) on same line as name --> @@ -264,7 +264,7 @@ <xsl:text> </xsl:text> </xsl:when> <xsl:otherwise> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:otherwise> </xsl:choose> <!-- * Display affiliation(s) on separate lines --> @@ -276,7 +276,7 @@ </xsl:template> <xsl:template match="collab" mode="authorsect"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="collabname"/> <!-- * Display e-mail address(es) and ulink(s) on same line as name --> <xsl:apply-templates select=".//email|address/otheraddr/ulink" mode="authorsect"/> @@ -286,7 +286,7 @@ </xsl:template> <xsl:template match="corpauthor|corpcredit|orgname|publishername" mode="authorsect"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="."/> <xsl:text> </xsl:text> <xsl:if test="self::publishername"> @@ -296,7 +296,7 @@ </xsl:template> <xsl:template match="publisher" mode="authorsect"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="publishername"/> <!-- * Display e-mail address(es) and ulink(s) on same line as name --> <xsl:apply-templates select=".//email|address/otheraddr/ulink" mode="authorsect"/> @@ -307,8 +307,9 @@ </xsl:template> <xsl:template name="publisher.attribution"> - <xsl:text> .sp -1n </xsl:text> - <xsl:text>.IP ""</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$blurb-indent"/> @@ -378,7 +379,7 @@ <!-- * If contents are actually empty except for an email address --> <!-- * or ulink, then output nothing. --> <xsl:if test="$contents != ''"> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> <xsl:for-each select="shortaffil|jobtitle|orgname|orgdiv|address"> <!-- * only display output of nodes other than email or ulink --> <xsl:apply-templates select="node()[not(self::email) and not(self::otheraddr/ulink)]"/> @@ -399,7 +400,7 @@ <xsl:otherwise> <!-- * put a line break after every Affiliation instance except --> <!-- * the last one in the set --> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:if> @@ -413,7 +414,7 @@ <!-- * an email address or ulink, then output nothing. --> <xsl:if test="$contents != ''"> <xsl:text> </xsl:text> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> <!--* Skip email and ulink descendants of Address (rendered elsewhere) --> <xsl:apply-templates select="node()[not(self::email) and not(self::otheraddr/ulink)]"/> </xsl:if> @@ -430,8 +431,9 @@ <!-- * If we have no *blurb or contrib, but this is an Author or --> <!-- * Editor, then render the corresponding localized gentext --> <xsl:when test="self::author"> - <xsl:text> .sp -1n </xsl:text> - <xsl:text>.IP ""</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$blurb-indent"/> @@ -443,8 +445,9 @@ <xsl:text>. </xsl:text> </xsl:when> <xsl:when test="self::editor"> - <xsl:text> .sp -1n </xsl:text> - <xsl:text>.IP ""</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$blurb-indent"/> @@ -460,8 +463,9 @@ <xsl:when test="self::othercredit"> <xsl:choose> <xsl:when test="@class and @class != 'other'"> - <xsl:text> .sp -1n </xsl:text> - <xsl:text>.IP ""</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$blurb-indent"/> @@ -524,8 +528,9 @@ test="../personname|../surname|../firstname |../othername|../lineage|../honorific |../affiliation|../email|../address"> - <xsl:text> .sp -1n </xsl:text> - <xsl:text>.IP ""</xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$blurb-indent"/> @@ -538,12 +543,12 @@ <xsl:when test="not(preceding-sibling::*)"> <!-- * if this *blurb or contrib has no preceding --> <!-- * siblings, then we need to start a new paragraph --> - <xsl:text>.PP</xsl:text> + <xsl:text>⌂PP</xsl:text> </xsl:when> <xsl:otherwise> <!-- * otherwise, this has no preceding siblings, so --> <!-- * just put a linebreak --> - <xsl:text>.br</xsl:text> + <xsl:text>⌂br</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:otherwise> @@ -561,7 +566,7 @@ <xsl:param name="info"/> <xsl:choose> <xsl:when test="$info//copyright|$info//legalnotice"> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:call-template name="string.upper"> <xsl:with-param name="string"> <xsl:call-template name="gentext"> @@ -577,12 +582,14 @@ <xsl:apply-templates select="." mode="titlepage.mode"/> </xsl:variable> <xsl:value-of select="normalize-space($contents)"/> - <xsl:text> .br </xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:for-each> <xsl:text> </xsl:text> <xsl:for-each select="(($info[//legalnotice])[last()]//legalnotice)"> <xsl:apply-templates select="." mode="titlepage.mode"/> - <xsl:text> .br </xsl:text> + <xsl:text> </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:for-each> </xsl:when> <xsl:otherwise/> <!-- * do nothing, no copyright or legalnotice found --> Modified: trunk/xsl/manpages/links.xsl =================================================================== --- trunk/xsl/manpages/links.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/links.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -299,7 +299,7 @@ <xsl:param name="notesources"/> <xsl:call-template name="mark.subheading"/> <!-- * make the endnotes-list section heading --> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:call-template name="string.upper"> <xsl:with-param name="string"> <xsl:choose> @@ -321,7 +321,7 @@ <xsl:for-each select="$notesources"> <!-- * make paragraph with hanging indent, and starting with a --> <!-- * number in the form " 1." (padded to $man.indent.width - 1) --> - <xsl:text>.IP</xsl:text> + <xsl:text>⌂IP</xsl:text> <xsl:text> "</xsl:text> <xsl:variable name="endnote.number"> <xsl:apply-templates select="." mode="notesource.number"/> @@ -357,7 +357,7 @@ </xsl:choose> <xsl:text> </xsl:text> <xsl:if test="@url"> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -373,7 +373,7 @@ </xsl:if> <xsl:value-of select="@url"/> <xsl:text> </xsl:text> - <xsl:text>.RE</xsl:text> + <xsl:text>⌂RE</xsl:text> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> Modified: trunk/xsl/manpages/lists.xsl =================================================================== --- trunk/xsl/manpages/lists.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/lists.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -42,13 +42,13 @@ ]"> <!-- * Make sure multiple paragraphs within a list item don't --> <!-- * merge together. --> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:if> </xsl:template> <xsl:template match="variablelist|glosslist"> <xsl:if test="title"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> @@ -56,7 +56,7 @@ </xsl:template> <xsl:template match="varlistentry|glossentry"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:for-each select="term|glossterm"> <xsl:variable name="content"> <xsl:apply-templates/> @@ -76,20 +76,20 @@ <xsl:value-of select="$variablelist.term.separator"/> <xsl:if test="not($variablelist.term.break.after = '0')"> <xsl:text> </xsl:text> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:for-each> <xsl:text> </xsl:text> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:template> <xsl:template match="varlistentry/term"/> @@ -98,19 +98,19 @@ <xsl:template match="variablelist[ancestor::listitem or ancestor::step or ancestor::glossdef]| glosslist[ancestor::listitem or ancestor::step or ancestor::glossdef]"> <xsl:text> </xsl:text> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> <xsl:if test="following-sibling::node() or parent::para[following-sibling::node()] or parent::simpara[following-sibling::node()] or parent::remark[following-sibling::node()]"> - <xsl:text>.IP ""</xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -129,7 +129,7 @@ <!-- * processing before final output, the character-map will --> <!-- * handle conversion of the • to "\(bu" for us --> <xsl:text> </xsl:text> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -149,12 +149,12 @@ <xsl:text>'</xsl:text> </xsl:if> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:template> <xsl:template match="orderedlist/listitem|procedure/step"> <xsl:text> </xsl:text> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -177,13 +177,13 @@ <xsl:text>'</xsl:text> </xsl:if> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> <xsl:text> </xsl:text> </xsl:template> <xsl:template match="itemizedlist|orderedlist|procedure"> <xsl:if test="title"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> @@ -197,8 +197,8 @@ <!-- * it, within the same para, then add a blank line and move --> <!-- * the left margin back to where it was --> <xsl:if test="parent::para and following-sibling::node()"> - <xsl:text>.sp </xsl:text> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂sp </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:if> </xsl:template> @@ -206,7 +206,7 @@ orderedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]| procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]"> <xsl:if test="title"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> @@ -215,7 +215,7 @@ parent::para[following-sibling::node()] or parent::simpara[following-sibling::node()] or parent::remark[following-sibling::node()]"> - <xsl:text>.IP ""</xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -265,7 +265,7 @@ <!-- * list (ignoring the values of the type and columns attributes) --> <xsl:template match="simplelist"> <xsl:for-each select="member"> - <xsl:text>.IP ""</xsl:text> + <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -282,14 +282,14 @@ <!-- * is no option for outputting it in manpages in "list" form. --> <xsl:template match="segmentedlist"> <xsl:if test="title"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> - <xsl:text>.\" line length increase to cope w/ tbl weirdness </xsl:text> - <xsl:text>.ll +(\n(LLu * 62u / 100u) </xsl:text> + <xsl:text>⌂\" line length increase to cope w/ tbl weirdness </xsl:text> + <xsl:text>⌂ll +(\n(LLu * 62u / 100u) </xsl:text> <!-- * .TS = "Table Start" --> - <xsl:text>.TS </xsl:text> + <xsl:text>⌂TS </xsl:text> <!-- * first output the table "format" spec, which tells tbl(1) how --> <!-- * how to format each row and column. --> <xsl:for-each select=".//segtitle"> @@ -311,11 +311,11 @@ </xsl:choose> <xsl:apply-templates/> <!-- * .TE = "Table End" --> - <xsl:text>.TE </xsl:text> - <xsl:text>.\" line length decrease back to previous value </xsl:text> - <xsl:text>.ll -(\n(LLu * 62u / 100u) </xsl:text> + <xsl:text>⌂TE </xsl:text> + <xsl:text>⌂\" line length decrease back to previous value </xsl:text> + <xsl:text>⌂ll -(\n(LLu * 62u / 100u) </xsl:text> <!-- * put a blank line of space below the table --> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:template> <xsl:template match="segmentedlist/segtitle" mode="table-title"> Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/other.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -169,19 +169,19 @@ <xsl:param name="title"/> <xsl:param name="manual"/> <xsl:param name="source"/> - <xsl:text>.\" Title: </xsl:text> + <xsl:text>⌂\" Title: </xsl:text> <xsl:value-of select="$title"/> <xsl:text> </xsl:text> - <xsl:text>.\" Author: </xsl:text> + <xsl:text>⌂\" Author: </xsl:text> <xsl:call-template name="make.roff.metadata.author"> <xsl:with-param name="info" select="$info"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>.\" Generator: DocBook XSL Stylesheets v</xsl:text> + <xsl:text>⌂\" Generator: DocBook XSL Stylesheets v</xsl:text> <xsl:value-of select="$VERSION"/> <xsl:text> <http://docbook.sf.net/></xsl:text> <xsl:text> </xsl:text> - <xsl:text>.\" Date: </xsl:text> + <xsl:text>⌂\" Date: </xsl:text> <xsl:call-template name="string.subst"> <!-- * replace hyphens in date with dots --> <xsl:with-param name="string" select="$date"/> @@ -189,13 +189,13 @@ <xsl:with-param name="replacement" select="'.'"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>.\" Manual: </xsl:text> + <xsl:text>⌂\" Manual: </xsl:text> <xsl:value-of select="$manual"/> <xsl:text> </xsl:text> - <xsl:text>.\" Source: </xsl:text> + <xsl:text>⌂\" Source: </xsl:text> <xsl:value-of select="$source"/> <xsl:text> </xsl:text> - <xsl:text>.\"</xsl:text> + <xsl:text>⌂\"</xsl:text> <xsl:text> </xsl:text> </xsl:template> @@ -244,7 +244,7 @@ <!-- * is", unchanged from the DocBook source; and DTD-based --> <!-- * validation does not provide a way to constrain them to be --> <!-- * "space free" --> - <xsl:text>.TH "</xsl:text> + <xsl:text>⌂TH "</xsl:text> <xsl:call-template name="string.upper"> <xsl:with-param name="string"> <xsl:choose> @@ -306,32 +306,32 @@ <!-- * If the value of man.hypenate is zero (the default), then --> <!-- * disable hyphenation (".nh" = "no hyphenation") --> <xsl:if test="$man.hyphenate = 0"> - <xsl:text>.\" disable hyphenation </xsl:text> - <xsl:text>.nh </xsl:text> + <xsl:text>⌂\" disable hyphenation </xsl:text> + <xsl:text>⌂nh </xsl:text> </xsl:if> <!-- * If the value of man.justify is zero (the default), then --> <!-- * disable justification (".ad l" means "adjust to left only") --> <xsl:if test="$man.justify = 0"> - <xsl:text>.\" disable justification</xsl:text> + <xsl:text>⌂\" disable justification</xsl:text> <xsl:text> (adjust text to left margin only) </xsl:text> - <xsl:text>.ad l </xsl:text> + <xsl:text>⌂ad l </xsl:text> </xsl:if> <xsl:if test="not($man.indent.refsect = 0)"> - <xsl:text>.\" store initial "default indentation value" </xsl:text> - <xsl:text>.nr zq \n(IN </xsl:text> - <xsl:text>.\" adjust default indentation </xsl:text> - <xsl:text>.nr IN </xsl:text> + <xsl:text>⌂\" store initial "default indentation value" </xsl:text> + <xsl:text>⌂nr zq \n(IN </xsl:text> + <xsl:text>⌂\" adjust default indentation </xsl:text> + <xsl:text>⌂nr IN </xsl:text> <xsl:value-of select="$man.indent.width"/> <xsl:text> </xsl:text> - <xsl:text>.\" adjust indentation of SS headings </xsl:text> - <xsl:text>.nr SN \n(IN </xsl:text> + <xsl:text>⌂\" adjust indentation of SS headings </xsl:text> + <xsl:text>⌂nr SN \n(IN </xsl:text> </xsl:if> <!-- * Unless the value of man.break.after.slash is zero (the --> <!-- * default), tell groff that it is OK to break a line --> <!-- * after a slash when needed. --> <xsl:if test="$man.break.after.slash != 0"> - <xsl:text>.\" enable line breaks after slashes </xsl:text> - <xsl:text>.cflags 4 / </xsl:text> + <xsl:text>⌂\" enable line breaks after slashes </xsl:text> + <xsl:text>⌂cflags 4 / </xsl:text> </xsl:if> </xsl:template> Modified: trunk/xsl/manpages/refentry.xsl =================================================================== --- trunk/xsl/manpages/refentry.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/refentry.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -19,11 +19,11 @@ <xsl:when test="preceding-sibling::refnamediv"> <!-- * No title on secondary refnamedivs! --> <!-- * Just put a single line break instead --> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:when> <xsl:otherwise> <xsl:call-template name="mark.subheading"/> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:apply-templates select="." mode="title.markup"/> <xsl:text>"</xsl:text> <xsl:text> </xsl:text> @@ -65,7 +65,7 @@ <xsl:template match="refsynopsisdiv"> <xsl:call-template name="mark.subheading"/> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:apply-templates select="." mode="title.markup"/> <xsl:text>" </xsl:text> <xsl:call-template name="mark.subheading"/> @@ -77,7 +77,7 @@ <xsl:apply-templates select="." mode="title.markup"/> </xsl:variable> <xsl:call-template name="mark.subheading"/> - <xsl:text>.SH "</xsl:text> + <xsl:text>⌂SH "</xsl:text> <xsl:value-of select="normalize-space($title)"/> <xsl:text>" </xsl:text> <xsl:call-template name="mark.subheading"/> @@ -94,7 +94,7 @@ |title)[1]/node()"/> </xsl:variable> - <xsl:text>.SS "</xsl:text> + <xsl:text>⌂SS "</xsl:text> <xsl:value-of select="normalize-space($title)"/> <xsl:text>" </xsl:text> <xsl:call-template name="mark.subheading"/> @@ -102,9 +102,9 @@ <!-- * If default-indentation adjustment is on, then indent the --> <!-- * child content of this Refsect2 --> <xsl:when test="not($man.indent.refsect = 0)"> - <xsl:text>.RS </xsl:text> + <xsl:text>⌂RS </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:when> <xsl:otherwise> <!-- * If default-indentation adjustment is on, then do not --> @@ -131,9 +131,9 @@ <!-- * child content of this Refsect3 or Refsection. --> <xsl:when test="not($man.indent.refsect != 0)"> <xsl:call-template name="nested-section-title"/> - <xsl:text>.RS </xsl:text> + <xsl:text>⌂RS </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:when> <xsl:otherwise> <!-- * If default-indentation adjustment is on, then do not --> @@ -143,7 +143,7 @@ <!-- * actually means the title is indented by the value of --> <!-- * the SN register, which appears by default to be --> <!-- * about half of the default indentation value --> - <xsl:text>.ti (\n(SNu * 5u / 3u) </xsl:text> + <xsl:text>⌂ti (\n(SNu * 5u / 3u) </xsl:text> <xsl:call-template name="nested-section-title"/> <xsl:apply-templates/> </xsl:otherwise> @@ -169,9 +169,9 @@ </xsl:if> </xsl:variable> <xsl:call-template name="nested-section-title"/> - <xsl:text>.RS (\n(SNu) </xsl:text> + <xsl:text>⌂RS (\n(SNu) </xsl:text> <xsl:apply-templates/> - <xsl:text>.RE </xsl:text> + <xsl:text>⌂RE </xsl:text> </xsl:template> <!-- ==================================================================== --> Modified: trunk/xsl/manpages/synop.xsl =================================================================== --- trunk/xsl/manpages/synop.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/synop.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -50,9 +50,9 @@ <!-- * up one line vertically to negate the line of vertical space --> <!-- * that's added by the .HP macro --> <xsl:if test="preceding-sibling::*[1][self::synopfragment]"> - <xsl:text>.sp -1n </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> </xsl:if> - <xsl:text>.HP </xsl:text> + <xsl:text>⌂HP </xsl:text> <!-- * For each Synopfragment, make a hanging paragraph, with the --> <!-- * indent calculated from the length of the generated number --> <!-- * used as a reference + pluse 3 characters (for the open and --> @@ -150,30 +150,30 @@ <xsl:template match="sbr"> <xsl:text> </xsl:text> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> </xsl:template> <xsl:template match="cmdsynopsis"> <!-- * if justification is enabled by default, turn it off temporarily --> <xsl:if test="$man.justify != 0"> - <xsl:text>.ad l </xsl:text> + <xsl:text>⌂ad l </xsl:text> </xsl:if> <!-- * if hyphenation is enabled by default, turn it off temporarily --> <xsl:if test="$man.hyphenate != 0"> - <xsl:text>.hy 0 </xsl:text> + <xsl:text>⌂hy 0 </xsl:text> </xsl:if> - <xsl:text>.HP </xsl:text> + <xsl:text>⌂HP </xsl:text> <xsl:value-of select="string-length (normalize-space (command)) + 1"/> <xsl:text> </xsl:text> <xsl:apply-templates/> <xsl:text> </xsl:text> <!-- * if justification is enabled by default, turn it back on --> <xsl:if test="$man.justify != 0"> - <xsl:text>.ad </xsl:text> + <xsl:text>⌂ad </xsl:text> </xsl:if> <!-- * if hyphenation is enabled by default, turn it back on --> <xsl:if test="$man.hyphenate != 0"> - <xsl:text>.hy </xsl:text> + <xsl:text>⌂hy </xsl:text> </xsl:if> </xsl:template> @@ -191,20 +191,20 @@ <xsl:template match="funcsynopsis"> <!-- * if justification is enabled by default, turn it off temporarily --> <xsl:if test="$man.justify != 0"> - <xsl:text>.ad l </xsl:text> + <xsl:text>⌂ad l </xsl:text> </xsl:if> <!-- * if hyphenation is enabled by default, turn it off temporarily --> <xsl:if test="$man.hyphenate != 0"> - <xsl:text>.hy 0 </xsl:text> + <xsl:text>⌂hy 0 </xsl:text> </xsl:if> <xsl:apply-templates/> <!-- * if justification is enabled by default, turn it back on --> <xsl:if test="$man.justify != 0"> - <xsl:text>.ad </xsl:text> + <xsl:text>⌂ad </xsl:text> </xsl:if> <!-- * if hyphenation is enabled by default, turn it back on --> <xsl:if test="$man.hyphenate != 0"> - <xsl:text>.hy </xsl:text> + <xsl:text>⌂hy </xsl:text> </xsl:if> </xsl:template> @@ -232,7 +232,7 @@ <xsl:variable name="funcprototype"> <xsl:apply-templates select="funcdef"/> </xsl:variable> - <xsl:text>.HP </xsl:text> + <xsl:text>⌂HP </xsl:text> <!-- * Hang Paragraph by length of string value of <funcdef> + 1 --> <!-- * (because funcdef is always followed by one open paren char) --> <xsl:value-of select="string-length (normalize-space ($funcprototype.string.value)) + 1"/> Modified: trunk/xsl/manpages/table.xsl =================================================================== --- trunk/xsl/manpages/table.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/table.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -125,7 +125,7 @@ <!-- * Output table title --> <!-- * ============================================================== --> <xsl:if test="$title != '' or parent::td"> - <xsl:text>.PP </xsl:text> + <xsl:text>⌂PP </xsl:text> <xsl:text>.</xsl:text> <xsl:value-of select="$tbl.font.title"/> <xsl:text> </xsl:text> @@ -134,12 +134,12 @@ </xsl:if> <xsl:value-of select="normalize-space($title)"/> <xsl:text> </xsl:text> - <xsl:text>.sp -1n </xsl:text> + <xsl:text>⌂sp -1n </xsl:text> </xsl:if> <!-- * mark the start of the table --> <!-- * "TS" = "table start" --> - <xsl:text>.TS</xsl:text> + <xsl:text>⌂TS</xsl:text> <xsl:if test="thead and $tbl.running.header.from.thead"> <!-- * H = "has header" --> <xsl:text> H</xsl:text> @@ -175,7 +175,7 @@ <xsl:choose> <xsl:when test="$tbl.running.header.from.thead"> <!-- * "TH" = "table header end" --> - <xsl:text>.TH </xsl:text> + <xsl:text>⌂TH </xsl:text> </xsl:when> <xsl:otherwise> <!-- * "T&" = "table continuation" and is meant just as a kind --> @@ -186,7 +186,7 @@ <!-- * rows. It's necessary to output it here because the "TH" --> <!-- * macro is not being output, so there's otherwise no way --> <!-- * for tbl(1) to know we have the table "sectioned". --> - <xsl:text>.T& </xsl:text> + <xsl:text>⌂T& </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:if> @@ -208,9 +208,9 @@ <!-- * mark the end of the table --> <xsl:text> </xsl:text> <!-- * .TE = "Table End" --> - <xsl:text>.TE </xsl:text> + <xsl:text>⌂TE </xsl:text> <!-- * put a blank line of space below the table --> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> </xsl:for-each> </xsl:template> @@ -569,7 +569,7 @@ select=".//tgroup//footnote"/> <xsl:value-of select="$man.table.footnotes.divider"/> <xsl:text> </xsl:text> - <xsl:text>.br </xsl:text> + <xsl:text>⌂br </xsl:text> <xsl:apply-templates select="*[1]" mode="footnote.body.number"/> <xsl:apply-templates select="*[position() > 1]"/> </xsl:template> Modified: trunk/xsl/manpages/utility.xsl =================================================================== --- trunk/xsl/manpages/utility.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/manpages/utility.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -106,11 +106,11 @@ <xsl:template name="nested-section-title"> <!-- * The next few lines are some arcane roff code to control line --> <!-- * spacing after headings. --> - <xsl:text>.sp </xsl:text> - <xsl:text>.it 1 an-trap </xsl:text> - <xsl:text>.nr an-no-space-flag 1 </xsl:text> - <xsl:text>.nr an-break-flag 1 </xsl:text> - <xsl:text>.br </xsl:text> + <xsl:text>⌂sp </xsl:text> + <xsl:text>⌂it 1 an-trap </xsl:text> + <xsl:text>⌂nr an-no-space-flag 1 </xsl:text> + <xsl:text>⌂nr an-break-flag 1 </xsl:text> + <xsl:text>⌂br </xsl:text> <!-- * make title wrapper so that we can use mode="bold" template to --> <!-- * apply character formatting to it --> <xsl:variable name="title.wrapper"> @@ -148,7 +148,7 @@ <xsl:when test="self::address|self::literallayout|self::programlisting| self::screen|self::synopsis"> <xsl:text> </xsl:text> - <xsl:text>.sp </xsl:text> + <xsl:text>⌂sp </xsl:text> <xsl:call-template name="mark.up.block.start"/> <xsl:apply-templates select="."/> </xsl:when> @@ -260,7 +260,7 @@ preceding-sibling::note| preceding-sibling::tip| preceding-sibling::warning)"> - <xsl:text>.RS</xsl:text> + <xsl:text>⌂RS</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text> </xsl:text> <xsl:value-of select="$list-indent"/> @@ -297,7 +297,7 @@ tip| warning"> <xsl:text> </xsl:text> - <xsl:text>.RE</xsl:text> + <xsl:text>⌂RE</xsl:text> <xsl:text> </xsl:text> </xsl:if> </xsl:if> @@ -368,7 +368,7 @@ <!-- * in roff source (just to make things easier to read). --> <xsl:template name="mark.subheading"> <xsl:if test="$man.subheading.divider.enabled != 0"> - <xsl:text>.\" </xsl:text> + <xsl:text>⌂\" </xsl:text> <xsl:value-of select="$man.subheading.divider"/> <xsl:text> </xsl:text> </xsl:if> Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-14 20:21:31 UTC (rev 6492) @@ -14,15 +14,23 @@ <src:fragment id='man.string.subst.map.frag'> <xsl:param name="man.string.subst.map"> <substitution oldstring="\" newstring="\\"/> + <!-- * escape all dots (because roff interprets them as newlines if they --> + <!-- * occur at the beginning of a line --> + <substitution oldstring="." newstring="\."/> + <!-- * the stylesheets use U+2302 internally to represent the start of a --> + <!-- * roff request; for output, we need to convert that internal --> + <!-- * representation to the character that roff actually uses to mark --> + <!-- * the start of requests, which is a dot --> + <substitution oldstring="⌂" newstring="."/> <!-- * now, we need to restore single-backslashes in all roff --> - <!-- * requests (because the substitution above doubled them) --> + <!-- * requests (because slash substitution above doubled them) --> <substitution oldstring="\\fB" newstring="\fB"/> <substitution oldstring="\\fI" newstring="\fI"/> <substitution oldstring="\\fR" newstring="\fR"/> <substitution oldstring="\\n" newstring="\n"/> <substitution oldstring="\\h" newstring="\h"/> <!-- * requests in .SH sectsions output from Refsect1-level source --> - <!-- * end up getting capitalized... --> + <!-- * end up getting capitalized; the following changes fix that --> <substitution oldstring="\\FB" newstring="\fB"/> <substitution oldstring="\\FI" newstring="\fI"/> <substitution oldstring="\\FR" newstring="\fR"/> @@ -79,7 +87,6 @@ <!-- * for certain reasons, the stylesheets add it before and after --> <!-- * every Parameter in Funcprototype output --> <substitution oldstring=" " newstring=" "/> - <substitution oldstring="⌂" newstring="	"/> <!-- * --> <!-- * Now deal with some other characters that are added by the --> <!-- * stylesheets during processing. --> Modified: trunk/xsl/tools/xsl/build/html2roff.xsl =================================================================== --- trunk/xsl/tools/xsl/build/html2roff.xsl 2007-01-14 08:41:23 UTC (rev 6491) +++ trunk/xsl/tools/xsl/build/html2roff.xsl 2007-01-14 20:21:31 UTC (rev 6492) @@ -45,12 +45,13 @@ </xsl:template> <xsl:template match="pre"> - <xsl:element name="xsl:text">.sp </xsl:element> - <xsl:element name="xsl:text">.nf </xsl:element> + <xsl:element name="xsl:text">⌂sp </xsl:element> + <xsl:element name="xsl:text">⌂nf </xsl:element> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> - <xsl:element name="xsl:text"> .fi </xsl:element> + <xsl:element name="xsl:text"> </xsl:element> + <xsl:element name="xsl:text">⌂fi </xsl:element> </xsl:template> </xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-15 17:16:05
|
Revision: 6501 http://svn.sourceforge.net/docbook/?rev=6501&view=rev Author: xmldoc Date: 2007-01-15 09:15:40 -0800 (Mon, 15 Jan 2007) Log Message: ----------- Changed manpages stylesheet to always output a U+2591 character as the internal representation of a dash. The string-substitution map is then used to output a real dash when the final contents are serialized. Also, made a change that causes dots and dashes in the top comment to be unescaped. Modified Paths: -------------- trunk/xsl/manpages/info.xsl trunk/xsl/manpages/lists.xsl trunk/xsl/manpages/other.xsl trunk/xsl/manpages/synop.xsl trunk/xsl/manpages/table.xsl trunk/xsl/manpages/utility.xsl trunk/xsl/params/man.string.subst.map.xml Modified: trunk/xsl/manpages/info.xsl =================================================================== --- trunk/xsl/manpages/info.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/info.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -308,7 +308,7 @@ <xsl:template name="publisher.attribution"> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> @@ -432,7 +432,7 @@ <!-- * Editor, then render the corresponding localized gentext --> <xsl:when test="self::author"> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> @@ -446,7 +446,7 @@ </xsl:when> <xsl:when test="self::editor"> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> @@ -464,7 +464,7 @@ <xsl:choose> <xsl:when test="@class and @class != 'other'"> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> @@ -529,7 +529,7 @@ |../othername|../lineage|../honorific |../affiliation|../email|../address"> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> <xsl:text>⌂IP ""</xsl:text> <xsl:if test="not($blurb-indent = '')"> <xsl:text> </xsl:text> Modified: trunk/xsl/manpages/lists.xsl =================================================================== --- trunk/xsl/manpages/lists.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/lists.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -135,7 +135,7 @@ <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> - <xsl:text>\h'-</xsl:text> + <xsl:text>\h'░</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent"/> @@ -160,7 +160,7 @@ <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> - <xsl:text>\h'-</xsl:text> + <xsl:text>\h'░</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent"/> @@ -314,7 +314,7 @@ <!-- * .TE = "Table End" --> <xsl:text>⌂TE </xsl:text> <xsl:text>⌂\" line length decrease back to previous value </xsl:text> - <xsl:text>⌂ll -(\n(LLu * 62u / 100u) </xsl:text> + <xsl:text>⌂ll ░(\n(LLu * 62u / 100u) </xsl:text> <!-- * put a blank line of space below the table --> <xsl:text>⌂sp </xsl:text> </xsl:template> Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/other.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -170,30 +170,39 @@ <xsl:param name="manual"/> <xsl:param name="source"/> <xsl:text>⌂\" Title: </xsl:text> - <xsl:value-of select="$title"/> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content" select="$title"/> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>⌂\" Author: </xsl:text> - <xsl:call-template name="make.roff.metadata.author"> - <xsl:with-param name="info" select="$info"/> - </xsl:call-template> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content"> + <xsl:call-template name="make.roff.metadata.author"> + <xsl:with-param name="info" select="$info"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>⌂\" Generator: DocBook XSL Stylesheets v</xsl:text> - <xsl:value-of select="$VERSION"/> - <xsl:text> <http://docbook.sf.net/></xsl:text> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content" select="$VERSION"/> + </xsl:call-template> + <xsl:text> <http://docbook⌂sf⌂net/></xsl:text> <xsl:text> </xsl:text> <xsl:text>⌂\" Date: </xsl:text> - <xsl:call-template name="string.subst"> - <!-- * replace hyphens in date with dots --> - <xsl:with-param name="string" select="$date"/> - <xsl:with-param name="target" select="'-'"/> - <xsl:with-param name="replacement" select="'.'"/> - </xsl:call-template> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content" select="$date"/> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>⌂\" Manual: </xsl:text> - <xsl:value-of select="$manual"/> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content" select="$manual"/> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>⌂\" Source: </xsl:text> - <xsl:value-of select="$source"/> + <xsl:call-template name="replace.dots.and.dashes"> + <xsl:with-param name="content" select="$source"/> + </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>⌂\"</xsl:text> <xsl:text> </xsl:text> Modified: trunk/xsl/manpages/synop.xsl =================================================================== --- trunk/xsl/manpages/synop.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/synop.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -50,7 +50,7 @@ <!-- * up one line vertically to negate the line of vertical space --> <!-- * that's added by the .HP macro --> <xsl:if test="preceding-sibling::*[1][self::synopfragment]"> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> </xsl:if> <xsl:text>⌂HP </xsl:text> <!-- * For each Synopfragment, make a hanging paragraph, with the --> @@ -237,7 +237,7 @@ <!-- * (because funcdef is always followed by one open paren char) --> <xsl:value-of select="string-length (normalize-space ($funcprototype.string.value)) + 1"/> <xsl:text> </xsl:text> - <xsl:text>.</xsl:text> + <xsl:text>⌂</xsl:text> <xsl:value-of select="$man.font.funcprototype"/> <xsl:text> </xsl:text> <!-- * The following quotation mark (and the one further below) are --> Modified: trunk/xsl/manpages/table.xsl =================================================================== --- trunk/xsl/manpages/table.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/table.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -134,7 +134,7 @@ </xsl:if> <xsl:value-of select="normalize-space($title)"/> <xsl:text> </xsl:text> - <xsl:text>⌂sp -1n </xsl:text> + <xsl:text>⌂sp ░1n </xsl:text> </xsl:if> <!-- * mark the start of the table --> Modified: trunk/xsl/manpages/utility.xsl =================================================================== --- trunk/xsl/manpages/utility.xsl 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/manpages/utility.xsl 2007-01-15 17:15:40 UTC (rev 6501) @@ -101,15 +101,39 @@ <!-- ================================================================== --> + <!-- * The replace.dots.and.dashes template is used to cause real --> + <!-- * dots and dashes to be output in the top comment (instead of --> + <!-- * escaped ones as in the source for the text displayed in the --> + <!-- * body of the page) --> + <xsl:template name="replace.dots.and.dashes"> + <xsl:param name="content"> + <xsl:apply-templates/> + </xsl:param> + <xsl:variable name="dot-content"> + <xsl:call-template name="string.subst"> + <xsl:with-param name="string" select="$content"/> + <xsl:with-param name="target" select="'.'"/> + <xsl:with-param name="replacement" select="'⌂'"/> + </xsl:call-template> + </xsl:variable> + <xsl:call-template name="string.subst"> + <xsl:with-param name="string" select="$dot-content"/> + <xsl:with-param name="target" select="'-'"/> + <xsl:with-param name="replacement" select="'░'"/> + </xsl:call-template> + </xsl:template> + + <!-- ================================================================== --> + <!-- * The nested-section-title template is called for refsect3, and any --> <!-- * refsection nested more than 2 levels deep. --> <xsl:template name="nested-section-title"> <!-- * The next few lines are some arcane roff code to control line --> <!-- * spacing after headings. --> <xsl:text>⌂sp </xsl:text> - <xsl:text>⌂it 1 an-trap </xsl:text> - <xsl:text>⌂nr an-no-space-flag 1 </xsl:text> - <xsl:text>⌂nr an-break-flag 1 </xsl:text> + <xsl:text>⌂it 1 an░trap </xsl:text> + <xsl:text>⌂nr an░no░space░flag 1 </xsl:text> + <xsl:text>⌂nr an░break░flag 1 </xsl:text> <xsl:text>⌂br </xsl:text> <!-- * make title wrapper so that we can use mode="bold" template to --> <!-- * apply character formatting to it --> Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2007-01-15 15:41:06 UTC (rev 6500) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-15 17:15:40 UTC (rev 6501) @@ -44,14 +44,8 @@ <!-- * argument for a command across a line, if that argument contains --> <!-- * a dash/hyphen); so, we must globally change all hyphens to "\-" --> <substitution oldstring="-" newstring="\-"/> - <!-- * now, we need to restore single-hypens in all roff requests --> - <!-- * (because the substitution above added backslashes before them) --> - <substitution oldstring="\h'\-" newstring="\h'-"/> - <substitution oldstring=".sp \-" newstring=".sp -"/> - <substitution oldstring=".it 1 an\-trap" newstring=".it 1 an-trap"/> - <substitution oldstring=".nr an\-no\-space\-flag 1" newstring=".nr an-no-space-flag 1"/> - <substitution oldstring=".nr an\-break\-flag 1" newstring=".nr an-break-flag 1"/> - <substitution oldstring=".ll \-" newstring=".ll -"/> + <!-- * restore dashes in all roff requests and comments --> + <substitution oldstring="░" newstring="-"/> <!-- * squeeze multiple newlines before a roff request --> <substitution oldstring=" ." newstring=" ."/> <!-- * remove any .sp occurences that directly follow a .PP --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-18 02:54:58
|
Revision: 6510 http://svn.sourceforge.net/docbook/?rev=6510&view=rev Author: xmldoc Date: 2007-01-17 18:54:56 -0800 (Wed, 17 Jan 2007) Log Message: ----------- wordml->roundtrip name change Modified Paths: -------------- trunk/xsl/README trunk/xsl/roundtrip/param.xweb trunk/xsl/tools/xsl/build/make-xsl-params.xsl Modified: trunk/xsl/README =================================================================== --- trunk/xsl/README 2007-01-18 02:53:37 UTC (rev 6509) +++ trunk/xsl/README 2007-01-18 02:54:56 UTC (rev 6510) @@ -61,17 +61,8 @@ manpages/docbook.xsl - for groff/nroff man pages[1] [1] more information at http://wiki.docbook.org/topic/ManPages - wordml/docbook.xsl - DocBook XML to WordML - wordml/docbook-pages.xsl - DocBook XML to Pages index.xml - wordml/pages-normalise.xsl - Pages index.xml to (1a) + roundtrip/*.xsl - for DocBook to WordML, etc., to DocBook -To convert WordML into DocBook, use the following chain of stylesheets: - - wordml/wordml-normalise.xsl - WordML to (1w) - wordml/wordml-sections.xsl - (1a or 1w) to (2) - wordml/wordml-blocks.xsl - (2) to (3) - wordml/wordml-final.xsl - (3) to DocBook XML - To transform documents created with the DocBook Slides schema/DTD, use one of the following stylesheets: @@ -126,7 +117,8 @@ slides/ for producing slides output (from Slides source) template/ templates for building stylesheet customization layers website/ for producing website output (from Website source) -wordml/ for "round trip" conversion between DocBook XML and WordML +roundtrip/ for "round trip" conversion among DocBook and + various word-processor formats (WordML, etc.) xhtml/ for producing XHTML ---------------------------------------------------------------------- Modified: trunk/xsl/roundtrip/param.xweb =================================================================== --- trunk/xsl/roundtrip/param.xweb 2007-01-18 02:53:37 UTC (rev 6509) +++ trunk/xsl/roundtrip/param.xweb 2007-01-18 02:54:56 UTC (rev 6510) @@ -6,7 +6,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <bookinfo> - <title>WordML Parameter Reference</title> + <title>Roundtrip Parameter Reference</title> <releaseinfo role="meta"> $Id$ </releaseinfo> @@ -21,8 +21,9 @@ </copyright> <abstract> <para>This is reference documentation for all user-configurable - parameters in the DocBook WordML Stylesheets (for generating - WordML or Apple Pages output).</para> + parameters in the DocBook “Roundtrip” Stylesheets (for + transforming DocBook to WordML, OpenDocument, and Apple Pages, + and for converting from those formats back to DocBook).</para> </abstract> </bookinfo> Modified: trunk/xsl/tools/xsl/build/make-xsl-params.xsl =================================================================== --- trunk/xsl/tools/xsl/build/make-xsl-params.xsl 2007-01-18 02:53:37 UTC (rev 6509) +++ trunk/xsl/tools/xsl/build/make-xsl-params.xsl 2007-01-18 02:54:56 UTC (rev 6510) @@ -18,7 +18,7 @@ <!-- ==================================================================== --> <!-- * This stylesheet expects itself as input --> - <xsl:param name="param.dirs">html fo manpages wordml</xsl:param> + <xsl:param name="param.dirs">html fo manpages roundtrip</xsl:param> <xsl:template match="/"> <xslt:stylesheet version="1.0"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-18 15:44:24
|
Revision: 6524 http://svn.sourceforge.net/docbook/?rev=6524&view=rev Author: xmldoc Date: 2007-01-18 07:44:19 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Adjusted manpages stylesheet to use U+2593 as the internal representation for the backslash character within the stylesheet. This prevents backslashes in source content from getting eaten. Closes #1609425. Thanks to Paul DuBois for reporting the bug. Modified Paths: -------------- trunk/xsl/manpages/info.xsl trunk/xsl/manpages/links.xsl trunk/xsl/manpages/lists.xsl trunk/xsl/manpages/other.xsl trunk/xsl/manpages/refentry.xsl trunk/xsl/manpages/table.xsl trunk/xsl/manpages/utility.xsl trunk/xsl/params/man.string.subst.map.xml Modified: trunk/xsl/manpages/info.xsl =================================================================== --- trunk/xsl/manpages/info.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/info.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -25,7 +25,7 @@ <!-- * preserving the original default indent value --> <!-- * when $man.indent.refsect is non-zero; --> <!-- * "u" is a roff unit specifier --> - <xsl:text>\n(zqu</xsl:text> + <xsl:text>▓n(zqu</xsl:text> </xsl:when> <xsl:otherwise/> <!-- * otherwise, just leave it empty --> </xsl:choose> @@ -339,7 +339,7 @@ <!-- * angle bracket and before the closing angle bracket is to --> <!-- * prevent groff from inserting a linebreak at those points and --> <!-- * outputting a hyphen character where the break occurs --> - <xsl:text><\&</xsl:text> + <xsl:text><▓&</xsl:text> <xsl:choose> <xsl:when test="self::email"> <xsl:variable name="contents"> @@ -354,7 +354,7 @@ <xsl:value-of select="normalize-space($contents)"/> </xsl:when> </xsl:choose> - <xsl:text>\&></xsl:text> + <xsl:text>▓&></xsl:text> <xsl:choose> <xsl:when test="not(following-sibling::*[descendant-or-self::email] or following-sibling::address/otheraddr/ulink Modified: trunk/xsl/manpages/links.xsl =================================================================== --- trunk/xsl/manpages/links.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/links.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -172,7 +172,7 @@ <xsl:if test="$man.hyphenate.urls = 0 and $man.break.after.slash = 0"> <xsl:call-template name="suppress.hyphenation"/> - <xsl:text>\%</xsl:text> + <xsl:text>▓%</xsl:text> </xsl:if> <xsl:value-of select="$earmark"/> </xsl:otherwise> @@ -220,7 +220,7 @@ <!-- * This formatting should probably be made user-configurable, --> <!-- * to allow something other than just square brackets; e.g., --> <!-- * Angle brackets<10> or Braces{10} --> - <xsl:text>\&[</xsl:text> + <xsl:text>▓&[</xsl:text> <xsl:value-of select="$notesource.number"/> <xsl:text>]</xsl:text> <!-- * Note that the reason for the \& before the opening bracket --> @@ -369,7 +369,7 @@ <xsl:if test="$man.hyphenate.urls = 0 and $man.break.after.slash = 0"> <xsl:call-template name="suppress.hyphenation"/> - <xsl:text>\%</xsl:text> + <xsl:text>▓%</xsl:text> </xsl:if> <xsl:value-of select="@url"/> <xsl:text> </xsl:text> Modified: trunk/xsl/manpages/lists.xsl =================================================================== --- trunk/xsl/manpages/lists.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/lists.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -22,7 +22,7 @@ <!-- * preserving the original default indent value --> <!-- * when $man.indent.refsect is non-zero; --> <!-- * "u" is a roff unit specifier --> - <xsl:text>\n(zqu</xsl:text> + <xsl:text>▓n(zqu</xsl:text> </xsl:when> <xsl:otherwise/> <!-- * otherwise, just leave it empty --> </xsl:choose> @@ -135,14 +135,14 @@ <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> - <xsl:text>\h'░</xsl:text> + <xsl:text>▓h'░</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text>'</xsl:text> <xsl:text>•</xsl:text> - <xsl:text>\h'+</xsl:text> + <xsl:text>▓h'+</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent - 1"/> @@ -160,7 +160,7 @@ <xsl:value-of select="$list-indent"/> </xsl:if> <xsl:text> </xsl:text> - <xsl:text>\h'░</xsl:text> + <xsl:text>▓h'░</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent"/> @@ -170,7 +170,7 @@ <xsl:text> </xsl:text> </xsl:if> <xsl:number format="1."/> - <xsl:text>\h'+</xsl:text> + <xsl:text>▓h'+</xsl:text> <xsl:if test="not($list-indent = '')"> <xsl:text>0</xsl:text> <xsl:value-of select="$list-indent - 2"/> @@ -286,8 +286,8 @@ <xsl:apply-templates mode="bold" select="title"/> <xsl:text> </xsl:text> </xsl:if> - <xsl:text>⌂\" line length increase to cope w/ tbl weirdness </xsl:text> - <xsl:text>⌂ll +(\n(LLu * 62u / 100u) </xsl:text> + <xsl:text>⌂▓" line length increase to cope w/ tbl weirdness </xsl:text> + <xsl:text>⌂ll +(▓n(LLu * 62u / 100u) </xsl:text> <!-- * .TS = "Table Start" --> <xsl:text>⌂TS </xsl:text> <!-- * first output the table "format" spec, which tells tbl(1) how --> @@ -313,8 +313,8 @@ <xsl:apply-templates/> <!-- * .TE = "Table End" --> <xsl:text>⌂TE </xsl:text> - <xsl:text>⌂\" line length decrease back to previous value </xsl:text> - <xsl:text>⌂ll ░(\n(LLu * 62u / 100u) </xsl:text> + <xsl:text>⌂▓" line length decrease back to previous value </xsl:text> + <xsl:text>⌂ll ░(▓n(LLu * 62u / 100u) </xsl:text> <!-- * put a blank line of space below the table --> <xsl:text>⌂sp </xsl:text> </xsl:template> Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/other.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -169,12 +169,12 @@ <xsl:param name="title"/> <xsl:param name="manual"/> <xsl:param name="source"/> - <xsl:text>⌂\" Title: </xsl:text> + <xsl:text>⌂▓" Title: </xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content" select="$title"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>⌂\" Author: </xsl:text> + <xsl:text>⌂▓" Author: </xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content"> <xsl:call-template name="make.roff.metadata.author"> @@ -183,28 +183,28 @@ </xsl:with-param> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>⌂\" Generator: DocBook XSL Stylesheets v</xsl:text> + <xsl:text>⌂▓" Generator: DocBook XSL Stylesheets v</xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content" select="$VERSION"/> </xsl:call-template> <xsl:text> <http://docbook⌂sf⌂net/></xsl:text> <xsl:text> </xsl:text> - <xsl:text>⌂\" Date: </xsl:text> + <xsl:text>⌂▓" Date: </xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content" select="$date"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>⌂\" Manual: </xsl:text> + <xsl:text>⌂▓" Manual: </xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content" select="$manual"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>⌂\" Source: </xsl:text> + <xsl:text>⌂▓" Source: </xsl:text> <xsl:call-template name="replace.dots.and.dashes"> <xsl:with-param name="content" select="$source"/> </xsl:call-template> <xsl:text> </xsl:text> - <xsl:text>⌂\"</xsl:text> + <xsl:text>⌂▓"</xsl:text> <xsl:text> </xsl:text> </xsl:template> @@ -315,31 +315,31 @@ <!-- * If the value of man.hypenate is zero (the default), then --> <!-- * disable hyphenation (".nh" = "no hyphenation") --> <xsl:if test="$man.hyphenate = 0"> - <xsl:text>⌂\" disable hyphenation </xsl:text> + <xsl:text>⌂▓" disable hyphenation </xsl:text> <xsl:text>⌂nh </xsl:text> </xsl:if> <!-- * If the value of man.justify is zero (the default), then --> <!-- * disable justification (".ad l" means "adjust to left only") --> <xsl:if test="$man.justify = 0"> - <xsl:text>⌂\" disable justification</xsl:text> + <xsl:text>⌂▓" disable justification</xsl:text> <xsl:text> (adjust text to left margin only) </xsl:text> <xsl:text>⌂ad l </xsl:text> </xsl:if> <xsl:if test="not($man.indent.refsect = 0)"> - <xsl:text>⌂\" store initial "default indentation value" </xsl:text> - <xsl:text>⌂nr zq \n(IN </xsl:text> - <xsl:text>⌂\" adjust default indentation </xsl:text> + <xsl:text>⌂▓" store initial "default indentation value" </xsl:text> + <xsl:text>⌂nr zq ▓n(IN </xsl:text> + <xsl:text>⌂▓" adjust default indentation </xsl:text> <xsl:text>⌂nr IN </xsl:text> <xsl:value-of select="$man.indent.width"/> <xsl:text> </xsl:text> - <xsl:text>⌂\" adjust indentation of SS headings </xsl:text> - <xsl:text>⌂nr SN \n(IN </xsl:text> + <xsl:text>⌂▓" adjust indentation of SS headings </xsl:text> + <xsl:text>⌂nr SN ▓n(IN </xsl:text> </xsl:if> <!-- * Unless the value of man.break.after.slash is zero (the --> <!-- * default), tell groff that it is OK to break a line --> <!-- * after a slash when needed. --> <xsl:if test="$man.break.after.slash != 0"> - <xsl:text>⌂\" enable line breaks after slashes </xsl:text> + <xsl:text>⌂▓" enable line breaks after slashes </xsl:text> <xsl:text>⌂cflags 4 / </xsl:text> </xsl:if> </xsl:template> Modified: trunk/xsl/manpages/refentry.xsl =================================================================== --- trunk/xsl/manpages/refentry.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/refentry.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -143,7 +143,7 @@ <!-- * actually means the title is indented by the value of --> <!-- * the SN register, which appears by default to be --> <!-- * about half of the default indentation value --> - <xsl:text>⌂ti (\n(SNu * 5u / 3u) </xsl:text> + <xsl:text>⌂ti (▓n(SNu * 5u / 3u) </xsl:text> <xsl:call-template name="nested-section-title"/> <xsl:apply-templates/> </xsl:otherwise> @@ -165,11 +165,11 @@ <xsl:if test="not($man.indent.refsect = 0)"> <!-- * If default-indentation adjustment is on, then indent the --> <!-- * child content of this Refsect3 or Refsection. --> - <xsl:text>(\n(SNu) </xsl:text> + <xsl:text>(▓n(SNu) </xsl:text> </xsl:if> </xsl:variable> <xsl:call-template name="nested-section-title"/> - <xsl:text>⌂RS (\n(SNu) </xsl:text> + <xsl:text>⌂RS (▓n(SNu) </xsl:text> <xsl:apply-templates/> <xsl:text>⌂RE </xsl:text> </xsl:template> Modified: trunk/xsl/manpages/table.xsl =================================================================== --- trunk/xsl/manpages/table.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/table.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -380,7 +380,7 @@ >tbl convert : Extracted a nested table</xsl:text> </xsl:with-param> </xsl:call-template> - <xsl:text>[\fInested table\fR]* </xsl:text> + <xsl:text>[▓fInested table▓fR]* </xsl:text> </xsl:when> <xsl:otherwise> <!-- * Apply templates to the child contents of this cell, to --> Modified: trunk/xsl/manpages/utility.xsl =================================================================== --- trunk/xsl/manpages/utility.xsl 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/manpages/utility.xsl 2007-01-18 15:44:19 UTC (rev 6524) @@ -37,17 +37,17 @@ <xsl:template mode="bold" match="*"> <xsl:for-each select="node()"> - <xsl:text>\fB</xsl:text> + <xsl:text>▓fB</xsl:text> <xsl:apply-templates select="."/> - <xsl:text>\fR</xsl:text> + <xsl:text>▓fR</xsl:text> </xsl:for-each> </xsl:template> <xsl:template mode="italic" match="*"> <xsl:for-each select="node()"> - <xsl:text>\fI</xsl:text> + <xsl:text>▓fI</xsl:text> <xsl:apply-templates select="."/> - <xsl:text>\fR</xsl:text> + <xsl:text>▓fR</xsl:text> </xsl:for-each> </xsl:template> @@ -95,7 +95,7 @@ <xsl:if test="$man.hyphenate != 0 and not(ancestor::cmdsynopsis) and not(ancestor::funcsynopsis)"> - <xsl:text>\%</xsl:text> + <xsl:text>▓%</xsl:text> </xsl:if> </xsl:template> @@ -392,7 +392,7 @@ <!-- * in roff source (just to make things easier to read). --> <xsl:template name="mark.subheading"> <xsl:if test="$man.subheading.divider.enabled != 0"> - <xsl:text>⌂\" </xsl:text> + <xsl:text>⌂▓" </xsl:text> <xsl:value-of select="$man.subheading.divider"/> <xsl:text> </xsl:text> </xsl:if> Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2007-01-18 09:18:11 UTC (rev 6523) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-18 15:44:19 UTC (rev 6524) @@ -13,39 +13,44 @@ <refsynopsisdiv> <src:fragment id='man.string.subst.map.frag'> <xsl:param name="man.string.subst.map"> + + <!-- ******************************************************************** --> + <!-- * --> + <!-- * The backslash and dot (\, .) characters have special meaning --> + <!-- * for roff, so we escape those characters when they appear in --> + <!-- * the source content, and we use certain (arbitrarily --> + <!-- * selected) Unicode characters as the internal representations --> + <!-- * for those characters, then replace them with real --> + <!-- * backslashes and dots in output. In addition, for certain --> + <!-- * reasons, we do the same thing for dashes. The mappings of --> + <!-- * those characters to the Unicode characters we use to --> + <!-- * represent them is hard-coded: --> + <!-- * --> + <!-- * - U+2591 = dash --> + <!-- * - U+2593 = backslash --> + <!-- * - U+2302 = dot --> + <!-- * --> + <!-- ******************************************************************** --> + + <!-- * escape dashes in content --> + <substitution oldstring="-" newstring="\-"/> + <!-- * replace U+2591 marker with dash --> + <substitution oldstring="░" newstring="-"/> + <!-- * escape backslashes in content --> <substitution oldstring="\" newstring="\\"/> - <!-- * escape all dots at the beginnings of lines (because roff --> - <!-- * interprets them as the start of roff requests) --> + <!-- * fix bad font-request capitalization in .SH (stylesheet artifact) --> + <substitution oldstring="▓FB" newstring="\fB"/> + <substitution oldstring="▓FI" newstring="\fI"/> + <substitution oldstring="▓FR" newstring="\fR"/> + <!-- * replace U+2593 marker with backslash --> + <substitution oldstring="▓" newstring="\"/> + <!-- * escape dashes in content (only at line beginnings) --> <substitution oldstring=" ." newstring=" \&."/> - <!-- * the stylesheets use U+2302 internally to represent the start of a --> - <!-- * roff request; for output, we need to convert that internal --> - <!-- * representation to the character that roff actually uses to mark --> - <!-- * the start of requests, which is a dot --> + <!-- * replace U+2302 marker with dot --> <substitution oldstring="⌂" newstring="."/> - <!-- * now, we need to restore single-backslashes in all roff --> - <!-- * requests (because slash substitution above doubled them) --> - <substitution oldstring="\\fB" newstring="\fB"/> - <substitution oldstring="\\fI" newstring="\fI"/> - <substitution oldstring="\\fR" newstring="\fR"/> - <substitution oldstring="\\n" newstring="\n"/> - <substitution oldstring="\\h" newstring="\h"/> - <!-- * requests in .SH sectsions output from Refsect1-level source --> - <!-- * end up getting capitalized; the following changes fix that --> - <substitution oldstring="\\FB" newstring="\fB"/> - <substitution oldstring="\\FI" newstring="\fI"/> - <substitution oldstring="\\FR" newstring="\fR"/> - <substitution oldstring='\\%' newstring='\%'/> - <substitution oldstring='\\&' newstring='\&'/> - <substitution oldstring='.\\"' newstring='.\"'/> - <!-- * although the groff docs do not make it clear, it appears that --> - <!-- * the only way to get a non-breaking hyphen in roff is to put a --> - <!-- * backslash in front of it; and, unfortunately, groff is not smart --> - <!-- * about where it breaks things (for example, it'll break an --> - <!-- * argument for a command across a line, if that argument contains --> - <!-- * a dash/hyphen); so, we must globally change all hyphens to "\-" --> - <substitution oldstring="-" newstring="\-"/> - <!-- * restore dashes in all roff requests and comments --> - <substitution oldstring="░" newstring="-"/> + + <!-- ==================================================================== --> + <!-- * squeeze multiple newlines before a roff request --> <substitution oldstring=" ." newstring=" ."/> <!-- * remove any .sp occurences that directly follow a .PP --> @@ -147,10 +152,6 @@ causes target strings to be replaced in roff requests and escapes, not just in the visible contents.</para> - <para>In particular, do not attempt to add a mapping for the - dot/period character. Doing so will break your output. For an - explanation, see <xref linkend="Dots"/>.</para> - </warning> <refsect2 id="map"> @@ -178,20 +179,44 @@ </para> </refsect2> -<refsect2 id="Dots"> - <title>About adding backslashes before dots</title> - <para>The stylesheets do not add backslashes before - periods/dots. One reason is that, because string substitution is - performed over the entire roff source of each man page, it would be - complicated to replace dots in visible contents without also causing - them to be replaced in roff requests and escapes; for example, - without causing, say, the <literal>.TH</literal> roff macro to be - replaced with <literal>\.TH</literal>. Additionally, backslashes in - front of periods/dots are needed only in the very rare case where a - period is the very first character in a line, without any space in - front of it. A better way to deal with that rare case is to add a - zero-width space in front of the offending dot(s) in your - source.</para> +<refsect2 id="escape-replace"> + <title>About escaping and replacing backslash, dot, and dash</title> + <para>The backslash and dot (\, .) characters have special meaning + for roff, so we: + + <itemizedlist> + <listitem> + <para>escape backslashes and dots where they appear in the + source content</para> + </listitem> + <listitem> + <para>use certain (arbitrarily selected) Unicode characters as + “markers” – internal representations within the stylesheet – for + backslashes and dots</para> + </listitem> + <listitem> + <para>replace the Unicode characters with real backslashes and + dotes before output gets serialized</para> + </listitem> + </itemizedlist> + + In addition, for certain reasons, we do the same thing for + dashes.</para> + + <para>The mappings of dash, backslash, and dot to the Unicode + characters we use to represent them is hard-coded in the stylesheet: + + <itemizedlist> + <listitem><para><literal>U+2591</literal> = dash</para></listitem> + <listitem><para><literal>U+2593</literal> = backslash</para></listitem> + <listitem><para><literal>U+2302</literal> = dot</para></listitem> + </itemizedlist> + + Those Unicode characters were chosen on the assumption that they are + never used in content intended for output to man pages. It would be + possible to provide a way for configuring the mappings (using XSLT + parameters), but doing so would make the stylesheet code much more + verbose and harder to read.</para> </refsect2> </refsect1> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-19 02:58:54
|
Revision: 6526 http://svn.sourceforge.net/docbook/?rev=6526&view=rev Author: xmldoc Date: 2007-01-18 18:58:50 -0800 (Thu, 18 Jan 2007) Log Message: ----------- Use U+2592 as an internal marker for linebreak around sbr output (to prevent the break from getting eaten by some normalization that the stylesheet does on synopses). Use U+2580 as an internal marker for no-break space (to work around a similar issue). Closes bug #1612808. Thanks to Simon Walter for reporting it (the sbr bug). Modified Paths: -------------- trunk/xsl/manpages/synop.xsl trunk/xsl/manpages/table.xsl trunk/xsl/manpages/utility.xsl trunk/xsl/params/man.string.subst.map.xml Modified: trunk/xsl/manpages/synop.xsl =================================================================== --- trunk/xsl/manpages/synop.xsl 2007-01-18 16:08:47 UTC (rev 6525) +++ trunk/xsl/manpages/synop.xsl 2007-01-19 02:58:50 UTC (rev 6526) @@ -28,7 +28,7 @@ <xsl:text>(</xsl:text> <xsl:value-of select="$snum"/> <xsl:text>)</xsl:text> - <xsl:text> </xsl:text> + <xsl:text>▀</xsl:text> <xsl:variable name="synopfragmentref"> <FragRefContents><xsl:value-of select="normalize-space(.)"/></FragRefContents> </xsl:variable> @@ -149,8 +149,8 @@ </xsl:template> <xsl:template match="sbr"> - <xsl:text> </xsl:text> - <xsl:text>⌂br </xsl:text> + <xsl:text>▒</xsl:text> + <xsl:text>⌂br▒</xsl:text> </xsl:template> <xsl:template match="cmdsynopsis"> Modified: trunk/xsl/manpages/table.xsl =================================================================== --- trunk/xsl/manpages/table.xsl 2007-01-18 16:08:47 UTC (rev 6525) +++ trunk/xsl/manpages/table.xsl 2007-01-19 02:58:50 UTC (rev 6526) @@ -130,7 +130,7 @@ <xsl:value-of select="$tbl.font.title"/> <xsl:text> </xsl:text> <xsl:if test="parent::td"> - <xsl:text>*[nested table]</xsl:text> + <xsl:text>*[nested▀table]</xsl:text> </xsl:if> <xsl:value-of select="normalize-space($title)"/> <xsl:text> </xsl:text> @@ -380,7 +380,7 @@ >tbl convert : Extracted a nested table</xsl:text> </xsl:with-param> </xsl:call-template> - <xsl:text>[▓fInested table▓fR]* </xsl:text> + <xsl:text>[▓fInested▀table▓fR]* </xsl:text> </xsl:when> <xsl:otherwise> <!-- * Apply templates to the child contents of this cell, to --> Modified: trunk/xsl/manpages/utility.xsl =================================================================== --- trunk/xsl/manpages/utility.xsl 2007-01-18 16:08:47 UTC (rev 6525) +++ trunk/xsl/manpages/utility.xsl 2007-01-19 02:58:50 UTC (rev 6526) @@ -78,11 +78,11 @@ <xsl:call-template name="string.subst"> <xsl:with-param name="string" select="$content"/> <xsl:with-param name="target" select="' '"/> - <!-- * We output a real nobreak space here (rather than, "\ ", --> - <!-- * the roff nobreak space) because, when we do character-map --> - <!-- * processing before final output, the character-map will --> - <!-- * handle conversion of the   to "\ " for us --> - <xsl:with-param name="replacement" select="' '"/> + <!-- * U+2580 is a "UPPER HALF BLOCK"; we use it here because --> + <!-- * if we were to just use a normal space, it would get --> + <!-- * replaced when normalization is done. We replace it --> + <!-- * later with the groff markup for non-breaking space. --> + <xsl:with-param name="replacement" select="'▀'"/> </xsl:call-template> </xsl:template> Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2007-01-18 16:08:47 UTC (rev 6525) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-19 02:58:50 UTC (rev 6526) @@ -38,6 +38,10 @@ <substitution oldstring="▓FB" newstring="\fB"/> <substitution oldstring="▓FI" newstring="\fI"/> <substitution oldstring="▓FR" newstring="\fR"/> + <!-- * remove no-break marker at beginning of line (stylesheet artifact) --> + <substitution oldstring="▒▀" newstring="▒"/> + <!-- * replace U+2580 no-break marker (stylesheet-added) w/ no-break space --> + <substitution oldstring="▀" newstring="\ "/> <!-- * replace U+2593 marker with backslash --> <substitution oldstring="▓" newstring="\"/> <!-- * escape dashes in content (only at line beginnings) --> @@ -117,6 +121,13 @@ <!-- * --> <!-- * Product™ -> Product(TM) --> <substitution oldstring="™" newstring="(TM)"/> + + <!-- ==================================================================== --> + + <!-- * we use U+2592 as a marker for the newline before output of <sbr>; --> + <!-- * so we now need to replace U+2592 marker with a real newline --> + <substitution oldstring="▒" newstring=" "/> + </xsl:param> </src:fragment> </refsynopsisdiv> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <xm...@us...> - 2007-01-19 08:33:55
|
Revision: 6527 http://svn.sourceforge.net/docbook/?rev=6527&view=rev Author: xmldoc Date: 2007-01-19 00:33:52 -0800 (Fri, 19 Jan 2007) Log Message: ----------- Added the man.string.subst.map.local.pre and man.string.subst.map.local.post parameters. Those parameters enable local additions and changes to string-substitution mappings without the need to change the value of man.string.subst.map parameter (which is for standard system mappings). Closes #1456738. Thanks to Sam Steingold for constructing a true stylesheet torture test (the clisp docs) that exposed the need for these params. Modified Paths: -------------- trunk/xsl/manpages/other.xsl trunk/xsl/manpages/param.ent trunk/xsl/manpages/param.xweb trunk/xsl/params/man.string.subst.map.xml Added Paths: ----------- trunk/xsl/params/man.string.subst.map.local.post.xml trunk/xsl/params/man.string.subst.map.local.pre.xml Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2007-01-19 02:58:50 UTC (rev 6526) +++ trunk/xsl/manpages/other.xsl 2007-01-19 08:33:52 UTC (rev 6527) @@ -346,31 +346,76 @@ <!-- ================================================================== --> - <!-- * The prepare.manpage.contents template is called after --> - <!-- * everything else has been done, just before writing the actual --> - <!-- * man-page files to the filesystem. It works on the entire roff --> - <!-- * source for each man page (not just the visible contents). --> + <!-- * The prepare.manpage.contents template is called after all --> + <!-- * other processing has been done, before serializing the --> + <!-- * result of all the other processing. It basically works on --> + <!-- * the result as one big string. --> <xsl:template name="prepare.manpage.contents"> <xsl:param name="content" select="''"/> - <!-- * First do "essential" string/character substitutions; for --> - <!-- * example, the backslash character _must_ be substituted with --> - <!-- * a double backslash, to prevent it from being interpreted as --> - <!-- * a roff escape --> + <!-- * If user has provided a "local" string-substitution map to --> + <!-- * be applied /before/ the standard string-substitution map, --> + <!-- * apply it. --> + <xsl:variable name="pre.adjusted.content"> + <xsl:choose> + <xsl:when test="$man.string.subst.map.local.pre"> + <!-- * normalized value of man.string.subst.map.local.pre --> + <!-- * is non-empty, so get contents of map and apply them --> + <xsl:call-template name="apply-string-subst-map"> + <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="map.contents" + select="exsl:node-set($man.string.subst.map.local.pre)/*"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <!-- * value of man.string.subst.map.local.pre is empty, --> + <!-- * so just copy original contents --> + <xsl:value-of select="$content"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- * Apply standard string-substitution map. The main purpose --> + <!-- * of this map is to escape certain characters that have --> + <!-- * special meaning in roff, and to replace certain characters --> + <!-- * used within the stylesheet internally to represent roff --> + <!-- * markup characters. --> <xsl:variable name="adjusted.content"> <xsl:call-template name="apply-string-subst-map"> - <xsl:with-param name="content" select="$content"/> + <xsl:with-param name="content" select="$pre.adjusted.content"/> <xsl:with-param name="map.contents" select="exsl:node-set($man.string.subst.map)/*"/> </xsl:call-template> </xsl:variable> + <!-- * If user has provided a "local" string-substitution map to --> + <!-- * be applied /after/ the standard string-substitution map, --> + <!-- * apply it. --> + <xsl:variable name="post.adjusted.content"> + <xsl:choose> + <xsl:when test="$man.string.subst.map.local.post"> + <!-- * normalized value of man.string.subst.map.local.post --> + <!-- * is non-empty, so get contents of map and apply them --> + <xsl:call-template name="apply-string-subst-map"> + <xsl:with-param name="content" select="$adjusted.content"/> + <xsl:with-param name="map.contents" + select="exsl:node-set($man.string.subst.map.local.post)/*"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <!-- * value of man.string.subst.map.local.post is empty, --> + <!-- * so just copy original contents --> + <xsl:value-of select="$adjusted.content"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <!-- * Optionally, apply a character map to replace Unicode --> <!-- * symbols and special characters. --> <xsl:choose> <xsl:when test="$man.charmap.enabled != 0"> <xsl:call-template name="apply-character-map"> - <xsl:with-param name="content" select="$adjusted.content"/> + <xsl:with-param name="content" select="$post.adjusted.content"/> <xsl:with-param name="map.contents" select="exsl:node-set($man.charmap.contents)/*"/> </xsl:call-template> Modified: trunk/xsl/manpages/param.ent =================================================================== --- trunk/xsl/manpages/param.ent 2007-01-19 02:58:50 UTC (rev 6526) +++ trunk/xsl/manpages/param.ent 2007-01-19 08:33:52 UTC (rev 6527) @@ -15,7 +15,9 @@ <!ENTITY man.links.list.heading SYSTEM "../params/man.links.list.heading.xml"> <!ENTITY variablelist.term.separator SYSTEM "../params/variablelist.term.separator.xml"> <!ENTITY variablelist.term.break.after SYSTEM "../params/variablelist.term.break.after.xml"> +<!ENTITY man.string.subst.map.local.pre SYSTEM "../params/man.string.subst.map.local.pre.xml"> <!ENTITY man.string.subst.map SYSTEM "../params/man.string.subst.map.xml"> +<!ENTITY man.string.subst.map.local.post SYSTEM "../params/man.string.subst.map.local.post.xml"> <!ENTITY man.charmap.enabled SYSTEM "../params/man.charmap.enabled.xml"> <!ENTITY man.charmap.use.subset SYSTEM "../params/man.charmap.use.subset.xml"> <!ENTITY man.charmap.uri SYSTEM "../params/man.charmap.uri.xml"> Modified: trunk/xsl/manpages/param.xweb =================================================================== --- trunk/xsl/manpages/param.xweb 2007-01-19 02:58:50 UTC (rev 6526) +++ trunk/xsl/manpages/param.xweb 2007-01-19 08:33:52 UTC (rev 6527) @@ -73,7 +73,9 @@ &man.charmap.uri; &man.charmap.use.subset; &man.charmap.subset.profile; +&man.string.subst.map.local.pre; &man.string.subst.map; +&man.string.subst.map.local.post; </reference> <reference id="refmeta"> <title>Refentry metadata gathering</title> @@ -162,7 +164,9 @@ <src:fragref linkend="man.output.in.separate.dir.frag"/> <src:fragref linkend="man.output.base.dir.frag"/> <src:fragref linkend="man.output.subdirs.enabled.frag"/> +<src:fragref linkend="man.string.subst.map.local.pre.frag"/> <src:fragref linkend="man.string.subst.map.frag"/> +<src:fragref linkend="man.string.subst.map.local.post.frag"/> <src:fragref linkend="man.links.are.numbered.frag"/> <src:fragref linkend="man.links.are.underlined.frag"/> <src:fragref linkend="man.links.list.enabled.frag"/> Added: trunk/xsl/params/man.string.subst.map.local.post.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.local.post.xml (rev 0) +++ trunk/xsl/params/man.string.subst.map.local.post.xml 2007-01-19 08:33:52 UTC (rev 6527) @@ -0,0 +1,32 @@ +<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + id="man.string.subst.map.local.post"> +<refmeta> +<refentrytitle>man.string.subst.map.local.post</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>man.string.subst.map.local.post</refname> +<refpurpose>Specifies “local” string substitutions</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id='man.string.subst.map.local.post.frag'> +<xsl:param name="man.string.subst.map.local.post"></xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Use the <parameter>man.string.subst.map.local.post</parameter> +parameter to specify any “local” string substitutions to perform over +the entire roff source for each man page <emphasis>after</emphasis> +performing the string substitutions specified by the <parameter +>man.string.subst.map</parameter> parameter.</para> + +<para>For details about the format of this parameter, see the +documentation for the <parameter>man.string.subst.map</parameter> +parameter.</para> + +</refsect1> +</refentry> Property changes on: trunk/xsl/params/man.string.subst.map.local.post.xml ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/xsl/params/man.string.subst.map.local.pre.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.local.pre.xml (rev 0) +++ trunk/xsl/params/man.string.subst.map.local.pre.xml 2007-01-19 08:33:52 UTC (rev 6527) @@ -0,0 +1,32 @@ +<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + id="man.string.subst.map.local.pre"> +<refmeta> +<refentrytitle>man.string.subst.map.local.pre</refentrytitle> +<refmiscinfo role="type">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>man.string.subst.map.local.pre</refname> +<refpurpose>Specifies “local” string substitutions</refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment id='man.string.subst.map.local.pre.frag'> + <xsl:param name="man.string.subst.map.local.pre"></xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsect1><title>Description</title> + +<para>Use the <parameter>man.string.subst.map.local.pre</parameter> +parameter to specify any “local” string substitutions to perform over +the entire roff source for each man page <emphasis>before</emphasis> +performing the string substitutions specified by the <parameter +>man.string.subst.map</parameter> parameter.</para> + +<para>For details about the format of this parameter, see the +documentation for the <parameter>man.string.subst.map</parameter> +parameter.</para> + +</refsect1> +</refentry> Property changes on: trunk/xsl/params/man.string.subst.map.local.pre.xml ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/xsl/params/man.string.subst.map.xml =================================================================== --- trunk/xsl/params/man.string.subst.map.xml 2007-01-19 02:58:50 UTC (rev 6526) +++ trunk/xsl/params/man.string.subst.map.xml 2007-01-19 08:33:52 UTC (rev 6527) @@ -143,7 +143,7 @@ before applying the roff character map.</para> <para>You can use <parameter>man.string.subst.map</parameter> as a -"lightweight" character map to perform "essential" substitutions -- +“lightweight” character map to perform “essential” substitutions -- that is, substitutions that are <emphasis>always</emphasis> performed, even if the value of the <parameter>man.charmap.enabled</parameter> parameter is zero. For example, you can use it to replace quotation @@ -155,14 +155,34 @@ <warning> <para>Do you not change value of the - <parameter>man.string.subst.map</parameter> parameter unless - you are sure what you are doing. If you remove any of the default - mappings, you are likely to end up with broken output. And be very - careful about adding anything to it. Because it is used for doing - string substitution over the entire roff source of each man page, it - causes target strings to be replaced in roff requests and escapes, - not just in the visible contents.</para> + <parameter>man.string.subst.map</parameter> parameter unless you are + sure what you are doing. First consider adding your + string-substitution mappings to either or both of the following + parameters: + <variablelist> + <varlistentry> + <term><parameter>man.string.subst.map.local.pre</parameter></term> + <listitem><para>applied before + <parameter>man.string.subst.map</parameter></para></listitem> + </varlistentry> + <varlistentry> + <term><parameter>man.string.subst.map.local.post</parameter></term> + <listitem><para>applied after + <parameter>man.string.subst.map</parameter></para></listitem> + </varlistentry> + </variablelist> + By default, both of those parameters contain no + string substitutions. They are intended as a means for you to + specify your own local string-substitution mappings.</para> + <para>If you remove any of default mappings from the value of the + <parameter>man.string.subst.map</parameter> parameter, you are + likely to end up with broken output. And be very about adding + anything to it; it’s used for doing string substitution over the + entire roff source of each man page – it causes target strings to be + replaced in roff requests and escapes, not just in the visible + contents of the page.</para> + </warning> <refsect2 id="map"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |