From: <abd...@us...> - 2009-10-10 02:46:04
|
Revision: 8524 http://docbook.svn.sourceforge.net/docbook/?rev=8524&view=rev Author: abdelazer Date: 2009-10-10 02:45:47 +0000 (Sat, 10 Oct 2009) Log Message: ----------- Remove <b> and <i> elements "discouraged in favor of style sheets" from XHTML, XHTML 1.1 (and therefore EPUB) outputs by changing html2xhtml.xsl. Fixes bug #2873153: No <b> and <i> tags in XHTML/EPUB Added regression to EPUB specs: Modified Paths: -------------- trunk/xsl/epub/bin/spec/epub_regressions_spec.rb trunk/xsl/html/inline.xsl trunk/xsl/html/lists.xsl trunk/xsl/xhtml/html2xhtml.xsl trunk/xsl/xhtml-1_1/html2xhtml.xsl Modified: trunk/xsl/epub/bin/spec/epub_regressions_spec.rb =================================================================== --- trunk/xsl/epub/bin/spec/epub_regressions_spec.rb 2009-10-10 00:40:43 UTC (rev 8523) +++ trunk/xsl/epub/bin/spec/epub_regressions_spec.rb 2009-10-10 02:45:47 UTC (rev 8524) @@ -190,6 +190,31 @@ opf_lns.to_s.should =~ /<itemref idref="#{before_refentry_id}"[^>]*[^<]*<itemref idref="#{re01_id}"[^>]*>[^<]*<itemref idref="#{re02_id}"/m end + it "should not include font style elements like <b> or <i>" do + begin + tmpdir = File.join(Dir::tmpdir(), "epubbtest"); Dir.mkdir(tmpdir) rescue Errno::EEXIST + + epub = DocBook::Epub.new(File.join(@testdocsdir, "book.002.xml"), @tmpdir) + epubfile = File.join(tmpdir, "bcount.epub") + epub.render_to_file(epubfile, $DEBUG) + FileUtils.copy(epubfile, ".b.epub") if $DEBUG + + success = system("unzip -q -d #{File.expand_path(tmpdir)} -o #{epubfile}") + raise "Could not unzip #{epubfile}" unless success + glob = Dir.glob(File.join(tmpdir, "**", "*.html")) + glob.each {|html_file| + bs = File.open(html_file).readlines.to_s.scan(/<b>/) + bs.should be_empty + is = File.open(html_file).readlines.to_s.scan(/<i>/) + is.should be_empty + } + rescue => e + raise e + ensure + FileUtils.rm_r(tmpdir, :force => true) + end + end + after(:all) do FileUtils.rm_r(@tmpdir, :force => true) end Modified: trunk/xsl/html/inline.xsl =================================================================== --- trunk/xsl/html/inline.xsl 2009-10-10 00:40:43 UTC (rev 8523) +++ trunk/xsl/html/inline.xsl 2009-10-10 02:45:47 UTC (rev 8524) @@ -1331,7 +1331,7 @@ <xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]"> <xsl:if test="$show.comments != 0"> - <p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p> + <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p> </xsl:if> </xsl:template> Modified: trunk/xsl/html/lists.xsl =================================================================== --- trunk/xsl/html/lists.xsl 2009-10-10 00:40:43 UTC (rev 8523) +++ trunk/xsl/html/lists.xsl 2009-10-10 02:45:47 UTC (rev 8524) @@ -426,24 +426,24 @@ <xsl:call-template name="anchor"/> <xsl:choose> <xsl:when test="$presentation = 'bold'"> - <b> + <strong> <xsl:apply-templates select="term"/> <xsl:value-of select="$separator"/> - </b> + </strong> </xsl:when> <xsl:when test="$presentation = 'italic'"> - <i> + <em> <xsl:apply-templates select="term"/> <xsl:value-of select="$separator"/> - </i> + </em> </xsl:when> <xsl:when test="$presentation = 'bold-italic'"> - <b> - <i> + <strong> + <em> <xsl:apply-templates select="term"/> <xsl:value-of select="$separator"/> - </i> - </b> + </em> + </strong> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="term"/> Modified: trunk/xsl/xhtml/html2xhtml.xsl =================================================================== --- trunk/xsl/xhtml/html2xhtml.xsl 2009-10-10 00:40:43 UTC (rev 8523) +++ trunk/xsl/xhtml/html2xhtml.xsl 2009-10-10 02:45:47 UTC (rev 8524) @@ -164,6 +164,11 @@ </span> </xsl:template> +<!-- "The following HTML elements specify font information. + Although they are not all deprecated, their use is discouraged in + favor of style sheets." --> +<xsl:template match="b|i"/> + <!-- this only occurs in docbook.xsl to identify errors --> <xsl:template match="a[@name]"> <xsl:element name="{local-name(.)}" namespace="http://www.w3.org/1999/xhtml"> Modified: trunk/xsl/xhtml-1_1/html2xhtml.xsl =================================================================== --- trunk/xsl/xhtml-1_1/html2xhtml.xsl 2009-10-10 00:40:43 UTC (rev 8523) +++ trunk/xsl/xhtml-1_1/html2xhtml.xsl 2009-10-10 02:45:47 UTC (rev 8524) @@ -232,6 +232,11 @@ </xsl:copy> </xsl:template> +<!-- "The following HTML elements specify font information. + Although they are not all deprecated, their use is discouraged in + favor of style sheets." --> +<xsl:template match="b|i"/> + <!-- this only occurs in docbook.xsl to identify errors --> <xsl:template match="font"> <span class="ERROR" xmlns="http://www.w3.org/1999/xhtml"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2010-07-15 08:08:10
|
Revision: 8725 http://docbook.svn.sourceforge.net/docbook/?rev=8725&view=rev Author: kosek Date: 2010-07-15 08:08:04 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Upgraded to use common entities. Fixed bug when some code used @sortas and some not for grouping/sorting of indexterms. Modified Paths: -------------- trunk/xsl/common/autoidx-kosek.xsl trunk/xsl/common/entities.ent trunk/xsl/fo/autoidx-kosek.xsl trunk/xsl/html/autoidx-kosek.xsl Modified: trunk/xsl/common/autoidx-kosek.xsl =================================================================== --- trunk/xsl/common/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/common/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> - +<!ENTITY % common.entities SYSTEM "entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" Modified: trunk/xsl/common/entities.ent =================================================================== --- trunk/xsl/common/entities.ent 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/common/entities.ent 2010-07-15 08:08:04 UTC (rev 8725) @@ -23,11 +23,11 @@ with the same @sortas. If @sortas is not present, the first item is empty, and the added space is removed when normalize-space is applied, leaving just the entry --> + <!ENTITY primary 'normalize-space(concat(primary/@sortas, " ", primary))'> <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, " ", secondary))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, " ", tertiary))'> - <!ENTITY section '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]'> <!ENTITY section.id 'generate-id(§ion;)'> Modified: trunk/xsl/fo/autoidx-kosek.xsl =================================================================== --- trunk/xsl/fo/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/fo/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,17 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ - -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> - -<!ENTITY sep '" "'> -<!-- Documents using the kimber index method must have a lang attribute --> -<!-- Only one of these should be present in the entity --> - -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) - and ($role = @role or $type = @type or - (string-length($role) = 0 and string-length($type) = 0))'> +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" Modified: trunk/xsl/html/autoidx-kosek.xsl =================================================================== --- trunk/xsl/html/autoidx-kosek.xsl 2010-07-15 07:53:27 UTC (rev 8724) +++ trunk/xsl/html/autoidx-kosek.xsl 2010-07-15 08:08:04 UTC (rev 8725) @@ -1,11 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ - -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> - -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))'> +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i="urn:cz-kosek:functions:index" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mz...@us...> - 2010-07-15 12:52:21
|
Revision: 8727 http://docbook.svn.sourceforge.net/docbook/?rev=8727&view=rev Author: mzjn Date: 2010-07-15 12:52:15 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Fixed bugs related to manpages and L10n. Modified Paths: -------------- trunk/xsl/common/l10n.xsl trunk/xsl/manpages/other.xsl Modified: trunk/xsl/common/l10n.xsl =================================================================== --- trunk/xsl/common/l10n.xsl 2010-07-15 08:24:13 UTC (rev 8726) +++ trunk/xsl/common/l10n.xsl 2010-07-15 12:52:15 UTC (rev 8727) @@ -117,8 +117,9 @@ <xsl:param name="lang"> <xsl:call-template name="l10n.language"/> </xsl:param> + <xsl:value-of - select="document(concat($l10n.xml/l:i18n/l:l10n[@language=$lang]/@href, '.xml'))/l:l10n/@english-language-name"/> + select="document($l10n.xml/l:i18n/l:l10n[@language=$lang]/@href)/l:l10n/@english-language-name"/> </xsl:template> <xsl:template name="language.attribute"> Modified: trunk/xsl/manpages/other.xsl =================================================================== --- trunk/xsl/manpages/other.xsl 2010-07-15 08:24:13 UTC (rev 8726) +++ trunk/xsl/manpages/other.xsl 2010-07-15 12:52:15 UTC (rev 8727) @@ -306,7 +306,7 @@ </xsl:call-template> <xsl:text> </xsl:text> <xsl:text>.\" Language: </xsl:text> - <xsl:call-template name="l10.language.name"/> + <xsl:call-template name="l10n.language.name"/> <xsl:text> </xsl:text> <xsl:text>.\"</xsl:text> <xsl:text> </xsl:text> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2010-07-15 16:44:02
|
Revision: 8729 http://docbook.svn.sourceforge.net/docbook/?rev=8729&view=rev Author: bobstayton Date: 2010-07-15 16:43:56 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Change entities to use common/entities.ent. Modified Paths: -------------- trunk/xsl/common/autoidx-kimber.xsl trunk/xsl/fo/autoidx-kimber.xsl trunk/xsl/html/autoidx-kimber.xsl Modified: trunk/xsl/common/autoidx-kimber.xsl =================================================================== --- trunk/xsl/common/autoidx-kimber.xsl 2010-07-15 14:37:33 UTC (rev 8728) +++ trunk/xsl/common/autoidx-kimber.xsl 2010-07-15 16:43:56 UTC (rev 8729) @@ -1,6 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> +<!ENTITY % common.entities SYSTEM "entities.ent"> +%common.entities; <!-- Documents using the kimber index method must have a lang attribute --> <!-- Only one of these should be present in the entity --> Modified: trunk/xsl/fo/autoidx-kimber.xsl =================================================================== --- trunk/xsl/fo/autoidx-kimber.xsl 2010-07-15 14:37:33 UTC (rev 8728) +++ trunk/xsl/fo/autoidx-kimber.xsl 2010-07-15 16:43:56 UTC (rev 8729) @@ -1,18 +1,12 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = ""]))'> - -<!ENTITY sep '" "'> <!-- 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)'> -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) - and ($role = @role or $type = @type or - (string-length($role) = 0 and string-length($type) = 0))'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" Modified: trunk/xsl/html/autoidx-kimber.xsl =================================================================== --- trunk/xsl/html/autoidx-kimber.xsl 2010-07-15 14:37:33 UTC (rev 8728) +++ trunk/xsl/html/autoidx-kimber.xsl 2010-07-15 16:43:56 UTC (rev 8729) @@ -1,15 +1,12 @@ <?xml version="1.0"?> <!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; -<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = ""]))'> -<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = ""]))'> -<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @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)'> -<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))'> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mz...@us...> - 2010-08-09 20:24:52
|
Revision: 8811 http://docbook.svn.sourceforge.net/docbook/?rev=8811&view=rev Author: mzjn Date: 2010-08-09 20:24:45 +0000 (Mon, 09 Aug 2010) Log Message: ----------- Improved glossterm auto-linking by using keys. The old code was inefficient when processing documents with many inline glossterms. Modified Paths: -------------- trunk/xsl/fo/inline.xsl trunk/xsl/html/inline.xsl Modified: trunk/xsl/fo/inline.xsl =================================================================== --- trunk/xsl/fo/inline.xsl 2010-08-09 20:17:23 UTC (rev 8810) +++ trunk/xsl/fo/inline.xsl 2010-08-09 20:24:45 UTC (rev 8811) @@ -19,6 +19,9 @@ ******************************************************************** --> +<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/> +<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/> + <xsl:template name="simple.xlink"> <xsl:param name="node" select="."/> <xsl:param name="content"> @@ -842,9 +845,7 @@ </xsl:variable> <xsl:variable name="targets" - select="//glossentry[normalize-space(glossterm)=$term - or normalize-space(glossterm/@baseform)=$term]"/> - + select="key('glossentries', $term)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> Modified: trunk/xsl/html/inline.xsl =================================================================== --- trunk/xsl/html/inline.xsl 2010-08-09 20:17:23 UTC (rev 8810) +++ trunk/xsl/html/inline.xsl 2010-08-09 20:24:45 UTC (rev 8811) @@ -18,6 +18,10 @@ copyright and other information. ******************************************************************** --> + +<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/> +<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/> + <xsl:template name="simple.xlink"> <xsl:param name="node" select="."/> <xsl:param name="content"> @@ -1014,8 +1018,7 @@ </xsl:choose> </xsl:variable> <xsl:variable name="targets" - select="//glossentry[normalize-space(glossterm)=$term - or normalize-space(glossterm/@baseform)=$term]"/> + select="key('glossentries', $term)"/> <xsl:variable name="target" select="$targets[1]"/> <xsl:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abd...@us...> - 2010-08-27 03:39:01
|
Revision: 8886 http://docbook.svn.sourceforge.net/docbook/?rev=8886&view=rev Author: abdelazer Date: 2010-08-27 03:38:55 +0000 (Fri, 27 Aug 2010) Log Message: ----------- More svn:ignores for the build system Property Changed: ---------------- trunk/xsl/common/ trunk/xsl/xhtml/ trunk/xsl/xhtml-1_1/ Property changes on: trunk/xsl/common ___________________________________________________________________ Modified: svn:ignore - af.xml am.xml ar.xml az.xml bg.xml bn.xml bs.xml ca.xml cs.xml cy.xml da.xml de.xml el.xml en.xml eo.xml es.xml et.xml eu.xml fa.xml fi.xml fr.xml ga.xml gl.xml gu.xml he.xml hi.xml hr.xml hu.xml id.xml is.xml it.xml ja.xml kn.xml ko.xml ky.xml la.xml lt.xml lv.xml mn.xml nl.xml nn.xml nb.xml or.xml pa.xml pl.xml pt.xml pt_br.xml ro.xml ru.xml sk.xml sl.xml sq.xml sr.xml sr_Latn.xml sv.xml ta.xml th.xml tl.xml tr.xml uk.xml vi.xml xh.xml zh.xml zh_cn.xml zh_tw.xml pi.xml common.xml refentry.xml utility.xml charmap.xml + af.xml am.xml ar.xml as.xml ast.xml az.xml bg.xml bn.xml bn_IN.xml bs.xml ca.xml cs.xml cy.xml da.xml de.xml el.xml en.xml eo.xml es.xml et.xml eu.xml fa.xml fi.xml fr.xml ga.xml gl.xml gu.xml he.xml hi.xml hr.xml hu.xml id.xml is.xml it.xml ja.xml ka.xml kn.xml ko.xml ky.xml la.xml lt.xml lv.xml ml.xml mn.xml mr.xml nds.xml nl.xml nn.xml nb.xml or.xml pa.xml pl.xml pt.xml pt_br.xml ro.xml ru.xml sk.xml sl.xml sq.xml sr.xml sr_Latn.xml sv.xml ta.xml te.xml th.xml tl.xml tr.xml uk.xml vi.xml xh.xml zh.xml zh_cn.xml zh_tw.xml pi.xml common.xml refentry.xml utility.xml charmap.xml Property changes on: trunk/xsl/xhtml ___________________________________________________________________ Modified: svn:ignore - .cvsignore admon.xsl annotations.xsl autoidx-kimber.xsl autoidx-kosek.xsl autoidx-ng.xsl autoidx.xsl autotoc.xsl biblio-iso690.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-changebars.xsl chunk-code.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl db5strip.xsl division.xsl docbook.xsl docbookng.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl highlight.xsl html-rtf.xsl html.xsl htmltbl.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk-code.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl task.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl xslfiles.gen + .cvsignore admon.xsl annotations.xsl autoidx-kimber.xsl autoidx-kosek.xsl autoidx-ng.xsl autoidx.xsl autotoc.xsl biblio-iso690.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-changebars.xsl chunk-code.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl db5strip.xsl division.xsl docbook.xsl docbook.css.xml docbookng.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl highlight.xsl html-rtf.xsl html.xsl htmltbl.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk-code.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl task.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl xslfiles.gen Property changes on: trunk/xsl/xhtml-1_1 ___________________________________________________________________ Modified: svn:ignore - .cvsignore admon.xsl annotations.xsl autoidx-kimber.xsl autoidx-kosek.xsl autoidx-ng.xsl autoidx.xsl autotoc.xsl biblio-iso690.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-changebars.xsl chunk-code.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl db5strip.xsl division.xsl docbook.xsl docbookng.xsl ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl highlight.xsl html-rtf.xsl html.xsl htmltbl.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk-code.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl task.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl xslfiles.gen + .cvsignore admon.xsl annotations.xsl autoidx-kimber.xsl autoidx-kosek.xsl autoidx-ng.xsl autoidx.xsl autotoc.xsl biblio-iso690.xsl biblio.xsl block.xsl callout.xsl changebars.xsl chunk-changebars.xsl chunk-code.xsl chunk-common.xsl chunk.xsl chunker.xsl chunkfast.xsl chunktoc.xsl component.xsl db5strip.xsl division.xsl docbook.xsl docbookng.xsl docbook.css.xml ebnf.xsl footnote.xsl formal.xsl glossary.xsl graphics.xsl highlight.xsl html-rtf.xsl html.xsl htmltbl.xsl index.xsl info.xsl inline.xsl keywords.xsl lists.xsl maketoc.xsl manifest.xsl math.xsl oldchunker.xsl onechunk.xsl param.xsl pi.xsl profile-chunk-code.xsl profile-chunk.xsl profile-docbook.xsl profile-onechunk.xsl qandaset.xsl refentry.xsl sections.xsl synop.xsl table.xsl task.xsl titlepage.templates.xsl titlepage.xsl toc.xsl verbatim.xsl xref.xsl xslfiles.gen This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abd...@us...> - 2010-09-03 23:34:38
|
Revision: 8903 http://docbook.svn.sourceforge.net/docbook/?rev=8903&view=rev Author: abdelazer Date: 2010-09-03 23:34:32 +0000 (Fri, 03 Sep 2010) Log Message: ----------- Some updates to the documentation of the increasingly broken build process Modified Paths: -------------- trunk/xsl/README.BUILD trunk/xsl/RELEASE-NOTES.xml Modified: trunk/xsl/README.BUILD =================================================================== --- trunk/xsl/README.BUILD 2010-09-03 23:34:06 UTC (rev 8902) +++ trunk/xsl/README.BUILD 2010-09-03 23:34:32 UTC (rev 8903) @@ -602,13 +602,17 @@ ----------------------------------------------------------------- Part 6: Manage release files ----------------------------------------------------------------- -This section explains how to manage release files using the -file-management interface at Sourceforge. + Unfortunately, Sourceforge provides no automated way to manage file releases, so you must complete all the following steps using the SF file-management Web interface. +The file-management Web interface has been updated. Please ee: +https://sourceforge.net/apps/trac/sourceforge/wiki/Release%20files%20for%20download + +Here are the legacy instructions for reference *only*: + NOTE: Try hard to make sure you've got everything prepared OK, because the SF file-management system is extremely unwieldy, and it makes unwinding an upload mistake a major PITA. If you do make @@ -796,6 +800,32 @@ http://sourceforge.net/news/?group_id=21935 ----------------------------------------------------------------- +Part 11: Do post-release wrap-up +----------------------------------------------------------------- +This section explains the "wrap up" steps you need to do +following an official release. + +1. Open the VERSION file. + +2. Change the content of the PreviousRelease element to the + version number you have just released. + +3. Change the content of the PreviousReleaseRevision element to + the number of the repository revision from which you built the + release. + +4. Change the content of the fm:Version element to the version + number of the next anticipated release, with the string "-pre" + appended; for example: + + <fm:Version>1.73.1-pre</fm:Version> + +9. Check the VERSION file back in. + + svn commit \ + -m "Restored VERSION file to snapshot state" VERSION + +----------------------------------------------------------------- Part 9: Prepare for Freshmeat update ----------------------------------------------------------------- @@ -861,32 +891,7 @@ make freshmeat-ns SFRELID=NNNNNN FMGO= ------------------------------------------------------------------ -Part 11: Do post-release wrap-up ------------------------------------------------------------------ -This section explains the "wrap up" steps you need to do -following an official release. -1. Open the VERSION file. - -2. Change the content of the PreviousRelease element to the - version number you have just released. - -3. Change the content of the PreviousReleaseRevision element to - the number of the repository revision from which you built the - release. - -4. Change the content of the fm:Version element to the version - number of the next anticipated release, with the string "-pre" - appended; for example: - - <fm:Version>1.73.1-pre</fm:Version> - -9. Check the VERSION file back in. - - svn commit \ - -m "Restored VERSION file to snapshot state" VERSION - ----------------------------------------------------------------- NOTES ----------------------------------------------------------------- Modified: trunk/xsl/RELEASE-NOTES.xml =================================================================== --- trunk/xsl/RELEASE-NOTES.xml 2010-09-03 23:34:06 UTC (rev 8902) +++ trunk/xsl/RELEASE-NOTES.xml 2010-09-03 23:34:32 UTC (rev 8903) @@ -63,6 +63,12 @@ significant feature changes:</para> <variablelist> <varlistentry> +<term>Webhelp</term> +<listitem><para>A new browser-based, cross-platform help format with full-text search and other features typically found in help systems. See <filename>webhelp/docs/content/ch01.html</filename> for more information and a demo. </para></listitem> + +</varlistentry> + +<varlistentry> <term>Gentext</term> <listitem><para>Many updates and additions to translation/locales thanks to Red Hat, the Fedora Project, and other contributors.</para></listitem> </varlistentry> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abd...@us...> - 2010-09-28 17:02:12
|
Revision: 8911 http://docbook.svn.sourceforge.net/docbook/?rev=8911&view=rev Author: abdelazer Date: 2010-09-28 17:02:06 +0000 (Tue, 28 Sep 2010) Log Message: ----------- Implementing handling for <b> and <i>: transform to <strong> and <em> for XHTML outputs and do not use in the highliting output (per Mauritz Jeanson) Modified Paths: -------------- trunk/xsl/html/highlight.xsl trunk/xsl/xhtml/html2xhtml.xsl trunk/xsl/xhtml-1_1/html2xhtml.xsl Modified: trunk/xsl/html/highlight.xsl =================================================================== --- trunk/xsl/html/highlight.xsl 2010-09-20 04:46:05 UTC (rev 8910) +++ trunk/xsl/html/highlight.xsl 2010-09-28 17:02:06 UTC (rev 8911) @@ -1,10 +1,6 @@ -<?xml version='1.0'?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xslthl="http://xslthl.sf.net" - exclude-result-prefixes="xslthl" - version='1.0'> - -<!-- ******************************************************************** +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslthl="http://xslthl.sf.net" exclude-result-prefixes="xslthl" version="1.0"> + <!-- ******************************************************************** $Id$ ******************************************************************** @@ -13,61 +9,78 @@ and other information. ******************************************************************** --> - -<xsl:import href="../highlighting/common.xsl"/> - -<xsl:template match='xslthl:keyword' mode="xslthl"> - <b class="hl-keyword"><xsl:apply-templates mode="xslthl"/></b> -</xsl:template> - -<xsl:template match='xslthl:string' mode="xslthl"> - <b class="hl-string"><i style="color:red"><xsl:apply-templates mode="xslthl"/></i></b> -</xsl:template> - -<xsl:template match='xslthl:comment' mode="xslthl"> - <i class="hl-comment" style="color: silver"><xsl:apply-templates mode="xslthl"/></i> -</xsl:template> - -<xsl:template match='xslthl:directive' mode="xslthl"> - <span class="hl-directive" style="color: maroon"><xsl:apply-templates mode="xslthl"/></span> -</xsl:template> - -<xsl:template match='xslthl:tag' mode="xslthl"> - <b class="hl-tag" style="color: #000096"><xsl:apply-templates mode="xslthl"/></b> -</xsl:template> - -<xsl:template match='xslthl:attribute' mode="xslthl"> - <span class="hl-attribute" style="color: #F5844C"><xsl:apply-templates mode="xslthl"/></span> -</xsl:template> - -<xsl:template match='xslthl:value' mode="xslthl"> - <span class="hl-value" style="color: #993300"><xsl:apply-templates mode="xslthl"/></span> -</xsl:template> - -<xsl:template match='xslthl:html' mode="xslthl"> - <b><i style="color: red"><xsl:apply-templates mode="xslthl"/></i></b> -</xsl:template> - -<xsl:template match='xslthl:xslt' mode="xslthl"> - <b style="color: #0066FF"><xsl:apply-templates mode="xslthl"/></b> -</xsl:template> - -<!-- Not emitted since XSLTHL 2.0 --> -<xsl:template match='xslthl:section' mode="xslthl"> - <b><xsl:apply-templates mode="xslthl"/></b> -</xsl:template> - -<xsl:template match='xslthl:number' mode="xslthl"> - <span class="hl-number"><xsl:apply-templates mode="xslthl"/></span> -</xsl:template> - -<xsl:template match='xslthl:annotation' mode="xslthl"> - <i><span class="hl-annotation" style="color: gray"><xsl:apply-templates mode="xslthl"/></span></i> -</xsl:template> - -<!-- Not sure which element will be in final XSLTHL 2.0 --> -<xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl"> - <b class="hl-tag" style="color: blue"><xsl:apply-templates mode="xslthl"/></b> -</xsl:template> - -</xsl:stylesheet> \ No newline at end of file + <xsl:import href="../highlighting/common.xsl"/> + <xsl:template match="xslthl:keyword" mode="xslthl"> + <strong class="hl-keyword"> + <xsl:apply-templates mode="xslthl"/> + </strong> + </xsl:template> + <xsl:template match="xslthl:string" mode="xslthl"> + <strong class="hl-string"> + <em style="color:red"> + <xsl:apply-templates mode="xslthl"/> + </em> + </strong> + </xsl:template> + <xsl:template match="xslthl:comment" mode="xslthl"> + <em class="hl-comment" style="color: silver"> + <xsl:apply-templates mode="xslthl"/> + </em> + </xsl:template> + <xsl:template match="xslthl:directive" mode="xslthl"> + <span class="hl-directive" style="color: maroon"> + <xsl:apply-templates mode="xslthl"/> + </span> + </xsl:template> + <xsl:template match="xslthl:tag" mode="xslthl"> + <strong class="hl-tag" style="color: #000096"> + <xsl:apply-templates mode="xslthl"/> + </strong> + </xsl:template> + <xsl:template match="xslthl:attribute" mode="xslthl"> + <span class="hl-attribute" style="color: #F5844C"> + <xsl:apply-templates mode="xslthl"/> + </span> + </xsl:template> + <xsl:template match="xslthl:value" mode="xslthl"> + <span class="hl-value" style="color: #993300"> + <xsl:apply-templates mode="xslthl"/> + </span> + </xsl:template> + <xsl:template match="xslthl:html" mode="xslthl"> + <strong> + <em style="color: red"> + <xsl:apply-templates mode="xslthl"/> + </em> + </strong> + </xsl:template> + <xsl:template match="xslthl:xslt" mode="xslthl"> + <strong style="color: #0066FF"> + <xsl:apply-templates mode="xslthl"/> + </strong> + </xsl:template> + <!-- Not emitted since XSLTHL 2.0 --> + <xsl:template match="xslthl:section" mode="xslthl"> + <strong> + <xsl:apply-templates mode="xslthl"/> + </strong> + </xsl:template> + <xsl:template match="xslthl:number" mode="xslthl"> + <span class="hl-number"> + <xsl:apply-templates mode="xslthl"/> + </span> + </xsl:template> + <xsl:template match="xslthl:annotation" mode="xslthl"> + <em> + <span class="hl-annotation" style="color: gray"> + <xsl:apply-templates mode="xslthl"/> + </span> + </em> + </xsl:template> + <!-- Not sure which element will be in final XSLTHL 2.0 --> + <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl"> + <strong class="hl-tag" style="color: blue"> + <xsl:apply-templates mode="xslthl"/> + </strong> + </xsl:template> +</xsl:stylesheet> Modified: trunk/xsl/xhtml/html2xhtml.xsl =================================================================== --- trunk/xsl/xhtml/html2xhtml.xsl 2010-09-20 04:46:05 UTC (rev 8910) +++ trunk/xsl/xhtml/html2xhtml.xsl 2010-09-28 17:02:06 UTC (rev 8911) @@ -167,9 +167,16 @@ <!-- "The following HTML elements specify font information. Although they are not all deprecated, their use is discouraged in favor of style sheets." --> -<xsl:template match="b|i"> - <xsl:apply-templates/> +<xsl:template match="b"> + <strong xmlns="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*|node()"/> + </strong> </xsl:template> +<xsl:template match="i"> + <em xmlns="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*|node()"/> + </em> +</xsl:template> <!-- this only occurs in docbook.xsl to identify errors --> <xsl:template match="a[@name]"> Modified: trunk/xsl/xhtml-1_1/html2xhtml.xsl =================================================================== --- trunk/xsl/xhtml-1_1/html2xhtml.xsl 2010-09-20 04:46:05 UTC (rev 8910) +++ trunk/xsl/xhtml-1_1/html2xhtml.xsl 2010-09-28 17:02:06 UTC (rev 8911) @@ -234,9 +234,16 @@ <!-- "The following HTML elements specify font information. Although they are not all deprecated, their use is discouraged in favor of style sheets." --> -<xsl:template match="b|i"> - <xsl:apply-templates/> +<xsl:template match="b"> + <strong xmlns="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*|node()"/> + </strong> </xsl:template> +<xsl:template match="i"> + <em xmlns="http://www.w3.org/1999/xhtml"> + <xsl:apply-templates select="@*|node()"/> + </em> +</xsl:template> <!-- this only occurs in docbook.xsl to identify errors --> <xsl:template match="font"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dc...@us...> - 2010-10-06 02:38:33
|
Revision: 8921 http://docbook.svn.sourceforge.net/docbook/?rev=8921&view=rev Author: dcramer Date: 2010-10-06 02:38:26 +0000 (Wed, 06 Oct 2010) Log Message: ----------- Refactoring webhelp to separate more cleanly the xsl and java code. Added Paths: ----------- trunk/xsl-webhelpindexer/src/ Removed Paths: ------------- trunk/xsl/webhelp/indexer/src/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2011-04-06 15:56:40
|
Revision: 8988 http://docbook.svn.sourceforge.net/docbook/?rev=8988&view=rev Author: kosek Date: 2011-04-06 15:56:33 +0000 (Wed, 06 Apr 2011) Log Message: ----------- Added support for alternative circled numbers Modified Paths: -------------- trunk/xsl/fo/callout.xsl trunk/xsl/params/callout.unicode.start.character.xml Modified: trunk/xsl/fo/callout.xsl =================================================================== --- trunk/xsl/fo/callout.xsl 2011-04-03 14:21:36 UTC (rev 8987) +++ trunk/xsl/fo/callout.xsl 2011-04-06 15:56:33 UTC (rev 8988) @@ -174,8 +174,42 @@ <xsl:when test="$conum = 8">❽</xsl:when> <xsl:when test="$conum = 9">❾</xsl:when> <xsl:when test="$conum = 10">❿</xsl:when> + <xsl:when test="$conum = 11">⓫</xsl:when> + <xsl:when test="$conum = 12">⓬</xsl:when> + <xsl:when test="$conum = 13">⓭</xsl:when> + <xsl:when test="$conum = 14">⓮</xsl:when> + <xsl:when test="$conum = 15">⓯</xsl:when> + <xsl:when test="$conum = 16">⓰</xsl:when> + <xsl:when test="$conum = 17">⓱</xsl:when> + <xsl:when test="$conum = 18">⓲</xsl:when> + <xsl:when test="$conum = 19">⓳</xsl:when> + <xsl:when test="$conum = 20">⓴</xsl:when> </xsl:choose> </xsl:when> + <xsl:when test="$callout.unicode.start.character = 9312"> + <xsl:choose> + <xsl:when test="$conum = 1">①</xsl:when> + <xsl:when test="$conum = 2">②</xsl:when> + <xsl:when test="$conum = 3">③</xsl:when> + <xsl:when test="$conum = 4">④</xsl:when> + <xsl:when test="$conum = 5">⑤</xsl:when> + <xsl:when test="$conum = 6">⑥</xsl:when> + <xsl:when test="$conum = 7">⑦</xsl:when> + <xsl:when test="$conum = 8">⑧</xsl:when> + <xsl:when test="$conum = 9">⑨</xsl:when> + <xsl:when test="$conum = 10">⑩</xsl:when> + <xsl:when test="$conum = 11">⑪</xsl:when> + <xsl:when test="$conum = 12">⑫</xsl:when> + <xsl:when test="$conum = 13">⑬</xsl:when> + <xsl:when test="$conum = 14">⑭</xsl:when> + <xsl:when test="$conum = 15">⑮</xsl:when> + <xsl:when test="$conum = 16">⑯</xsl:when> + <xsl:when test="$conum = 17">⑰</xsl:when> + <xsl:when test="$conum = 18">⑱</xsl:when> + <xsl:when test="$conum = 19">⑲</xsl:when> + <xsl:when test="$conum = 20">⑳</xsl:when> + </xsl:choose> + </xsl:when> <xsl:otherwise> <xsl:message> <xsl:text>Don't know how to generate Unicode callouts </xsl:text> Modified: trunk/xsl/params/callout.unicode.start.character.xml =================================================================== --- trunk/xsl/params/callout.unicode.start.character.xml 2011-04-03 14:21:36 UTC (rev 8987) +++ trunk/xsl/params/callout.unicode.start.character.xml 2011-04-06 15:56:33 UTC (rev 8988) @@ -26,7 +26,7 @@ callout numbers. The value of <parameter>callout.unicode.start.character</parameter> is the decimal unicode value used for callout number one. Currently, -only 10102 is supported in the stylesheets for this parameter. +only values 9312 and 10102 are supported in the stylesheets for this parameter. </para> </refsection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2011-06-21 16:51:58
|
Revision: 9017 http://docbook.svn.sourceforge.net/docbook/?rev=9017&view=rev Author: bobstayton Date: 2011-06-21 16:51:51 +0000 (Tue, 21 Jun 2011) Log Message: ----------- Add verbose param to subtitle.markup templates to allow its error message to be ignored. Add that param to fop1.xsl application of subtitle.markup to avoid unnecessary error message in document information. Modified Paths: -------------- trunk/xsl/common/subtitles.xsl trunk/xsl/fo/fop1.xsl Modified: trunk/xsl/common/subtitles.xsl =================================================================== --- trunk/xsl/common/subtitles.xsl 2011-06-07 12:09:34 UTC (rev 9016) +++ trunk/xsl/common/subtitles.xsl 2011-06-21 16:51:51 UTC (rev 9017) @@ -29,47 +29,58 @@ </doc:mode> <xsl:template match="*" mode="subtitle.markup"> - <xsl:message> - <xsl:text>Request for subtitle of unexpected element: </xsl:text> - <xsl:value-of select="local-name(.)"/> - </xsl:message> - <xsl:text>???SUBTITLE???</xsl:text> + <xsl:param name="verbose" select="1"/> + <xsl:if test="$verbose != 0"> + <xsl:message> + <xsl:text>Request for subtitle of unexpected element: </xsl:text> + <xsl:value-of select="local-name(.)"/> + </xsl:message> + <xsl:text>???SUBTITLE???</xsl:text> + </xsl:if> </xsl:template> <xsl:template match="subtitle" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates/> </xsl:template> <xsl:template match="set" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(setinfo/subtitle|info/subtitle|subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="book" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(bookinfo/subtitle|info/subtitle|subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="part" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(partinfo/subtitle |docinfo/subtitle |info/subtitle |subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="preface|chapter|appendix" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(docinfo/subtitle |info/subtitle |prefaceinfo/subtitle @@ -78,54 +89,65 @@ |subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="article" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(artheader/subtitle |articleinfo/subtitle |info/subtitle |subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="dedication|colophon" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(subtitle|info/subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="reference" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(referenceinfo/subtitle |docinfo/subtitle |info/subtitle |subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="qandaset" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(blockinfo/subtitle|info/subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> <xsl:template match="refentry" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(refentryinfo/subtitle |info/subtitle |docinfo/subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> @@ -135,6 +157,7 @@ |simplesect" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> + <xsl:param name="verbose" select="1"/> <xsl:apply-templates select="(info/subtitle |sectioninfo/subtitle |sect1info/subtitle @@ -148,6 +171,7 @@ |subtitle)[1]" mode="subtitle.markup"> <xsl:with-param name="allow-anchors" select="$allow-anchors"/> + <xsl:with-param name="verbose" select="$verbose"/> </xsl:apply-templates> </xsl:template> Modified: trunk/xsl/fo/fop1.xsl =================================================================== --- trunk/xsl/fo/fop1.xsl 2011-06-07 12:09:34 UTC (rev 9016) +++ trunk/xsl/fo/fop1.xsl 2011-06-21 16:51:51 UTC (rev 9017) @@ -137,7 +137,9 @@ <xsl:apply-templates select="/*[1]" mode="label.markup"/> <xsl:apply-templates select="/*[1]" mode="title.markup"/> <xsl:variable name="subtitle"> - <xsl:apply-templates select="/*[1]" mode="subtitle.markup"/> + <xsl:apply-templates select="/*[1]" mode="subtitle.markup"> + <xsl:with-param name="verbose" select="0"/> + </xsl:apply-templates> </xsl:variable> <xsl:if test="$subtitle !=''"> <xsl:text> - </xsl:text> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dc...@us...> - 2011-08-07 19:13:04
|
Revision: 9029 http://docbook.svn.sourceforge.net/docbook/?rev=9029&view=rev Author: dcramer Date: 2011-08-07 19:12:58 +0000 (Sun, 07 Aug 2011) Log Message: ----------- Added svn:ignore property for generated webhelpindexer files Property Changed: ---------------- trunk/xsl/extensions/ trunk/xsl-webhelpindexer/ Property changes on: trunk/xsl/extensions ___________________________________________________________________ Modified: svn:ignore - xalan27.jar docbook.py xslt.py saxon65.jar README.LIBXSLT NOTICE.txt webhelpindexer.jar LICENSE.txt lucene-*.jar + xalan27.jar docbook.py xslt.py saxon65.jar README.LIBXSLT NOTICE.txt webhelpindexer.jar LICENSE.txt lucene-*.jar README.txt Property changes on: trunk/xsl-webhelpindexer ___________________________________________________________________ Added: svn:ignore + webhelpindexer.jar built-jar.properties classes empty javadoc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2011-09-22 10:32:13
|
Revision: 9081 http://docbook.svn.sourceforge.net/docbook/?rev=9081&view=rev Author: bobstayton Date: 2011-09-22 10:32:04 +0000 (Thu, 22 Sep 2011) Log Message: ----------- Check in beta2 epub3 development files. Added Paths: ----------- trunk/xsl/xhtml5/ trunk/xsl/xhtml5/chunk.xsl trunk/xsl/xhtml5/chunkfast.xsl trunk/xsl/xhtml5/docbook.css.xml trunk/xsl/xhtml5/docbook.xsl trunk/xsl/xhtml5/html5-chunk-mods.xsl trunk/xsl/xhtml5/html5-element-mods.xsl trunk/xsl/xhtml5/onechunk.xsl trunk/xsl/xhtml5/profile-chunk.xsl trunk/xsl/xhtml5/profile-docbook.xsl trunk/xsl/xhtml5/xhtml-docbook.xsl trunk/xsl/xhtml5/xhtml-profile-docbook.xsl Added: trunk/xsl/xhtml5/chunk.xsl =================================================================== --- trunk/xsl/xhtml5/chunk.xsl (rev 0) +++ trunk/xsl/xhtml5/chunk.xsl 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="exsl" + version="1.0"> + +<!-- $Id: chunk.xsl,v 1.1 2011-09-16 21:43:59 bobs Exp $ --> + +<!-- This is the main driver stylesheet file. It imports or +includes all the components that it needs. --> + +<!-- Import the module that customizes docbook elements --> +<!-- Put any customizations of element content in this module. --> +<xsl:import href="docbook.xsl"/> + +<xsl:import href="../xhtml/chunk-common.xsl"/> + +<xsl:include href="../xhtml/chunk-code.xsl"/> + +<!-- The following module has templates that override the stock + xhtml templates for HTML5 output. + It contains match templates with priority="1" attributes, + and named templates. These override any templates that + handle chunking behavior --> +<xsl:include href="html5-chunk-mods.xsl"/> + +</xsl:stylesheet> Added: trunk/xsl/xhtml5/chunkfast.xsl =================================================================== --- trunk/xsl/xhtml5/chunkfast.xsl (rev 0) +++ trunk/xsl/xhtml5/chunkfast.xsl 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="ASCII"?> +<!--This file was created automatically by html2xhtml--> +<!--from the HTML stylesheets.--> +<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="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl"> + +<!-- ******************************************************************** + $Id: chunkfast.xsl,v 1.1 2011-09-16 21:44:00 bobs Exp $ + ******************************************************************** + + 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:import href="chunk.xsl"/> +<xsl:param name="chunk.fast" select="1"/> + +<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//cf:div"/> + +<!-- ==================================================================== --> + +<xsl:template name="process-chunk-element"> + <xsl:choose> + <xsl:when test="$chunk.fast != 0 and $exsl.node.set.available != 0"> + <xsl:variable name="genid" select="generate-id()"/> + + <xsl:variable name="div" select="$chunks[@id=$genid or @xml:id=$genid]"/> + + <xsl:variable name="prevdiv" select="($div/preceding-sibling::cf:div|$div/preceding::cf:div|$div/parent::cf:div)[last()]"/> + <xsl:variable name="prev" select="key('genid', ($prevdiv/@id|$prevdiv/@xml:id)[1])"/> + + <xsl:variable name="nextdiv" select="($div/following-sibling::cf:div|$div/following::cf:div|$div/cf:div)[1]"/> + <xsl:variable name="next" select="key('genid', ($nextdiv/@id|$nextdiv/@xml:id)[1])"/> + + <xsl:choose> + <xsl:when test="$onechunk != 0 and parent::*"> + <xsl:apply-imports/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="process-chunk"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="$onechunk != 0 and not(parent::*)"> + <xsl:call-template name="chunk-all-sections"/> + </xsl:when> + <xsl:when test="$onechunk != 0"> + <xsl:apply-imports/> + </xsl:when> + <xsl:when test="$chunk.first.sections = 0"> + <xsl:call-template name="chunk-first-section-with-parent"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="chunk-all-sections"/> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> Added: trunk/xsl/xhtml5/docbook.css.xml =================================================================== --- trunk/xsl/xhtml5/docbook.css.xml (rev 0) +++ trunk/xsl/xhtml5/docbook.css.xml 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,104 @@ +<?xml version="1.0"?> +<style> + +/********************************/ +/* start of styles in block.xsl */ + +.formalpara-title { + font-weight: bold; +} + +div.blockquote-title { + font-weight: bold; + margin-top: 1em; + margin-bottom: 1em; +} + +span.msgmain-title { + font-weight: bold; +} + +span.msgsub-title { + font-weight: bold; +} + +span.msgrel-title { + font-weight: bold; +} + +div.msglevel, div.msgorig, div.msgaud { + margin-top: 1em; + margin-bottom: 1em; +} + +span.msglevel-title, span.msgorig-title, span.msgaud-title { + font-weight: bold; +} + +div.msgexplan { + margin-top: 1em; + margin-bottom: 1em; +} + +span.msgexplan-title { + font-weight: bold; +} + +/* end of styles in block.xsl */ +/********************************/ + +/********************************/ +/* start of styles in autotoc.xsl */ + + +/* end of styles in autotoc.xsl */ +/********************************/ + +/********************************/ +/* start of styles in formal.xsl */ + +div.figure-title { + font-weight: bold; +} + +div.example-title { + font-weight: bold; +} + +div.equation-title { + font-weight: bold; +} + +div.table-title { + font-weight: bold; +} + +div.sidebar-title { + font-weight: bold; +} + + +/* end of styles in formal.xsl */ +/********************************/ + +/********************************/ +/* start of styles in verbatim.xsl */ + +div.programlisting { + white-space: pre; + font-family: monospace; +} + +div.screen { + white-space: pre; + font-family: monospace; +} + +div.synopsis { + white-space: pre; + font-family: monospace; +} + +/* end of styles in verbatim.xsl */ +/********************************/ +</style> Added: trunk/xsl/xhtml5/docbook.xsl =================================================================== --- trunk/xsl/xhtml5/docbook.xsl (rev 0) +++ trunk/xsl/xhtml5/docbook.xsl 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE xsl:stylesheet [ +]> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" + xmlns:xtbl="xalan://com.nwalsh.xalan.Table" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" + exclude-result-prefixes="exsl stbl xtbl lxslt ptbl" + version="1.0"> + +<!-- $Id: docbook.xsl,v 1.2 2011-09-18 17:47:28 bobs Exp $ --> +<xsl:import href="xhtml-docbook.xsl"/> +<xsl:include href="html5-element-mods.xsl"/> + +<xsl:output method="xml" encoding="UTF-8" /> + +</xsl:stylesheet> Added: trunk/xsl/xhtml5/html5-chunk-mods.xsl =================================================================== --- trunk/xsl/xhtml5/html5-chunk-mods.xsl (rev 0) +++ trunk/xsl/xhtml5/html5-chunk-mods.xsl 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,497 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="exsl" + version="1.0"> + +<!-- $Id: html5-chunk-mods.xsl,v 1.1 2011-09-16 21:44:00 bobs Exp $ --> + +<!-- Fix bug: original called "generate.css" --> +<xsl:template match="*" mode="process.root" priority="1"> + <xsl:apply-templates select="."/> + <xsl:call-template name="generate.css.files"/> +</xsl:template> + +<!-- HTML5: Modify to wrap header in HTML5 <header> element. --> +<xsl:template name="header.navigation"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:param name="nav.context"/> + + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <xsl:variable name="row1" select="$navig.showtitles != 0"/> + <xsl:variable name="row2" select="count($prev) > 0 + or (count($up) > 0 + and generate-id($up) != generate-id($home) + and $navig.showtitles != 0) + or count($next) > 0"/> + + <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'"> + <xsl:variable name="content"> + <header> + <div class="navheader"> + <xsl:if test="$row1 or $row2"> + <table width="100%" summary="Navigation header"> + <xsl:if test="$row1"> + <tr> + <th colspan="3" align="center"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </th> + </tr> + </xsl:if> + + <xsl:if test="$row2"> + <tr> + <td width="20%" align="{$direction.align.start}"> + <xsl:if test="count($prev)>0"> + <a accesskey="p"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'prev'"/> + </xsl:call-template> + </a> + </xsl:if> + <xsl:text> </xsl:text> + </td> + <th width="60%" align="center"> + <xsl:choose> + <xsl:when test="count($up) > 0 + and generate-id($up) != generate-id($home) + and $navig.showtitles != 0"> + <xsl:apply-templates select="$up" mode="object.title.markup"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </th> + <td width="20%" align="{$direction.align.end}"> + <xsl:text> </xsl:text> + <xsl:if test="count($next)>0"> + <a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'next'"/> + </xsl:call-template> + </a> + </xsl:if> + </td> + </tr> + </xsl:if> + </table> + </xsl:if> + <xsl:if test="$header.rule != 0"> + <hr/> + </xsl:if> + </div> + </header> + </xsl:variable> + + <!-- And fix up any style atts --> + <xsl:call-template name="convert.styles"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + + </xsl:if> +</xsl:template> + + +<!-- HTML5: Modify to wrap footer in HTML5 <footer> element. --> +<xsl:template name="footer.navigation"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:param name="nav.context"/> + + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <xsl:variable name="row1" select="count($prev) > 0 + or count($up) > 0 + or count($next) > 0"/> + + <xsl:variable name="row2" select="($prev and $navig.showtitles != 0) + or (generate-id($home) != generate-id(.) + or $nav.context = 'toc') + or ($chunk.tocs.and.lots != 0 + and $nav.context != 'toc') + or ($next and $navig.showtitles != 0)"/> + + <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'"> + <xsl:variable name="content"> + <footer> + <div class="navfooter"> + <xsl:if test="$footer.rule != 0"> + <hr/> + </xsl:if> + + <xsl:if test="$row1 or $row2"> + <table width="100%" summary="Navigation footer"> + <xsl:if test="$row1"> + <tr> + <td width="40%" align="{$direction.align.start}"> + <xsl:if test="count($prev)>0"> + <a accesskey="p"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'prev'"/> + </xsl:call-template> + </a> + </xsl:if> + <xsl:text> </xsl:text> + </td> + <td width="20%" align="center"> + <xsl:choose> + <xsl:when test="count($up)>0 + and generate-id($up) != generate-id($home)"> + <a accesskey="u"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'up'"/> + </xsl:call-template> + </a> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </td> + <td width="40%" align="{$direction.align.end}"> + <xsl:text> </xsl:text> + <xsl:if test="count($next)>0"> + <a accesskey="n"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'next'"/> + </xsl:call-template> + </a> + </xsl:if> + </td> + </tr> + </xsl:if> + + <xsl:if test="$row2"> + <tr> + <td width="40%" align="{$direction.align.start}" valign="top"> + <xsl:if test="$navig.showtitles != 0"> + <xsl:apply-templates select="$prev" mode="object.title.markup"/> + </xsl:if> + <xsl:text> </xsl:text> + </td> + <td width="20%" align="center"> + <xsl:choose> + <xsl:when test="$home != . or $nav.context = 'toc'"> + <a accesskey="h"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$home"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'home'"/> + </xsl:call-template> + </a> + <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'"> + <xsl:text> | </xsl:text> + </xsl:if> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + + <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'"> + <a accesskey="t"> + <xsl:attribute name="href"> + <xsl:apply-templates select="/*[1]" + mode="recursive-chunk-filename"> + <xsl:with-param name="recursive" select="true()"/> + </xsl:apply-templates> + <xsl:text>-toc</xsl:text> + <xsl:value-of select="$html.ext"/> + </xsl:attribute> + <xsl:call-template name="gentext"> + <xsl:with-param name="key" select="'nav-toc'"/> + </xsl:call-template> + </a> + </xsl:if> + </td> + <td width="40%" align="{$direction.align.end}" valign="top"> + <xsl:text> </xsl:text> + <xsl:if test="$navig.showtitles != 0"> + <xsl:apply-templates select="$next" mode="object.title.markup"/> + </xsl:if> + </td> + </tr> + </xsl:if> + </table> + </xsl:if> + </div> + </footer> + </xsl:variable> + + <!-- And fix up any style atts --> + <xsl:call-template name="convert.styles"> + <xsl:with-param name="content" select="$content"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<!-- HTML5: fix styles in footnote output --> +<xsl:template name="process.footnotes"> + <xsl:variable name="footnotes" select=".//footnote"/> + <xsl:variable name="fcount"> + <xsl:call-template name="count.footnotes.in.this.chunk"> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="footnotes" select="$footnotes"/> + </xsl:call-template> + </xsl:variable> + +<!-- + <xsl:message> + <xsl:value-of select="name(.)"/> + <xsl:text> fcount: </xsl:text> + <xsl:value-of select="$fcount"/> + </xsl:message> +--> + + <!-- Only bother to do this if there's at least one non-table footnote --> + <xsl:if test="$fcount > 0"> + <div class="footnotes"> + <xsl:call-template name="footnotes.attributes"/> + <br/> + <hr style="width: 100; align: {$direction.align.start};"/> + <xsl:call-template name="process.footnotes.in.this.chunk"> + <xsl:with-param name="node" select="."/> + <xsl:with-param name="footnotes" select="$footnotes"/> + </xsl:call-template> + </div> + </xsl:if> + + <!-- 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. --> + <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> + </div> + + <xsl:apply-templates select="//annotation" + mode="annotation-popup"/> + </div> + </xsl:if> +</xsl:template> + +<!-- HTML5: link rel="home" is not permitted --> +<xsl:template name="html.head"> + <xsl:param name="prev" select="/foo"/> + <xsl:param name="next" select="/foo"/> + <xsl:variable name="this" select="."/> + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <head> + <xsl:call-template name="system.head.content"/> + <xsl:call-template name="head.content"/> + + <!-- + <xsl:if test="$home"> + <link rel="home"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$home"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="$home" + mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:if> + --> + + <xsl:if test="$up"> + <link rel="up"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:if> + + <xsl:if test="$prev"> + <link rel="prev"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:if> + + <xsl:if test="$next"> + <link rel="next"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:if> + + <xsl:if test="$html.extra.head.links != 0"> + <xsl:for-each select="//part + |//reference + |//preface + |//chapter + |//article + |//refentry + |//appendix[not(parent::article)]|appendix + |//glossary[not(parent::article)]|glossary + |//index[not(parent::article)]|index"> + <link rel="{local-name(.)}"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="context" select="$this"/> + <xsl:with-param name="object" select="."/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="." mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:for-each> + + <xsl:for-each select="section|sect1|refsection|refsect1"> + <link> + <xsl:attribute name="rel"> + <xsl:choose> + <xsl:when test="local-name($this) = 'section' + or local-name($this) = 'refsection'"> + <xsl:value-of select="'subsection'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'section'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="context" select="$this"/> + <xsl:with-param name="object" select="."/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="." mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:for-each> + + <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3"> + <link rel="subsection"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="context" select="$this"/> + <xsl:with-param name="object" select="."/> + </xsl:call-template> + </xsl:attribute> + <xsl:attribute name="title"> + <xsl:apply-templates select="." mode="object.title.markup.textonly"/> + </xsl:attribute> + </link> + </xsl:for-each> + </xsl:if> + + <!-- * if we have a legalnotice and user wants it output as a --> + <!-- * separate page and $html.head.legalnotice.link.types is --> + <!-- * non-empty, we generate a link or links for each value in --> + <!-- * $html.head.legalnotice.link.types --> + <xsl:if test="//legalnotice + and not($generate.legalnotice.link = 0) + and not($html.head.legalnotice.link.types = '')"> + <xsl:call-template name="make.legalnotice.head.links"/> + </xsl:if> + + <xsl:call-template name="user.head.content"/> + </head> +</xsl:template> + +<!-- Add call to new root.attributes template for <html> attribute --> +<xsl:template name="chunk-element-content"> + <xsl:param name="prev"/> + <xsl:param name="next"/> + <xsl:param name="nav.context"/> + <xsl:param name="content"> + <xsl:apply-imports/> + </xsl:param> + + <xsl:call-template name="user.preroot"/> + + <html> + <xsl:call-template name="root.attributes"/> + <xsl:call-template name="html.head"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + </xsl:call-template> + + <body> + <xsl:call-template name="body.attributes"/> + <xsl:call-template name="user.header.navigation"/> + + <xsl:call-template name="header.navigation"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/> + </xsl:call-template> + + <xsl:call-template name="user.header.content"/> + + <xsl:copy-of select="$content"/> + + <xsl:call-template name="user.footer.content"/> + + <xsl:call-template name="footer.navigation"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/> + </xsl:call-template> + + <xsl:call-template name="user.footer.navigation"/> + </body> + </html> + <xsl:value-of select="$chunk.append"/> +</xsl:template> + + +</xsl:stylesheet> Added: trunk/xsl/xhtml5/html5-element-mods.xsl =================================================================== --- trunk/xsl/xhtml5/html5-element-mods.xsl (rev 0) +++ trunk/xsl/xhtml5/html5-element-mods.xsl 2011-09-22 10:32:04 UTC (rev 9081) @@ -0,0 +1,1067 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY % common.entities SYSTEM "../common/entities.ent"> +%common.entities; +]> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table" + xmlns:xtbl="xalan://com.nwalsh.xalan.Table" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table" + exclude-result-prefixes="exsl stbl xtbl lxslt ptbl" + version="1.0"> + +<!-- $Id: html5-element-mods.xsl,v 1.2 2011-09-18 17:47:28 bobs Exp $ --> + +<!--==============================================================--> +<!-- DocBook XSL Parameter settings --> +<!--==============================================================--> +<!-- Set these to blank so can output special HTML5 empty DOCTYPE --> +<xsl:param name="chunker.output.doctype-system" select="''"/> +<xsl:param name="chunker.output.doctype-public" select="''"/> + +<xsl:param name="table.borders.with.css" select="1"/> +<xsl:param name="html.ext">.xhtml</xsl:param> +<xsl:param name="toc.list.type">ul</xsl:param> +<xsl:param name="css.decoration" select="1"/> +<xsl:param name="make.clean.html" select="1"/> +<xsl:param name="generate.id.attributes" select="1"/> + +<!--==============================================================--> +<!-- Customized templates --> +<!--==============================================================--> + +<!-- HTML5: Replace HTML acronum with abbr for HTML 5 --> +<xsl:template match="acronym"> + <xsl:call-template name="inline.charseq"> + <xsl:with-param name="wrapper-name">abbr</xsl:with-param> + </xsl:call-template> +</xsl:template> + +<!-- HTML5: replace border="0" with border="" --> +<!-- HTML5: No @summary allowed --> +<!-- HTML5: replace many table atts with CSS styles --> +<xsl:template match="tgroup" name="tgroup"> + <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'"> + <xsl:message terminate="yes"> + <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:variable name="summary"> + <xsl:call-template name="pi.dbhtml_table-summary"/> + </xsl:variable> + + <xsl:variable name="cellspacing"> + <xsl:call-template name="pi.dbhtml_cellspacing"/> + </xsl:variable> + + <xsl:variable name="cellpadding"> + <xsl:call-template name="pi.dbhtml_cellpadding"/> + </xsl:variable> + + <!-- First generate colgroup with attributes --> + <xsl:variable name="colgroup.with.attributes"> + <colgroup> + <xsl:call-template name="generate.colgroup"> + <xsl:with-param name="cols" select="@cols"/> + </xsl:call-template> + </colgroup> + </xsl:variable> + + <!-- then modify colgroup attributes with extension --> + <xsl:variable name="colgroup.with.extension"> + <xsl:choose> + <xsl:when test="$use.extensions != 0 + and $tablecolumns.extension != 0"> + <xsl:choose> + <xsl:when test="function-available('stbl:adjustColumnWidths')"> + <xsl:copy-of select="stbl:adjustColumnWidths($colgroup.with.attributes)"/> + </xsl:when> + <xsl:when test="function-available('xtbl:adjustColumnWidths')"> + <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup.with.attributes)"/> + </xsl:when> + <xsl:when test="function-available('ptbl:adjustColumnWidths')"> + <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup.with.attributes)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No adjustColumnWidths function available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$colgroup.with.attributes"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <!-- Now convert to @style --> + <xsl:variable name="colgroup"> + <xsl:call-template name="colgroup.with.style"> + <xsl:with-param name="colgroup" select="colgroup.with.extension"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="explicit.table.width"> + <xsl:call-template name="pi.dbhtml_table-width"> + <xsl:with-param name="node" select=".."/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="table.width.candidate"> + <xsl:choose> + <xsl:when test="$explicit.table.width != ''"> + <xsl:value-of select="$explicit.table.width"/> + </xsl:when> + <xsl:when test="$default.table.width = ''"> + <xsl:text>100%</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$default.table.width"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + + <xsl:variable name="table.width"> + <xsl:if test="$default.table.width != '' + or $explicit.table.width != ''"> + <xsl:choose> + <xsl:when test="contains($table.width.candidate, '%')"> + <xsl:value-of select="$table.width.candidate"/> + </xsl:when> + <xsl:when test="$use.extensions != 0 + and $tablecolumns.extension != 0"> + <xsl:choose> + <xsl:when test="function-available('stbl:convertLength')"> + <xsl:value-of select="stbl:convertLength($table.width.candidate)"/> + </xsl:when> + <xsl:when test="function-available('xtbl:convertLength')"> + <xsl:value-of select="xtbl:convertLength($table.width.candidate)"/> + </xsl:when> + <xsl:otherwise> + <xsl:message terminate="yes"> + <xsl:text>No convertLength function available.</xsl:text> + </xsl:message> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$table.width.candidate"/> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + </xsl:variable> + + <!-- assemble a table @style --> + <xsl:variable name="table.style"> + + <xsl:if test="$cellspacing != '' or $html.cellspacing != ''"> + <xsl:text>cellspacing: </xsl:text> + <xsl:choose> + <xsl:when test="$cellspacing != ''"> + <xsl:value-of select="$cellspacing"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$html.cellspacing"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>; </xsl:text> + </xsl:if> + + <xsl:if test="$cellpadding != '' or $html.cellpadding != ''"> + <xsl:text>cellpadding: </xsl:text> + <xsl:choose> + <xsl:when test="$cellpadding != ''"> + <xsl:value-of select="$cellpadding"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$html.cellpadding"/> + </xsl:otherwise> + </xsl:choose> + <xsl:text>; </xsl:text> + </xsl:if> + + <xsl:choose> + <xsl:when test="string-length($table.width) != 0"> + <xsl:text>width: </xsl:text> + <xsl:value-of select="$table.width"/> + <xsl:text>; </xsl:text> + </xsl:when> + <xsl:when test="../@pgwide=1 or local-name(.) = 'entrytbl'"> + <xsl:text>width: 100%; </xsl:text> + </xsl:when> + <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="../@frame='all' or (not(../@frame) and $default.table.frame='all')"> + <xsl:text>border-collapse: collapse; </xsl:text> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'top'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'bottom'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'left'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'right'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../@frame='topbot' or (not(../@frame) and $default.table.frame='topbot')"> + <xsl:text>border-collapse: collapse;</xsl:text> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'top'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'bottom'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../@frame='top' or (not(../@frame) and $default.table.frame='top')"> + <xsl:text>border-collapse: collapse;</xsl:text> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'top'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../@frame='bottom' or (not(../@frame) and $default.table.frame='bottom')"> + <xsl:text>border-collapse: collapse;</xsl:text> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'bottom'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../@frame='sides' or (not(../@frame) and $default.table.frame='sides')"> + <xsl:text>border-collapse: collapse;</xsl:text> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'left'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + <xsl:call-template name="border"> + <xsl:with-param name="side" select="'right'"/> + <xsl:with-param name="style" select="$table.frame.border.style"/> + <xsl:with-param name="color" select="$table.frame.border.color"/> + <xsl:with-param name="thickness" select="$table.frame.border.thickness"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="../@frame='none'"> + <xsl:text>border: none;</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>border-collapse: collapse;</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <table> + <!-- HTML5: no table summary allowed --> + <xsl:if test="string-length($table.style) != 0"> + <xsl:attribute name="style"> + <xsl:value-of select="$table.style"/> + </xsl:attribute> + </xsl:if> + + + <xsl:copy-of select="$colgroup"/> + + <xsl:apply-templates select="thead"/> + <xsl:apply-templates select="tfoot"/> + <xsl:apply-templates select="tbody"/> + + <xsl:if test=".//footnote|../title//footnote"> + <tbody class="footnotes"> + <tr> + <td colspan="{@cols}"> + <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/> + </td> + </tr> + </tbody> + </xsl:if> + </table> +</xsl:template> + +<!-- HTML5: convert col attributes to col CSS styles --> +<xsl:template name="colgroup.with.style"> + <xsl:param name="colgroup"/> + + <xsl:variable name="colgroup.nodeset" select="exsl:node-set($colgroup)"/> + <xsl:apply-templates select="$colgroup.nodeset" mode="convert.to.style"/> +</xsl:template> + +<xsl:template match="colgroup" mode="convert.to.style"> + <xsl:copy> + <xsl:copy-of select="@*"/> + <xsl:apply-templates mode="convert.to.style"/> + </xsl:copy> +</xsl:template> + +<!-- HTML5: converts obsolete HTML attributes to CSS styles --> +<xsl:template match="*" mode="convert.to.style"> + + <xsl:variable name="style.from.atts"> + <xsl:for-each select="@*"> + + <xsl:choose> + <xsl:when test="local-name() = 'width'"> + <xsl:text>width: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + + <xsl:when test="local-name() = 'align'"> + <xsl:text>align: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + + <xsl:when test="local-name() = 'valign'"> + <xsl:text>vertical-align: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + + <xsl:when test="local-name() = 'border'"> + <xsl:text>border: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + + <xsl:when test="local-name() = 'cellspacing'"> + <xsl:text>border-spacing: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + + <xsl:when test="local-name() = 'cellpadding'"> + <xsl:text>padding: </xsl:text> + <xsl:value-of select="."/> + <xsl:text>; </xsl:text> + </xsl:when> + </xsl:choose> + </xsl:for-each> + </xsl:variable> + + <!-- merge existing styles with these new styles --> + <xsl:variable name="style"> + <xsl:value-of select="concat($style.from.atts, @style)"/> + </xsl:variable> + + <!-- HTML5: <th> does not support block elements, use <td> --> + <xsl:variable name="element.name"> + <xsl:choose> + <xsl:when test="local-name(.) = 'th'">td</xsl:when> + <xsl:otherwise> + <xsl:value-of select="local-name(.)"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:element name="{$element.name}"> + <xsl:if test="string-length($style) != 0"> + <xsl:attribute name="style"> + <xsl:value-of select="$style"/> + </xsl:attribute> + </xsl:if> + <!-- Also skip disallowed summary attributes --> + <xsl:copy-of select="@*[local-name(.) != 'width' and + local-name(.) != 'summary' and + local-name(.) != 'border' and + local-name(.) != 'cellspacing' and + local-name(.) != 'cellpadding' and + local-name(.) != 'style' and + local-name(.) != 'align' and + local-name(.) != 'valign']"/> + <xsl:apply-templates mode="convert.to.style"/> + </xsl:element> +</xsl:template> + +<!-- HTML5: convert some attributes to CSS style attribute --> +<xsl:template match="entry|entrytbl"> + <xsl:param name="col"> + <xsl:choose> + <xsl:when test="@revisionflag"> + <xsl:number from="row"/> + </xsl:when> + <xsl:otherwise>1</xsl:otherwise> + </xsl:choose> + </xsl:param> + + <xsl:param name="spans"/> + + + <!-- Process with stock template --> + <xsl:variable name="cell"> + <xsl:call-template name="entry"> + <xsl:with-param name="col" select="$col"/> + <xsl:with-param name="spans" select="$spans"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="cell.nodes" select="exsl:node-set($cell)"/> + + <xsl:apply-templates select="$cell.nodes" mode="convert.to.style"/> + +</xsl:template> + +<xsl:template match="mediaobject|inlinemediaobject"> + <xsl:call-template name="convert.styles"/> +</xsl:template> + +<xsl:template match="calloutlist|revhistory|footnote|figure|co"> + <xsl:call-template name="convert.styles"/> +</xsl:template> + +<xsl:template match="revhistory" mode="titlepage.mode"> + <xsl:call-template name="convert.styles"/> +</xsl:template> + +<xsl:template match="simplelist"> + <xsl:call-template name="convert.styles"/> +</xsl:template> + +<xsl:template name="convert.styles"> + <xsl:param name="content"> + <xsl:apply-imports/> + </xsl:param> + <xsl:variable name="nodes" select="exsl:node-set($content)"/> + + <xsl:apply-templates mode="convert.to.style" select="$nodes"/> +</xsl:template> + + +<!-- HTML5: needs special doctype --> +<xsl:template name="user.preroot"> + <xsl:text disable-output-escaping="yes"><!DOCTYPE html></xsl:text> +</xsl:template> + +<!-- HTML5: @type not permitted on lists --> +<xsl:template match="itemizedlist"> + <div> + <xsl:call-template name="common.html.attributes"/> + <xsl:call-template name="anchor"/> + <xsl:if test="title"> + <xsl:call-template name="formal.object.heading"/> + </xsl:if> + + <xsl:variable name="style.value"> + <xsl:variable name="type"> + <xsl:call-template name="list.itemsymbol"/> + </xsl:variable> + + <xsl:text>list-style-type: </xsl:text> + <xsl:value-of select="$type"/> + <xsl:text>; </xsl:text> + + </xsl:variable> + + <!-- Preserve order of PIs and comments --> + <xsl:apply-templates + select="*[not(self::listitem + or self::title + or self::titleabbrev)] + |comment()[not(preceding-sibling::listitem)] + |processing-instruction()[not(preceding-sibling::listitem)]"/> + + <ul> + <xsl:call-template name="generate.class.attribute"/> + + <xsl:apply-templates + select="listitem + |comment()[preceding-sibling::listitem] + |processing-instruction()[preceding-sibling::listitem]"/> + </ul> + </div> +</xsl:template> + +<xsl:template name="process.footnotes"> + <xsl:variable name="footnotes" select=".//footnote"/> + <xsl:variable name="table.footnotes" + select=".//table//footnote | .//informaltable//footnote"/> + + <!-- Only bother to do this if there's at least one non-table footnote --> + <xsl:if test="count($footnotes)>count($table.footnotes)"> + <div class="footnotes"> + <xsl:call-template name="footnotes.attributes"/> + <br/> + <hr style="width: 100; align: {$direction.align.start};"/> + <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/> + </div> + </xsl:if> + + <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> + </div> + + <xsl:apply-templates select="//annotation" + mode="annotation-popup"/> + </div> + </xsl:if> +</xsl:template> + +<xsl:template name="footnotes.attributes"> +</xsl:template> + +<!-- HTML5: ouput section element for chapter --> +<xsl:template match="chapter"> + <xsl:call-template name="id.warning"/> + + <section> + <xsl:call-template name="common.html.attributes"> + <xsl:with-param name="inherit" select="1"/> + </xsl:call-template> + <xsl:if test="$generate.id.attributes != 0"> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="component.separator"/> + <xsl:call-template name="chapter.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> + <xsl:call-template name="process.footnotes"/> + </section> +</xsl:template> + +<!-- HTML5: ouput section element for appendix --> +<xsl:template match="appendix"> + + <xsl:variable name="ischunk"> + <xsl:call-template name="chunk"/> + </xsl:variable> + + <xsl:call-template name="id.warning"/> + + <section> + <xsl:call-template name="common.html.attributes"> + <xsl:with-param name="inherit" select="1"/> + </xsl:call-template> + <xsl:if test="$generate.id.attributes != 0"> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + </xsl:if> + + <xsl:choose> + <xsl:when test="parent::article and $ischunk = 0"> + <xsl:call-template name="section.heading"> + <xsl:with-param name="level" select="1"/> + <xsl:with-param name="title"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="component.separator"/> + <xsl:call-template name="appendix.titlepage"/> + </xsl:otherwise> + </xsl:choose> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc')"> + <xsl:call-template name="component.toc"> + <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="component.toc.separator"/> + </xsl:if> + + <xsl:apply-templates/> + + <xsl:if test="not(parent::article) or $ischunk != 0"> + <xsl:call-template name="process.footnotes"/> + </xsl:if> + </section> +</xsl:template> + +<!-- HTML5: ouput section element for section --> +<xsl:template match="section"> + <xsl:variable name="depth" select="count(ancestor::section)+1"/> + + <xsl:call-template name="id.warning"/> + + <section> + <xsl:call-template name="common.html.attributes"> + <xsl:with-param name="inherit" select="1"/> + </xsl:call-template> + <xsl:call-template name="section.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:if test="contains($toc.params, 'toc') and $depth <= $generate.section.toc.level"> + <xsl:call-template name="section.toc"> + <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/> + </xsl:call-template> + <xsl:call-template name="section.toc.separator"/> + </xsl:if> + <xsl:apply-templates/> + <xsl:call-template name="process.chunk.footnotes"/> + </section> +</xsl:template> + +<!-- HTML5: link rel="home" is not permitted --> +<!-- Add support for attributes on <html> element --> +<xsl:template match="*" mode="process.root"> + <xsl:variable name="doc" select="self::*"/> + + <xsl:call-template name="user.preroot"/> + <xsl:call-template name="root.messages"/> + + <html> + <xsl:call-template name="root.attributes"/> + <head> + <xsl:call-template name="system.head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:call-template name="head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:call-template name="user.head.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + </head> + <body> + <xsl:call-template name="body.attributes"/> + <xsl:call-template name="user.header.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + <xsl:apply-templates select="."/> + <xsl:call-template name="user.footer.content"> + <xsl:with-param name="node" select="$doc"/> + </xsl:call-template> + </body> + </html> + <xsl:value-of select="$html.append"/> + + <!-- Generate any css files only once, not once per chunk --> + <xsl:call-template name="generate.css.files"/> +</xsl:template> + +<xsl:template name="root.attributes"> +</xsl:template> + +<!-- HTML5: Put glossary in <section> element --> +<xsl:template match="glossary"> + + <xsl:variable name="language"> + <xsl:call-template name="l10n.language"/> + </xsl:variable> + + <xsl:variable name="lowercase"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">normalize.sort.input</xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="uppercase"> + <xsl:call-template name="gentext"> + <xsl:with-param name="key">normalize.sort.output</xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <xsl:call-template name="id.warning"/> + + <section> + <xsl:apply-templates select="." mode="common.html.attributes"/> + <xsl:if test="$generate.id.attributes != 0"> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="glossary.titlepage"/> + + <xsl:choose> + <xsl:when test="glossdiv"> + <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/> + </xsl:when> + <xsl:when test="glossentry"> + <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + + <xsl:choose> + <xsl:when test="glossdiv"> + <xsl:apply-templates select="glossdiv"/> + </xsl:when> + <xsl:when test="glossentry"> + <dl> + <xsl:choose> + <xsl:when test="$glossary.sort != 0"> + <xsl:apply-templates select="glossentry"> + <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/> + </xsl:apply-templates> + </xsl:when> + ... [truncated message content] |
From: <bob...@us...> - 2011-10-03 15:51:59
|
Revision: 9108 http://docbook.svn.sourceforge.net/docbook/?rev=9108&view=rev Author: bobstayton Date: 2011-10-03 15:51:48 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Allow selection by role for multiple imageobject elements within an imageobjectco, which since Docbook 5 allows multiple imageobjects. Modified Paths: -------------- trunk/xsl/fo/graphics.xsl trunk/xsl/html/graphics.xsl Modified: trunk/xsl/fo/graphics.xsl =================================================================== --- trunk/xsl/fo/graphics.xsl 2011-10-03 06:13:14 UTC (rev 9107) +++ trunk/xsl/fo/graphics.xsl 2011-10-03 15:51:48 UTC (rev 9108) @@ -434,8 +434,32 @@ <!-- ==================================================================== --> <xsl:template match="imageobjectco"> - <xsl:apply-templates select="imageobject"/> + <xsl:choose> + <!-- select one imageobject? --> + <xsl:when test="$use.role.for.mediaobject != 0 and + count(imageobject) > 1 and + imageobject[@role]"> + <xsl:variable name="olist" select="imageobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:apply-templates select="$object"/> + </xsl:when> + <xsl:otherwise> + <!-- otherwise process them all --> + <xsl:apply-templates select="imageobject"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="calloutlist"/> + </xsl:template> <xsl:template match="imageobject"> Modified: trunk/xsl/html/graphics.xsl =================================================================== --- trunk/xsl/html/graphics.xsl 2011-10-03 06:13:14 UTC (rev 9107) +++ trunk/xsl/html/graphics.xsl 2011-10-03 15:51:48 UTC (rev 9108) @@ -1159,8 +1159,32 @@ <xsl:template match="imageobjectco"> <xsl:call-template name="anchor"/> - <xsl:apply-templates select="imageobject"/> + <xsl:choose> + <!-- select one imageobject? --> + <xsl:when test="$use.role.for.mediaobject != 0 and + count(imageobject) > 1 and + imageobject[@role]"> + <xsl:variable name="olist" select="imageobject"/> + + <xsl:variable name="object.index"> + <xsl:call-template name="select.mediaobject.index"> + <xsl:with-param name="olist" select="$olist"/> + <xsl:with-param name="count" select="1"/> + </xsl:call-template> + </xsl:variable> + + <xsl:variable name="object" select="$olist[position() = $object.index]"/> + + <xsl:apply-templates select="$object"/> + </xsl:when> + <xsl:otherwise> + <!-- otherwise process them all --> + <xsl:apply-templates select="imageobject"/> + </xsl:otherwise> + </xsl:choose> + <xsl:apply-templates select="calloutlist"/> + </xsl:template> <xsl:template match="imageobject"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ko...@us...> - 2011-10-04 21:36:17
|
Revision: 9112 http://docbook.svn.sourceforge.net/docbook/?rev=9112&view=rev Author: kosek Date: 2011-10-04 21:36:11 +0000 (Tue, 04 Oct 2011) Log Message: ----------- Titlepage mechanism is now namespace aware to support XHTML. Please note that when generating titlepage template stylesheets you have to pass FO or XHTML namespace inside ns parameter. For HTML parameter should be empty. Modified Paths: -------------- trunk/xsl/Makefile.incl trunk/xsl/fo/Makefile trunk/xsl/template/titlepage.xsl trunk/xsl/xhtml/Makefile Added Paths: ----------- trunk/xsl/epub3/Makefile Modified: trunk/xsl/Makefile.incl =================================================================== --- trunk/xsl/Makefile.incl 2011-10-03 19:28:41 UTC (rev 9111) +++ trunk/xsl/Makefile.incl 2011-10-04 21:36:11 UTC (rev 9112) @@ -77,8 +77,13 @@ titlepage.templates.xsl: titlepage.templates.xml $(NESTLEVEL)../template/titlepage.xsl +ifdef TARGETNS + $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@ ns=$(TARGETNS) +else $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@ +endif + Makefile.param: ifneq ($(shell uname -s | grep -i cygwin),) ifeq ($(XSLTENGINE),saxon) Added: trunk/xsl/epub3/Makefile =================================================================== --- trunk/xsl/epub3/Makefile (rev 0) +++ trunk/xsl/epub3/Makefile 2011-10-04 21:36:11 UTC (rev 9112) @@ -0,0 +1,6 @@ +include $(DOCBOOK_SVN)/buildtools/Makefile.incl + +TARGETNS=http://www.w3.org/1999/xhtml + +titlepage.templates.xsl: titlepage.templates.xml $(NESTLEVEL)../template/titlepage.xsl + $(XSLT) $< $(NESTLEVEL)../template/titlepage.xsl $@ ns=$(TARGETNS) Modified: trunk/xsl/fo/Makefile =================================================================== --- trunk/xsl/fo/Makefile 2011-10-03 19:28:41 UTC (rev 9111) +++ trunk/xsl/fo/Makefile 2011-10-04 21:36:11 UTC (rev 9112) @@ -4,5 +4,6 @@ XSLFILES=param.xsl profile-docbook.xsl ALLTARGETS=$(XSLFILES) titlepage.templates.xsl PROFILECONDITION=fo +TARGETNS=http://www.w3.org/1999/XSL/Format include ../Makefile.incl Modified: trunk/xsl/template/titlepage.xsl =================================================================== --- trunk/xsl/template/titlepage.xsl 2011-10-03 19:28:41 UTC (rev 9111) +++ trunk/xsl/template/titlepage.xsl 2011-10-04 21:36:11 UTC (rev 9112) @@ -20,6 +20,9 @@ <!-- ==================================================================== --> +<!-- Namespace for wrapper elements. Please set it for XHTML. --> +<xsl:param name="ns"/> + <xsl:template match="/"> <xsl:text>
</xsl:text> <xsl:apply-templates/> @@ -178,7 +181,7 @@ <xsl:text>.titlepage</xsl:text> </xsl:attribute> <xsl:text>
 </xsl:text> - <xsl:element name="{@t:wrapper}"> + <xsl:element name="{@t:wrapper}" namespace="{$ns}"> <xsl:apply-templates select="@*" mode="copy.literal.atts"/> <xsl:text>
 </xsl:text> <xsl:element name="xsl:variable"> @@ -232,7 +235,7 @@ <xsl:element name="xsl:if"> <xsl:attribute name="test">(normalize-space($recto.content) != '') or ($recto.elements.count > 0)</xsl:attribute> <xsl:text>
 </xsl:text> - <xsl:element name="{@t:wrapper}"> + <xsl:element name="{@t:wrapper}" namespace="{$ns}"> <xsl:apply-templates select="t:titlepage-content[@t:side='recto']/@*" mode="copy.literal.atts"/> <xsl:element name="xsl:copy-of"> @@ -293,7 +296,7 @@ <xsl:element name="xsl:if"> <xsl:attribute name="test">(normalize-space($verso.content) != '') or ($verso.elements.count > 0)</xsl:attribute> <xsl:text>
 </xsl:text> - <xsl:element name="{@t:wrapper}"> + <xsl:element name="{@t:wrapper}" namespace="{$ns}"> <xsl:apply-templates select="t:titlepage-content[@t:side='verso']/@*" mode="copy.literal.atts"/> <xsl:element name="xsl:copy-of"> @@ -382,7 +385,7 @@ <xsl:text>.auto.mode</xsl:text> </xsl:attribute> <xsl:text>
</xsl:text> - <xsl:element name="{../../@t:wrapper}"> + <xsl:element name="{../../@t:wrapper}" namespace="{$ns}"> <xsl:attribute name="xsl:use-attribute-sets"> <xsl:value-of select="../../@t:element"/> <xsl:text>.titlepage.</xsl:text> @@ -884,7 +887,7 @@ <xsl:when test="@t:force and @t:force != '0'"> <xsl:choose> <xsl:when test="@t:named-template"> - <xsl:element name="{../../@t:wrapper}"> + <xsl:element name="{../../@t:wrapper}" namespace="{$ns}"> <xsl:attribute name="xsl:use-attribute-sets"> <xsl:value-of select="../../@t:element"/> <xsl:text>.titlepage.</xsl:text> Modified: trunk/xsl/xhtml/Makefile =================================================================== --- trunk/xsl/xhtml/Makefile 2011-10-03 19:28:41 UTC (rev 9111) +++ trunk/xsl/xhtml/Makefile 2011-10-04 21:36:11 UTC (rev 9112) @@ -1,5 +1,7 @@ include $(DOCBOOK_SVN)/buildtools/Makefile.incl +TARGETNS=http://www.w3.org/1999/xhtml + all: xsl-files profile-docbook.xsl profile-chunk.xsl profile-onechunk.xsl remove-old: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2011-10-09 21:04:14
|
Revision: 9124 http://docbook.svn.sourceforge.net/docbook/?rev=9124&view=rev Author: bobstayton Date: 2011-10-09 21:04:08 +0000 (Sun, 09 Oct 2011) Log Message: ----------- Table title with tocentry="0" attribute is now omitted from the table of contents. Fixes bug 3279748. Modified Paths: -------------- trunk/xsl/fo/division.xsl trunk/xsl/html/autotoc.xsl trunk/xsl/html/chunk-common.xsl Modified: trunk/xsl/fo/division.xsl =================================================================== --- trunk/xsl/fo/division.xsl 2011-10-09 20:51:44 UTC (rev 9123) +++ trunk/xsl/fo/division.xsl 2011-10-09 21:04:08 UTC (rev 9124) @@ -333,7 +333,7 @@ <xsl:with-param name="content"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> - <xsl:with-param name="nodes" select=".//table"/> + <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> Modified: trunk/xsl/html/autotoc.xsl =================================================================== --- trunk/xsl/html/autotoc.xsl 2011-10-09 20:51:44 UTC (rev 9123) +++ trunk/xsl/html/autotoc.xsl 2011-10-09 21:04:08 UTC (rev 9124) @@ -125,7 +125,7 @@ <xsl:if test="contains($toc.params, 'table')"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> - <xsl:with-param name="nodes" select=".//table"/> + <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/> </xsl:call-template> </xsl:if> Modified: trunk/xsl/html/chunk-common.xsl =================================================================== --- trunk/xsl/html/chunk-common.xsl 2011-10-09 20:51:44 UTC (rev 9123) +++ trunk/xsl/html/chunk-common.xsl 2011-10-09 21:04:08 UTC (rev 9124) @@ -517,7 +517,7 @@ <xsl:with-param name="lot"> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> - <xsl:with-param name="nodes" select=".//table"/> + <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> @@ -525,7 +525,7 @@ <xsl:otherwise> <xsl:call-template name="list.of.titles"> <xsl:with-param name="titles" select="'table'"/> - <xsl:with-param name="nodes" select=".//table"/> + <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2011-10-10 19:41:58
|
Revision: 9127 http://docbook.svn.sourceforge.net/docbook/?rev=9127&view=rev Author: bobstayton Date: 2011-10-10 19:41:51 +0000 (Mon, 10 Oct 2011) Log Message: ----------- Support author/orgname in bibliography, fixing bug 3293062. Modified Paths: -------------- trunk/xsl/fo/biblio.xsl trunk/xsl/html/biblio.xsl Modified: trunk/xsl/fo/biblio.xsl =================================================================== --- trunk/xsl/fo/biblio.xsl 2011-10-09 22:03:30 UTC (rev 9126) +++ trunk/xsl/fo/biblio.xsl 2011-10-10 19:41:51 UTC (rev 9127) @@ -344,8 +344,15 @@ <xsl:template match="author" mode="bibliography.mode"> <fo:inline> - <xsl:call-template name="person.name"/> - <xsl:value-of select="$biblioentry.item.separator"/> + <xsl:choose> + <xsl:when test="orgname"> + <xsl:apply-templates select="orgname" mode="bibliography.mode"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"/> + <xsl:value-of select="$biblioentry.item.separator"/> + </xsl:otherwise> + </xsl:choose> </fo:inline> </xsl:template> @@ -849,7 +856,14 @@ <xsl:template match="author" mode="bibliomixed.mode"> <fo:inline> - <xsl:call-template name="person.name"/> + <xsl:choose> + <xsl:when test="orgname"> + <xsl:apply-templates select="orgname" mode="bibliomixed.mode"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"/> + </xsl:otherwise> + </xsl:choose> </fo:inline> </xsl:template> Modified: trunk/xsl/html/biblio.xsl =================================================================== --- trunk/xsl/html/biblio.xsl 2011-10-09 22:03:30 UTC (rev 9126) +++ trunk/xsl/html/biblio.xsl 2011-10-10 19:41:51 UTC (rev 9127) @@ -325,8 +325,15 @@ <xsl:template match="author" mode="bibliography.mode"> <span> <xsl:call-template name="common.html.attributes"/> - <xsl:call-template name="person.name"/> - <xsl:copy-of select="$biblioentry.item.separator"/> + <xsl:choose> + <xsl:when test="orgname"> + <xsl:apply-templates select="orgname" mode="bibliography.mode"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"/> + <xsl:copy-of select="$biblioentry.item.separator"/> + </xsl:otherwise> + </xsl:choose> </span> </xsl:template> @@ -879,7 +886,14 @@ <xsl:template match="author" mode="bibliomixed.mode"> <span> <xsl:call-template name="common.html.attributes"/> - <xsl:apply-templates mode="bibliomixed.mode"/> + <xsl:choose> + <xsl:when test="orgname"> + <xsl:apply-templates select="orgname" mode="bibliomixed.mode"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="person.name"/> + </xsl:otherwise> + </xsl:choose> </span> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2011-10-24 06:33:58
|
Revision: 9133 http://docbook.svn.sourceforge.net/docbook/?rev=9133&view=rev Author: bobstayton Date: 2011-10-24 06:33:51 +0000 (Mon, 24 Oct 2011) Log Message: ----------- Add support for generate.consistent.ids parameter. Modified Paths: -------------- trunk/xsl/common/common.xsl trunk/xsl/fo/param.ent trunk/xsl/fo/param.xweb trunk/xsl/html/param.ent trunk/xsl/html/param.xweb Modified: trunk/xsl/common/common.xsl =================================================================== --- trunk/xsl/common/common.xsl 2011-10-24 05:45:34 UTC (rev 9132) +++ trunk/xsl/common/common.xsl 2011-10-24 06:33:51 UTC (rev 9133) @@ -458,6 +458,13 @@ <xsl:when test="$object/@xml:id"> <xsl:value-of select="$object/@xml:id"/> </xsl:when> + <xsl:when test="$generate.consistent.ids != 0"> + <!-- Make $object the current node --> + <xsl:for-each select="$object"> + <xsl:text>id-</xsl:text> + <xsl:number level="multiple" count="*"/> + </xsl:for-each> + </xsl:when> <xsl:otherwise> <xsl:value-of select="generate-id($object)"/> </xsl:otherwise> @@ -1326,8 +1333,10 @@ </xsl:choose> </xsl:when> <xsl:otherwise> - <xsl:variable name="prevlist" - select="$list/preceding::orderedlist[1]"/> + <!-- match on previous list at same nesting level --> + <xsl:variable name="prevlist" + select="$list/preceding::orderedlist + [count($list/ancestor::orderedlist) = count(ancestor::orderedlist)][1]"/> <xsl:choose> <xsl:when test="count($prevlist) = 0">2</xsl:when> <xsl:otherwise> Modified: trunk/xsl/fo/param.ent =================================================================== --- trunk/xsl/fo/param.ent 2011-10-24 05:45:34 UTC (rev 9132) +++ trunk/xsl/fo/param.ent 2011-10-24 06:33:51 UTC (rev 9133) @@ -344,3 +344,4 @@ <!ENTITY callout.properties SYSTEM "../params/callout.properties.xml"> <!ENTITY calloutlist.properties SYSTEM "../params/calloutlist.properties.xml"> <!ENTITY task.properties SYSTEM "../params/task.properties.xml"> +<!ENTITY generate.consistent.ids SYSTEM "../params/generate.consistent.ids.xml"> Modified: trunk/xsl/fo/param.xweb =================================================================== --- trunk/xsl/fo/param.xweb 2011-10-24 05:45:34 UTC (rev 9132) +++ trunk/xsl/fo/param.xweb 2011-10-24 06:33:51 UTC (rev 9133) @@ -277,6 +277,7 @@ &monospace.verbatim.font.width; &exsl.node.set.available; &bookmarks.collapse; +&generate.consistent.ids; </reference> <reference xml:id="graphics"><title>Graphics</title> &graphic.default.extension; @@ -657,6 +658,7 @@ <src:fragref linkend="funcsynopsis.decoration.frag"/> <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> +<src:fragref linkend="generate.consistent.ids.frag"/> <src:fragref linkend="generate.index.frag"/> <src:fragref linkend="generate.section.toc.level.frag"/> <src:fragref linkend="generate.toc.frag"/> Modified: trunk/xsl/html/param.ent =================================================================== --- trunk/xsl/html/param.ent 2011-10-24 05:45:34 UTC (rev 9132) +++ trunk/xsl/html/param.ent 2011-10-24 06:33:51 UTC (rev 9133) @@ -316,3 +316,4 @@ <!ENTITY generate.css.header SYSTEM "../params/generate.css.header.xml"> <!ENTITY make.clean.html SYSTEM "../params/make.clean.html.xml"> <!ENTITY custom.css.source SYSTEM "../params/custom.css.source.xml"> +<!ENTITY generate.consistent.ids SYSTEM "../params/generate.consistent.ids.xml"> Modified: trunk/xsl/html/param.xweb =================================================================== --- trunk/xsl/html/param.xweb 2011-10-24 05:45:34 UTC (rev 9132) +++ trunk/xsl/html/param.xweb 2011-10-24 06:33:51 UTC (rev 9133) @@ -136,6 +136,7 @@ &draft.mode; &draft.watermark.image; &generate.id.attributes; +&generate.consistent.ids; &generate.meta.abstract; &make.clean.html; &docbook.css.source; @@ -521,6 +522,7 @@ <src:fragref linkend="funcsynopsis.decoration.frag"/> <src:fragref linkend="funcsynopsis.style.frag"/> <src:fragref linkend="function.parens.frag"/> +<src:fragref linkend="generate.consistent.ids.frag"/> <src:fragref linkend="generate.css.header.frag"/> <src:fragref linkend="generate.id.attributes.frag"/> <src:fragref linkend="generate.index.frag"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2012-02-06 07:28:46
|
Revision: 9229 http://docbook.svn.sourceforge.net/docbook/?rev=9229&view=rev Author: bobstayton Date: 2012-02-06 07:28:38 +0000 (Mon, 06 Feb 2012) Log Message: ----------- Provide README file for xhtml5 and epub3 distribution. Added Paths: ----------- trunk/xsl/epub3/README trunk/xsl/xhtml5/README Added: trunk/xsl/epub3/README =================================================================== --- trunk/xsl/epub3/README (rev 0) +++ trunk/xsl/epub3/README 2012-02-06 07:28:38 UTC (rev 9229) @@ -0,0 +1,137 @@ +DocBook stylesheets for EPUB 3 output +============================================= + +This directory contains XSL stylesheets +for generating EPUB3 output from DocBook content. +For more information on EPUB3, see: + +http://idpf.org/epub/30 + +These EPUB3 stylesheets are a customization layer on +top of the xhtml5/ stylesheets in this distribution, which +are in turn a customization layer on top of the +xhtml/ stylesheets in this distribution. +Using a customization layer enables the EPUB3 +stylesheets to inherit all the features of the +XHTML stylesheets while making the minimum changes +for them to produce valid EPUB3. + +Usage +----------- +The general process for creating an EPUB3 ebook is: + +1. Generate chunked XHTML5 content that validates against +the EPUB3 schemas, and generate the EPUB3 package +files. + +2. Copy any image files into the output directory. + +3. Run a zip command to create an .epub file. + +4. Validate the .epub file. + + +Following are the steps in more detail. + +1. Create the XHTML5 files. +----------------------------- + +The first step is handled by these stylesheets. +To generate EPUB3-compatible XHTML5 files, +use one of the following stylesheets as you would any +other DocBook XSL stylesheet: + +epub3/chunk.xsl - Chunked output. +epub3/profile-chunk.xsl - Profiled chunk output. + +Although the stylesheet directory contains a docbook.xsl +stylesheet for single file output, that is not useful for +generated EPUB3. + +You should set the $base.dir stylesheet param to the +subdirectory that will contain the .xhtml files and +the epub package files. Here is an example using xsltproc: + +xsltproc \ + --stringparam base.dir ebook1/OEBPS/ \ + epub3/chunk.xsl \ + mybook.xml + +After processing a document with this setting, you should find +the following output: + +ebook1/mimetype - required mimetype file. +ebook1/META-INF/container.xml - required container file +ebook1/OEBPS/package.opf - required package file +ebook1/OEBPS/toc.ncx - optional NCX file for backwards compatibility +ebook1/OEBPS/docbook-epub.css - CSS file +ebook1/OEBPS/*.xhtml - The chunked content files. + + +2. Copy image files +--------------------------- + +Manually copy any image files used in the document +into the corresponding locations in the $base.dir +directory. For example, if your document contains: + + <imagedata fileref="images/caution.png"/> + +In this example base.dir, you would copy the file to: + + ebook1/OEBPS/images/caution.png + +You can get a list of image files from the manifest file +named ebook1/OEBPS/package.opf that is created by the +stylesheet. It includes references to image files for +callouts and admonitions if they are used in the output. +Note that the header and footer images are turned off for +EPUB3 output. + + +3. Create the epub3 file. +----------------------------- +Change to the directory containing the base.dir (ebook1 +in this example), and run the following zip command to +create the epub file: + +zip -r -X mybook.epub mimetype META-INF OEBPS + +The -r option means recursively include all directories. +The -X option excludes extra file attributes (required by epub3). +The "mybook.epub" in this example is the output file. +The other three arguments must appear in this order. + + +4. Validating with epubcheck 3 +----------------------------------- + +There is a java program that can be used to check an +epub3 file for conformance. It is currently available +from this website: + + http://code.google.com/p/epubcheck/wiki/EPUBCheck30 + +That website provides a download link, and information on +how to run the command. + + +Testing with EPUB readers +---------------------------- +The EPUB3 standard is not yet widely supported. The output of +these stylesheets has been tested in the following readers: + +Apple iBooks on an iPod and iPad. + - Handles videodata and audiodata. + - Does not format MathML yet. + - Handles SVG. + +Firefox browser with the EPUBReader version 1.4.10 add-on. + - Formats MathML nicely. + - Does not handle videodata or audiodata yet. + - Handles SVG. + +Ibis EPUB3 preview version + - Does not format MathML yet. + - Does not handle videodata or audiodata yet. + - Handles SVG with external viewer. Added: trunk/xsl/xhtml5/README =================================================================== --- trunk/xsl/xhtml5/README (rev 0) +++ trunk/xsl/xhtml5/README 2012-02-06 07:28:38 UTC (rev 9229) @@ -0,0 +1,61 @@ +DocBook stylesheets for HTML5 output +============================================= + +This directory contains XSL stylesheets +for generating HTML5 output from DocBook content. +For information on HTML5, see: + +http://dev.w3.org/html5/spec/Overview.html + +Note that there is no schema available for HTML5, by design. + +The output of these stylesheets is the XML serialization of +HTML5. There is no provision for generating the HTML +serialization of HTML5 with these stylesheets. + +These HTML5 stylesheets are also used by the EPUB3 +stylesheets included in this distribution. + +These stylesheets are customizations of the +existing stylesheets in the "xhtml/" directory. +Using a customization layer enables the HTML5 +stylesheets to inherit all the features of the +XHTML stylesheets while making the minimum changes +for them to produce valid HTML5. + +If you are processing DocBook 5 document, you should use +the namespaced version of the stylesheets, with "-ns-" +in the directory name. + + +Usage +----------- +You should be able to apply any of these stylesheet files +to a DocBook document as with any other DocBook stylesheet: + +xhtml5/docbook.xsl - Single file output. +xhtml5/chunk.xsl - Chunked output. +xhtml5/profile-docbook.xsl - Profiled single file output. +xhtml5/profile-chunk.xsl - Profiled chunk output. +xhtml5/chunkfast.xsl - Chunked output with precomputed chunks. + +Do not attempt to directly use the following two stylesheet files: + +xhtml-docbook.xsl +xhtml-profile-docbook.xsl + +Those are copies of the corresponding files in the +xhtml/ directory, modified to remove the doctype +declarations in the xsl:output elements. They were also +modified to import from the original xhtml/ directory. +They will produce xhtml output, not HTML5 output. +They are imported by the xhtml5 stylesheet files. + +Testing +-------------- + +The HTML5 output of these stylesheets should pass the +W3C online validator, available here: + +http://validator.w3.org/ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tom...@us...> - 2012-03-29 08:40:40
|
Revision: 9256 http://docbook.svn.sourceforge.net/docbook/?rev=9256&view=rev Author: tom_schr Date: 2012-03-29 08:40:29 +0000 (Thu, 29 Mar 2012) Log Message: ----------- Prepared WebHelp reference documentation :) Not clear about parameters brandname and branding: Should they renamed to "webhelp.branding" and "webhelp.brandname"? Currently, docsrc/reference.xml contains only a comment for the WebHelp ref doc to be non-intrusive. Idea is to enable it when it is ready Modified Paths: -------------- trunk/xsl/docsrc/reference.xml Added Paths: ----------- trunk/xsl/params/webhelp.autolabel.xml trunk/xsl/params/webhelp.base.dir.xml trunk/xsl/params/webhelp.common.dir.xml trunk/xsl/params/webhelp.default.topic.xml trunk/xsl/params/webhelp.include.search.tab.xml trunk/xsl/params/webhelp.indexer.language.xml trunk/xsl/params/webhelp.start.filename.xml trunk/xsl/params/webhelp.tree.cookie.id.xml trunk/xsl/webhelp/param.ent trunk/xsl/webhelp/param.xweb Modified: trunk/xsl/docsrc/reference.xml =================================================================== --- trunk/xsl/docsrc/reference.xml 2012-03-29 06:18:13 UTC (rev 9255) +++ trunk/xsl/docsrc/reference.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -146,7 +146,18 @@ </partintro> <xi:include href="../website/param.xml" xpointer="xpointer(/book/reference)" /> </part> + <!-- Prepare WebHelp output + <part xml:id="webhelp"> + <?dbhtml dir="webhelp"?> + <?dbhtml filename="index.html"?> + <xi:include href="../webhelp/param.xml" xpointer="xpointer(/book/info/title)" /> + <partintro xml:id="webhelpintro"> + <xi:include href="../webhelp/param.xml" xpointer="xpointer(/book/info/abstract/node())" /> + </partintro> + <xi:include href="../webhelp/param.xml" xpointer="xpointer(/book/reference)" /> + </part> </book> + --> <book xml:id="pi"><title>DocBook XSL Stylesheets User Reference: PIs</title> <?dbhtml dir="pi"?> <?dbhtml filename="index.html"?> Added: trunk/xsl/params/webhelp.autolabel.xml =================================================================== --- trunk/xsl/params/webhelp.autolabel.xml (rev 0) +++ trunk/xsl/params/webhelp.autolabel.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.autolabel</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname></refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.autolabel.frag"> +<xsl:param name="webhelp.autolabel">0</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.base.dir.xml =================================================================== --- trunk/xsl/params/webhelp.base.dir.xml (rev 0) +++ trunk/xsl/params/webhelp.base.dir.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.base.dir</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.base.dir</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.base.dir.frag"> +<xsl:param name="webhelp.base.dir">docs</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.common.dir.xml =================================================================== --- trunk/xsl/params/webhelp.common.dir.xml (rev 0) +++ trunk/xsl/params/webhelp.common.dir.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.common.dir</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.common.dir</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.common.dir.frag"> +<xsl:param name="webhelp.common.dir">../common/</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.default.topic.xml =================================================================== --- trunk/xsl/params/webhelp.default.topic.xml (rev 0) +++ trunk/xsl/params/webhelp.default.topic.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.default.topic</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.default.topic</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.default.topic.frag"> +<xsl:param name="webhelp.default.topic">index.html</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.include.search.tab.xml =================================================================== --- trunk/xsl/params/webhelp.include.search.tab.xml (rev 0) +++ trunk/xsl/params/webhelp.include.search.tab.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.include.search.tab</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.include.search.tab</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.include.search.tab.frag"> +<xsl:param name="webhelp.include.search.tab">true</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.indexer.language.xml =================================================================== --- trunk/xsl/params/webhelp.indexer.language.xml (rev 0) +++ trunk/xsl/params/webhelp.indexer.language.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.indexer.language</refentrytitle> +<refmiscinfo class="other" otherclass="datatype"></refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.indexer.language</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.indexer.language.frag"> +<xsl:param name="webhelp.indexer.language">en</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.start.filename.xml =================================================================== --- trunk/xsl/params/webhelp.start.filename.xml (rev 0) +++ trunk/xsl/params/webhelp.start.filename.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.start.filename</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.start.filename</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.start.filename.frag"> +<xsl:param name="webhelp.start.filename">index.html</xsl:param> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/params/webhelp.tree.cookie.id.xml =================================================================== --- trunk/xsl/params/webhelp.tree.cookie.id.xml (rev 0) +++ trunk/xsl/params/webhelp.tree.cookie.id.xml 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,25 @@ +<refentry xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="5.0" xml:id="autolayout-file"> +<refmeta> +<refentrytitle>webhelp.tree.cookie.id</refentrytitle> +<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo> +</refmeta> +<refnamediv> +<refname>webhelp.tree.cookie.id</refname> +<refpurpose></refpurpose> +</refnamediv> + +<refsynopsisdiv> +<src:fragment xml:id="webhelp.tree.cookie.id.frag"> +<xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/> +</src:fragment> +</refsynopsisdiv> + +<refsection><info><title>Description</title></info> +<para></para> +</refsection> +</refentry> Added: trunk/xsl/webhelp/param.ent =================================================================== --- trunk/xsl/webhelp/param.ent (rev 0) +++ trunk/xsl/webhelp/param.ent 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,11 @@ +<!ENTITY webhelp.include.search.tab SYSTEM "../params/webhelp.include.search.tab.xml"> +<!ENTITY webhelp.start.filename SYSTEM "../params/webhelp.start.filename.xml"> +<!ENTITY webhelp.base.dir SYSTEM "../params/webhelp.base.dir.xml"> +<!ENTITY webhelp.common.dir SYSTEM "../params/webhelp.common.dir.xml"> +<!ENTITY webhelp.tree.cookie.id SYSTEM "../params/webhelp.tree.cookie.id.xml"> +<!ENTITY webhelp.indexer.language SYSTEM "../params/webhelp.indexer.language.xml"> +<!ENTITY webhelp.default.topic SYSTEM "../params/webhelp.default.topic.xml"> +<!ENTITY webhelp.autolabel SYSTEM "../params/webhelp.autolabel.xml"> +<!ENTITY branding SYSTEM "../params/webhelp.branding.xml"> +<!ENTITY brandname SYSTEM "../params/webhelp.brandname.xml"> + Added: trunk/xsl/webhelp/param.xweb =================================================================== --- trunk/xsl/webhelp/param.xweb (rev 0) +++ trunk/xsl/webhelp/param.xweb 2012-03-29 08:40:29 UTC (rev 9256) @@ -0,0 +1,77 @@ +<!DOCTYPE book [ +<!ENTITY % param.ent SYSTEM "param.ent"> +%param.ent; +]> + +<book xmlns="http://docbook.org/ns/docbook" version="5.0" + xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <info> + <title>WebHelp Parameter Reference</title> + <releaseinfo role="meta"> $Id: $ </releaseinfo> + <authorgroup> + <author> + <personname> + <surname>Kasun</surname> + <firstname>Gajasinghe</firstname> + </personname> + <email>kasunbg AT gmail DOT com</email> + </author> + <author> + <personname> + <surname>David</surname> + <firstname>Cramer</firstname> + </personname> + <email>david AT thingbag DOT net</email> + </author> + </authorgroup> + + + <abstract> + <para>This is reference documentation for all user-configurable + parameters in the DocBook XSL WebHelp stylesheet (for + generating websites from DocBook XML sources). Note that the + WebHelp stylesheet is a customization layer of the DocBook + XSL (X)HTML stylesheet. Therefore, in addition to the + WebHelp-specific parameters listed in this section, you can + also use a number of <link xlink:href="../html/">(X)HTML + stylesheet parameters</link> to control WebHelp + output.</para> + </abstract> + </info> + <reference xml:id="webhelp.general"> + <title>General Parameters</title> + &webhelp.include.search.tab; + </reference> + + <appendix xml:id="stylesheet"> + <title>The Stylesheet</title> + + <para>The <filename>param.xsl</filename> stylesheet is just a + wrapper around all these parameters.</para> + + <src:fragment xml:id="top" mundane-result-prefixes="xsl"> + + <!-- This file is generated from param.xweb --> + <xsl:stylesheet exclude-result-prefixes="src" version="1.0"> + + <src:fragref linkend="webhelp.include.search.tab.frag"/> + <src:fragref linkend="webhelp.start.filename.frag"/> + <src:fragref linkend="webhelp.base.dir.frag"/> + <src:fragref linkend="webhelp.common.dir.frag"/> + <src:fragref linkend="webhelp.tree.cookie.id.frag"/> + <src:fragref linkend="webhelp.indexer.language.frag"/> + <src:fragref linkend="webhelp.default.topic.frag"/> + <src:fragref linkend="webhelp.autolabel.frag"/> + <!-- FIXME: + What about brandname and branding? Shouldn't they + better renamed to webhelp.brandname and webhelp.branding? + <src:fragref linkend="webhelp.branding.frag"/> + <src:fragref linkend="webhelp.brandname.frag"/> + --> + </xsl:stylesheet> + </src:fragment> + + </appendix> +</book> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2012-04-16 20:41:26
|
Revision: 9282 http://docbook.svn.sourceforge.net/docbook/?rev=9282&view=rev Author: bobstayton Date: 2012-04-16 20:41:20 +0000 (Mon, 16 Apr 2012) Log Message: ----------- Fix handling of mediatypes for video and audio files, mostly for HTML5 and EPUB3 outputs. Modified Paths: -------------- trunk/xsl/common/common.xsl trunk/xsl/epub3/epub3-element-mods.xsl trunk/xsl/fo/graphics.xsl trunk/xsl/html/graphics.xsl Modified: trunk/xsl/common/common.xsl =================================================================== --- trunk/xsl/common/common.xsl 2012-04-16 08:24:39 UTC (rev 9281) +++ trunk/xsl/common/common.xsl 2012-04-16 20:41:20 UTC (rev 9282) @@ -1,4 +1,8 @@ <?xml version='1.0'?> +<!DOCTYPE xsl:stylesheet [ +<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'"> +<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> + ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns:dyn="http://exslt.org/dynamic" @@ -2045,4 +2049,48 @@ </xsl:otherwise> </xsl:choose> </xsl:template> + + +<doc:template name="graphic.format.content-type" xmlns=""> + <refpurpose>Returns mimetype for media format</refpurpose> + <refdescription id="graphic.format.content-type-desc"> + <para>This takes as input a 'format' param and returns + a mimetype string. It uses an xsl:choose after first + converting the input to all uppercase.</para> + </refdescription> +</doc:template> +<xsl:template name="graphic.format.content-type"> + <xsl:param name="format"/> + <xsl:variable name="upperformat" select="translate($format,&lowercase;,&uppercase;)"/> + <xsl:choose> + <xsl:when test="$upperformat = ''"></xsl:when> + <xsl:when test="$upperformat = 'linespecific'"></xsl:when> + <xsl:when test="$upperformat = 'PS'">application/postscript</xsl:when> + <xsl:when test="$upperformat = 'PDF'">application/pdf</xsl:when> + <xsl:when test="$upperformat = 'PNG'">image/png</xsl:when> + <xsl:when test="$upperformat = 'SVG'">image/svg+xml</xsl:when> + <xsl:when test="$upperformat = 'JPG'">image/jpeg</xsl:when> + <xsl:when test="$upperformat = 'JPEG'">image/jpeg</xsl:when> + <xsl:when test="$upperformat = 'GIF'">image/gif</xsl:when> + <xsl:when test="$upperformat = 'GIF87A'">image/gif</xsl:when> + <xsl:when test="$upperformat = 'GIF89A'">image/gif</xsl:when> + <xsl:when test="$upperformat = 'ACC'">audio/acc</xsl:when> + <xsl:when test="$upperformat = 'MPG'">audio/mpeg</xsl:when> + <xsl:when test="$upperformat = 'MP1'">audio/mpeg</xsl:when> + <xsl:when test="$upperformat = 'MP2'">audio/mpeg</xsl:when> + <xsl:when test="$upperformat = 'MP3'">audio/mpeg</xsl:when> + <xsl:when test="$upperformat = 'M4A'">audio/mp4</xsl:when> + <xsl:when test="$upperformat = 'MPEG'">audio/mpeg</xsl:when> + <xsl:when test="$upperformat = 'WAV'">audio/wav</xsl:when> + <xsl:when test="$upperformat = 'MP4'">video/mp4</xsl:when> + <xsl:when test="$upperformat = 'M4V'">video/mp4</xsl:when> + <xsl:when test="$upperformat = 'OGV'">video/ogg</xsl:when> + <xsl:when test="$upperformat = 'OGG'">video/ogg</xsl:when> + <xsl:when test="$upperformat = 'WEBM'">video/webm</xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat('image/', $upperformat)"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + </xsl:stylesheet> Modified: trunk/xsl/epub3/epub3-element-mods.xsl =================================================================== --- trunk/xsl/epub3/epub3-element-mods.xsl 2012-04-16 08:24:39 UTC (rev 9281) +++ trunk/xsl/epub3/epub3-element-mods.xsl 2012-04-16 20:41:20 UTC (rev 9282) @@ -1156,25 +1156,6 @@ </xsl:if> </xsl:template> -<xsl:template name="graphic.format.content-type"> - <xsl:param name="format" select="''"/> - <xsl:choose> - <xsl:when test="$format = ''"></xsl:when> - <xsl:when test="$format = 'linespecific'"></xsl:when> - <xsl:when test="$format = 'PS'">application/postscript</xsl:when> - <xsl:when test="$format = 'PDF'">application/pdf</xsl:when> - <xsl:when test="$format = 'PNG'">image/png</xsl:when> - <xsl:when test="$format = 'SVG'">image/svg+xml</xsl:when> - <xsl:when test="$format = 'JPG'">image/jpeg</xsl:when> - <xsl:when test="$format = 'GIF87a'">image/gif</xsl:when> - <xsl:when test="$format = 'GIF89a'">image/gif</xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('image/', - translate($format, &uppercase;, &lowercase;))"/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - <xsl:template name="manifest.toc"> <xsl:variable name="toc.params"> <xsl:call-template name="find.path.params"> @@ -1433,9 +1414,12 @@ <xsl:template match="mediaobject|inlinemediaobject" mode="enumerate-images"> - <xsl:variable name="olist" select="imageobject|imageobjectco| - videoobject|audioobject| - textobject"/> + <xsl:variable name="olist" + select="imageobject[not(@role = 'poster')] + |imageobjectco + |videoobject + |audioobject + |textobject"/> <xsl:variable name="object.index"> <xsl:call-template name="select.mediaobject.index"> @@ -1446,6 +1430,16 @@ <xsl:variable name="object" select="$olist[position() = $object.index]"/> + <xsl:apply-templates select="$object" mode="enumerate-images"/> + + <!-- also include a poster image if present --> + <xsl:apply-templates select="imageobject[@role = 'poster']" mode="enumerate-images"/> + +</xsl:template> + +<xsl:template match="imageobject|videoobject|audioobject" mode="enumerate-images"> + <xsl:param name="object" select="."/> + <xsl:if test="$object"> <xsl:variable name="image.filename"> <xsl:call-template name="mediaobject.filename"> @@ -1477,7 +1471,7 @@ </xsl:if> </xsl:template> - + <!-- Add in the generated images --> <xsl:template match="note|caution|warning|important|tip" mode="enumerate-images"> <xsl:if test="$admon.graphics != 0"> Modified: trunk/xsl/fo/graphics.xsl =================================================================== --- trunk/xsl/fo/graphics.xsl 2012-04-16 08:24:39 UTC (rev 9281) +++ trunk/xsl/fo/graphics.xsl 2012-04-16 20:41:20 UTC (rev 9282) @@ -93,33 +93,7 @@ concat(' ', $lcext, ' '))">1</xsl:if> </xsl:template> -<xsl:template name="graphic.format.content-type"> - <xsl:param name="format"/> - <xsl:variable name="is.graphic.format"> - <xsl:call-template name="is.graphic.format"> - <xsl:with-param name="format" select="$format"/> - </xsl:call-template> - </xsl:variable> - <xsl:if test="$is.graphic.format"> - <xsl:choose> - <xsl:when test="$format = ''"></xsl:when> - <xsl:when test="$format = 'linespecific'"></xsl:when> - <xsl:when test="$format = 'PS'">application/postscript</xsl:when> - <xsl:when test="$format = 'PDF'">application/pdf</xsl:when> - <xsl:when test="$format = 'PNG'">image/png</xsl:when> - <xsl:when test="$format = 'SVG'">image/svg+xml</xsl:when> - <xsl:when test="$format = 'JPG'">image/jpeg</xsl:when> - <xsl:when test="$format = 'GIF87a'">image/gif</xsl:when> - <xsl:when test="$format = 'GIF89a'">image/gif</xsl:when> - <xsl:otherwise> - <xsl:value-of select="concat('image/', - translate($format, &uppercase;, &lowercase;))"/> - </xsl:otherwise> - </xsl:choose> - </xsl:if> -</xsl:template> - <!-- ==================================================================== --> <xsl:template match="screenshot"> Modified: trunk/xsl/html/graphics.xsl =================================================================== --- trunk/xsl/html/graphics.xsl 2012-04-16 08:24:39 UTC (rev 9281) +++ trunk/xsl/html/graphics.xsl 2012-04-16 20:41:20 UTC (rev 9282) @@ -53,9 +53,21 @@ or $lcext = 'jpg' or $lcext = 'avi' or $lcext = 'mpg' + or $lcext = 'mp4' or $lcext = 'mpeg' or $lcext = 'qt' or $lcext = 'gif' + or $lcext = 'acc' + or $lcext = 'mp1' + or $lcext = 'mp2' + or $lcext = 'mp3' + or $lcext = 'mp4' + or $lcext = 'm4v' + or $lcext = 'm4a' + or $lcext = 'wav' + or $lcext = 'ogv' + or $lcext = 'ogg' + or $lcext = 'webm' or $lcext = 'bmp'">1</xsl:if> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2012-04-19 10:11:10
|
Revision: 9286 http://docbook.svn.sourceforge.net/docbook/?rev=9286&view=rev Author: bobstayton Date: 2012-04-19 10:10:58 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Add basic support for new <topic> element. Modified Paths: -------------- trunk/xsl/common/common.xsl trunk/xsl/common/entities.ent trunk/xsl/common/gentext.xsl trunk/xsl/common/labels.xsl trunk/xsl/common/subtitles.xsl trunk/xsl/common/targets.xsl trunk/xsl/common/titles.xsl trunk/xsl/epub3/epub3-element-mods.xsl trunk/xsl/fo/autotoc.xsl trunk/xsl/fo/component.xsl trunk/xsl/fo/index.xsl trunk/xsl/fo/titlepage.templates.xml trunk/xsl/fo/titlepage.xsl trunk/xsl/fo/xref.xsl trunk/xsl/html/autotoc.xsl trunk/xsl/html/changebars.xsl trunk/xsl/html/chunk-code.xsl trunk/xsl/html/chunk-common.xsl trunk/xsl/html/chunktoc.xsl trunk/xsl/html/component.xsl trunk/xsl/html/titlepage.templates.xml trunk/xsl/html/titlepage.xsl trunk/xsl/html/xref.xsl trunk/xsl/template/titlepage.xsl trunk/xsl/webhelp/xsl/webhelp.xsl Modified: trunk/xsl/common/common.xsl =================================================================== --- trunk/xsl/common/common.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/common.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -68,7 +68,7 @@ shortcut sidebar simplelist simplesect spanspec step subject subjectset substeps synopfragment table tbody textobject tfoot tgroup thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4 -toclevel5 tocpart varargs variablelist varlistentry videodata +toclevel5 tocpart topic varargs variablelist varlistentry videodata videoobject void warning subjectset classsynopsis Modified: trunk/xsl/common/entities.ent =================================================================== --- trunk/xsl/common/entities.ent 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/entities.ent 2012-04-19 10:10:58 UTC (rev 9286) @@ -28,7 +28,7 @@ <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, " ", secondary))'> <!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, " ", tertiary))'> -<!ENTITY section '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage)[last()]'> +<!ENTITY section '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]'> <!ENTITY section.id 'generate-id(§ion;)'> <!ENTITY sep '" "'> @@ -64,4 +64,4 @@ parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4| parent::sect5|parent::section|parent::setindex|parent::sidebar| parent::simplesect|parent::taskprerequisites|parent::taskrelated| - parent::tasksummary|parent::warning"> + parent::tasksummary|parent::warning|parent::topic"> Modified: trunk/xsl/common/gentext.xsl =================================================================== --- trunk/xsl/common/gentext.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/gentext.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -90,7 +90,7 @@ </xsl:template> <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect - |bridgehead" + |bridgehead|topic" mode="object.title.template"> <xsl:variable name="is.numbered"> <xsl:call-template name="label.this.section"/> Modified: trunk/xsl/common/labels.xsl =================================================================== --- trunk/xsl/common/labels.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/labels.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -382,6 +382,7 @@ <xsl:variable name="contsec" select="(ancestor::section |ancestor::simplesect + |ancestor::topic |ancestor::sect1 |ancestor::sect2 |ancestor::sect3 @@ -502,6 +503,10 @@ </xsl:choose> </xsl:template> +<xsl:template match="topic" mode="label.markup"> + <!-- topics are not numbered by default --> +</xsl:template> + <xsl:template match="qandadiv" mode="label.markup"> <xsl:variable name="lparent" select="(ancestor::set |ancestor::book Modified: trunk/xsl/common/subtitles.xsl =================================================================== --- trunk/xsl/common/subtitles.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/subtitles.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -154,6 +154,7 @@ <xsl:template match="section |sect1|sect2|sect3|sect4|sect5 |refsect1|refsect2|refsect3 + |topic |simplesect" mode="subtitle.markup"> <xsl:param name="allow-anchors" select="'0'"/> Modified: trunk/xsl/common/targets.xsl =================================================================== --- trunk/xsl/common/targets.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/targets.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -230,6 +230,10 @@ <xsl:call-template name="div"/> </xsl:template> +<xsl:template match="topic" mode="olink.mode"> + <xsl:call-template name="div"/> +</xsl:template> + <xsl:template match="bibliography|bibliodiv" mode="olink.mode"> <xsl:call-template name="div"/> </xsl:template> Modified: trunk/xsl/common/titles.xsl =================================================================== --- trunk/xsl/common/titles.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/common/titles.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -251,6 +251,7 @@ <xsl:template match="section |sect1|sect2|sect3|sect4|sect5 |refsect1|refsect2|refsect3|refsection + |topic |simplesect" mode="title.markup"> <xsl:param name="allow-anchors" select="0"/> @@ -602,6 +603,7 @@ <xsl:template match="section |sect1|sect2|sect3|sect4|sect5 |refsect1|refsect2|refsect3 + |topic |simplesect" mode="titleabbrev.markup"> <xsl:param name="allow-anchors" select="0"/> Modified: trunk/xsl/epub3/epub3-element-mods.xsl =================================================================== --- trunk/xsl/epub3/epub3-element-mods.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/epub3/epub3-element-mods.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -1645,6 +1645,7 @@ <xsl:template match="book| article| + topic| part| reference| preface| @@ -1698,6 +1699,7 @@ preceding::bibliography| preceding::appendix| preceding::article| + preceding::topic| preceding::glossary| preceding::section[not(parent::partintro)]| preceding::sect1[not(parent::partintro)]| @@ -1737,7 +1739,7 @@ <xsl:value-of select="$href"/> </xsl:attribute> </xsl:element> - <xsl:apply-templates select="book[parent::set]|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv[title]|setindex|index" mode="ncx"/> + <xsl:apply-templates select="book[parent::set]|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv[title]|setindex|index" mode="ncx"/> </xsl:element> </xsl:template> Modified: trunk/xsl/fo/autotoc.xsl =================================================================== --- trunk/xsl/fo/autotoc.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/autotoc.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -543,6 +543,7 @@ <xsl:variable name="nodes" select="section|sect1 |qandaset[$qanda.in.toc != 0] |simplesect[$simplesect.in.toc != 0] + |topic |refentry|appendix"/> <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/> @@ -717,7 +718,7 @@ </xsl:if> </xsl:template> -<xsl:template match="sect5|simplesect" mode="toc"> +<xsl:template match="sect5|simplesect|topic" mode="toc"> <xsl:param name="toc-context" select="."/> <xsl:call-template name="toc.line"> Modified: trunk/xsl/fo/component.xsl =================================================================== --- trunk/xsl/fo/component.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/component.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -907,5 +907,29 @@ </xsl:template> +<xsl:template match="topic"> + <xsl:variable name="id"> + <xsl:call-template name="object.id"/> + </xsl:variable> + + <xsl:element name="fo:{$section.container.element}"> + <xsl:attribute name="id"><xsl:value-of + select="$id"/></xsl:attribute> + <xsl:call-template name="topic.titlepage"/> + <xsl:apply-templates/> + </xsl:element> +</xsl:template> + +<xsl:template match="/topic | book/topic" name="topic.page.sequence"> + <xsl:variable name="master-reference"> + <xsl:call-template name="select.pagemaster"/> + </xsl:variable> + + <xsl:apply-templates select="." mode="page.sequence"> + <xsl:with-param name="master-reference" + select="$master-reference"/> + </xsl:apply-templates> +</xsl:template> + </xsl:stylesheet> Modified: trunk/xsl/fo/index.xsl =================================================================== --- trunk/xsl/fo/index.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/index.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -472,7 +472,7 @@ <xsl:variable name="parent" select="concat('|', local-name($parentnode), '|')"/> - <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|info|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/> + <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|info|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|topic|variablelist|warning|'"/> <xsl:choose> <xsl:when test="contains($block.parents, $parent)">fo:block</xsl:when> Modified: trunk/xsl/fo/titlepage.templates.xml =================================================================== --- trunk/xsl/fo/titlepage.templates.xml 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/titlepage.templates.xml 2012-04-19 10:10:58 UTC (rev 9286) @@ -650,6 +650,40 @@ </t:titlepage-before> </t:titlepage> +<t:titlepage t:element="section" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + <itermset/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + <t:titlepage t:element="sect1" t:wrapper="fo:block"> <t:titlepage-content t:side="recto"> <title @@ -854,6 +888,28 @@ </t:titlepage-before> </t:titlepage> +<t:titlepage t:element="topic" t:wrapper="fo:block"> + <t:titlepage-content t:side="recto"> + <title + margin-left="{$title.margin.left}" + font-family="{$title.fontset}"/> + <subtitle + font-family="{$title.fontset}"/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + <!-- ==================================================================== --> <t:titlepage t:element="bibliography" t:wrapper="fo:block"> Modified: trunk/xsl/fo/titlepage.xsl =================================================================== --- trunk/xsl/fo/titlepage.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/titlepage.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -130,6 +130,9 @@ <xsl:attribute-set name="simplesect.titlepage.verso.style" use-attribute-sets="section.titlepage.verso.style"/> +<xsl:attribute-set name="topic.titlepage.recto.style"/> +<xsl:attribute-set name="topic.titlepage.verso.style"/> + <xsl:attribute-set name="refnamediv.titlepage.recto.style" use-attribute-sets="section.titlepage.recto.style"/> <xsl:attribute-set name="refnamediv.titlepage.verso.style" Modified: trunk/xsl/fo/xref.xsl =================================================================== --- trunk/xsl/fo/xref.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/fo/xref.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -571,6 +571,19 @@ <!-- What about "in Chapter X"? --> </xsl:template> +<xsl:template match="topic" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + <xsl:template match="bridgehead" mode="xref-to"> <xsl:param name="referrer"/> <xsl:param name="xrefstyle"/> @@ -773,6 +786,7 @@ |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 + |ancestor::topic |ancestor::refsection |ancestor::refsect1 |ancestor::refsect2 Modified: trunk/xsl/html/autotoc.xsl =================================================================== --- trunk/xsl/html/autotoc.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/autotoc.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -190,6 +190,7 @@ <xsl:with-param name="toc.title.p" select="$toc.title.p"/> <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] + |topic |refentry |article|bibliography|glossary |appendix|index @@ -261,6 +262,7 @@ <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when> <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when> <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when> + <xsl:when test="local-name(.) = 'topic'">1</xsl:when> <xsl:when test="local-name(.) = 'simplesect'"> <!-- sigh... --> <xsl:choose> @@ -272,6 +274,7 @@ <xsl:when test="local-name(..) = 'sect3'">4</xsl:when> <xsl:when test="local-name(..) = 'sect4'">5</xsl:when> <xsl:when test="local-name(..) = 'sect5'">6</xsl:when> + <xsl:when test="local-name(..) = 'topic'">2</xsl:when> <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when> <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when> <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when> @@ -409,6 +412,7 @@ <xsl:with-param name="toc-context" select="$toc-context"/> <xsl:with-param name="nodes" select="section|sect1 |simplesect[$simplesect.in.toc != 0] + |topic |refentry |glossary|bibliography|index |bridgehead[$bridgehead.in.toc != 0]"/> @@ -481,6 +485,17 @@ </xsl:call-template> </xsl:template> +<xsl:template match="topic" mode="toc"> + <xsl:param name="toc-context" select="."/> + + <xsl:call-template name="subtoc"> + <xsl:with-param name="toc-context" select="$toc-context"/> + <xsl:with-param name="nodes" select="section|refentry + |simplesect[$simplesect.in.toc != 0] + |bridgehead[$bridgehead.in.toc != 0]"/> + </xsl:call-template> +</xsl:template> + <xsl:template match="bridgehead" mode="toc"> <xsl:param name="toc-context" select="."/> Modified: trunk/xsl/html/changebars.xsl =================================================================== --- trunk/xsl/html/changebars.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/changebars.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -57,6 +57,7 @@ or local-name(.) = 'sect3' or local-name(.) = 'sect4' or local-name(.) = 'sect5' + or local-name(.) = 'topic' or local-name(.) = 'chapter' or local-name(.) = 'preface' or local-name(.) = 'itemizedlist' Modified: trunk/xsl/html/chunk-code.xsl =================================================================== --- trunk/xsl/html/chunk-code.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/chunk-code.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -371,6 +371,25 @@ </xsl:if> </xsl:when> + <xsl:when test="self::topic"> + <xsl:choose> + <xsl:when test="/set"> + <!-- in a set, make sure we inherit the right book info... --> + <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*"> + <xsl:with-param name="recursive" select="true()"/> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + </xsl:otherwise> + </xsl:choose> + + <xsl:text>to</xsl:text> + <xsl:number level="any" format="01" from="book"/> + <xsl:if test="not($recursive)"> + <xsl:value-of select="$html.ext"/> + </xsl:if> + </xsl:when> + <xsl:otherwise> <xsl:text>chunk-filename-error-</xsl:text> <xsl:value-of select="name(.)"/> @@ -508,6 +527,7 @@ <xsl:template match="set|book|part|preface|chapter|appendix |article + |topic |reference|refentry |book/glossary|article/glossary|part/glossary |book/bibliography|article/bibliography|part/bibliography @@ -580,6 +600,7 @@ <!-- ==================================================================== --> <xsl:template match="set|book|part|preface|chapter|appendix |article + |topic |reference|refentry |sect1|sect2|sect3|sect4|sect5 |section Modified: trunk/xsl/html/chunk-common.xsl =================================================================== --- trunk/xsl/html/chunk-common.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/chunk-common.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -253,6 +253,7 @@ |preceding::refentry[1] |preceding::colophon[1] |preceding::article[1] + |preceding::topic[1] |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] @@ -266,6 +267,7 @@ |ancestor::part[1] |ancestor::reference[1] |ancestor::article[1] + |ancestor::topic[1] |$prev-v1 |$prev-v2)[last()]"/> @@ -355,12 +357,14 @@ |following::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |following::article[1] + |following::topic[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] |descendant::preface[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::article[1] + |descendant::topic[1] |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] @@ -411,6 +415,7 @@ |preceding::refentry[1] |preceding::colophon[1] |preceding::article[1] + |preceding::topic[1] |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] @@ -424,6 +429,7 @@ |ancestor::part[1] |ancestor::reference[1] |ancestor::article[1] + |ancestor::topic[1] |$prev-v1 |$prev-v2)[last()]"/> @@ -458,12 +464,14 @@ |following::index[$generate.index != 0] [parent::article or parent::book][1] |following::article[1] + |following::topic[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] |descendant::preface[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::article[1] + |descendant::topic[1] |descendant::bibliography[parent::article or parent::book][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] @@ -941,6 +949,7 @@ section if position()>1 && depth < chunk.section.depth set setindex + topic --> <!-- ==================================================================== --> @@ -1017,6 +1026,7 @@ <xsl:when test="local-name($node)='chapter'">1</xsl:when> <xsl:when test="local-name($node)='appendix'">1</xsl:when> <xsl:when test="local-name($node)='article'">1</xsl:when> + <xsl:when test="local-name($node)='topic'">1</xsl:when> <xsl:when test="local-name($node)='part'">1</xsl:when> <xsl:when test="local-name($node)='reference'">1</xsl:when> <xsl:when test="local-name($node)='refentry'">1</xsl:when> Modified: trunk/xsl/html/chunktoc.xsl =================================================================== --- trunk/xsl/html/chunktoc.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/chunktoc.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -167,6 +167,10 @@ <xsl:call-template name="process-chunk"/> </xsl:template> +<xsl:template match="topic"> + <xsl:call-template name="process-chunk"/> +</xsl:template> + <xsl:template match="article/appendix"> <xsl:call-template name="process-chunk"/> </xsl:template> Modified: trunk/xsl/html/component.xsl =================================================================== --- trunk/xsl/html/component.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/component.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -421,5 +421,51 @@ <!-- ==================================================================== --> +<xsl:template match="topic"> + <xsl:call-template name="id.warning"/> + + <div> + <xsl:call-template name="common.html.attributes"> + <xsl:with-param name="inherit" select="1"/> + </xsl:call-template> + <xsl:if test="$generate.id.attributes != 0"> + <xsl:attribute name="id"> + <xsl:call-template name="object.id"/> + </xsl:attribute> + </xsl:if> + + <xsl:call-template name="topic.titlepage"/> + + <xsl:variable name="toc.params"> + <xsl:call-template name="find.path.params"> + <xsl:with-param name="table" select="normalize-space($generate.toc)"/> + </xsl:call-template> + </xsl:variable> + + <xsl:apply-templates/> + + <xsl:call-template name="process.footnotes"/> + </div> +</xsl:template> + +<xsl:template match="topic/title|topic/info/title" mode="titlepage.mode" priority="2"> + <xsl:call-template name="component.title"> + <xsl:with-param name="node" select="ancestor::topic[1]"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="topic/subtitle + |topic/info/subtitle" + mode="titlepage.mode" priority="2"> + <xsl:call-template name="component.subtitle"> + <xsl:with-param name="node" select="ancestor::topic[1]"/> + </xsl:call-template> +</xsl:template> + +<xsl:template match="topic/info"></xsl:template> +<xsl:template match="topic/title"></xsl:template> +<xsl:template match="topic/titleabbrev"></xsl:template> +<xsl:template match="topic/subtitle"></xsl:template> + </xsl:stylesheet> Modified: trunk/xsl/html/titlepage.templates.xml =================================================================== --- trunk/xsl/html/titlepage.templates.xml 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/titlepage.templates.xml 2012-04-19 10:10:58 UTC (rev 9286) @@ -334,6 +334,36 @@ </t:titlepage-before> </t:titlepage> +<t:titlepage t:element="topic" t:wrapper="div" class="titlepage"> + <t:titlepage-content t:side="recto"> + <title/> + <subtitle/> + <corpauthor/> + <authorgroup/> + <author/> + <othercredit/> + <releaseinfo/> + <copyright/> + <legalnotice/> + <pubdate/> + <revision/> + <revhistory/> + <abstract/> + </t:titlepage-content> + + <t:titlepage-content t:side="verso"> + </t:titlepage-content> + + <t:titlepage-separator> + </t:titlepage-separator> + + <t:titlepage-before t:side="recto"> + </t:titlepage-before> + + <t:titlepage-before t:side="verso"> + </t:titlepage-before> +</t:titlepage> + <!-- ==================================================================== --> <t:titlepage t:element="appendix" t:wrapper="div" class="titlepage"> Modified: trunk/xsl/html/titlepage.xsl =================================================================== --- trunk/xsl/html/titlepage.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/titlepage.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -65,6 +65,9 @@ <xsl:attribute-set name="sidebar.titlepage.recto.style"/> <xsl:attribute-set name="sidebar.titlepage.verso.style"/> +<xsl:attribute-set name="topic.titlepage.recto.style"/> +<xsl:attribute-set name="topic.titlepage.verso.style"/> + <xsl:attribute-set name="section.titlepage.recto.style"/> <xsl:attribute-set name="section.titlepage.verso.style"/> Modified: trunk/xsl/html/xref.xsl =================================================================== --- trunk/xsl/html/xref.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/html/xref.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -601,6 +601,19 @@ <!-- FIXME: What about "in Chapter X"? --> </xsl:template> +<xsl:template match="topic" mode="xref-to"> + <xsl:param name="referrer"/> + <xsl:param name="xrefstyle"/> + <xsl:param name="verbose" select="1"/> + + <xsl:apply-templates select="." mode="object.xref.markup"> + <xsl:with-param name="purpose" select="'xref'"/> + <xsl:with-param name="xrefstyle" select="$xrefstyle"/> + <xsl:with-param name="referrer" select="$referrer"/> + <xsl:with-param name="verbose" select="$verbose"/> + </xsl:apply-templates> +</xsl:template> + <xsl:template match="bridgehead" mode="xref-to"> <xsl:param name="referrer"/> <xsl:param name="xrefstyle"/> @@ -792,6 +805,7 @@ |ancestor::sect3 |ancestor::sect4 |ancestor::sect5 + |ancestor::topic |ancestor::refsection |ancestor::refsect1 |ancestor::refsect2 Modified: trunk/xsl/template/titlepage.xsl =================================================================== --- trunk/xsl/template/titlepage.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/template/titlepage.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -773,6 +773,7 @@ <xsl:when test="ancestor::t:titlepage/@t:element='sect5'"></xsl:when> <xsl:when test="ancestor::t:titlepage/@t:element='book'"></xsl:when> <xsl:when test="ancestor::t:titlepage/@t:element='set'"></xsl:when> + <xsl:when test="ancestor::t:titlepage/@t:element='topic'"></xsl:when> <xsl:otherwise>docinfo</xsl:otherwise> </xsl:choose> </xsl:variable> @@ -880,6 +881,7 @@ <xsl:when test="ancestor::t:titlepage/@t:element='sect5'"></xsl:when> <xsl:when test="ancestor::t:titlepage/@t:element='book'"></xsl:when> <xsl:when test="ancestor::t:titlepage/@t:element='set'"></xsl:when> + <xsl:when test="ancestor::t:titlepage/@t:element='topic'"></xsl:when> <xsl:otherwise>docinfo</xsl:otherwise> </xsl:choose> </xsl:variable> Modified: trunk/xsl/webhelp/xsl/webhelp.xsl =================================================================== --- trunk/xsl/webhelp/xsl/webhelp.xsl 2012-04-18 19:35:20 UTC (rev 9285) +++ trunk/xsl/webhelp/xsl/webhelp.xsl 2012-04-19 10:10:58 UTC (rev 9286) @@ -755,7 +755,7 @@ <!-- Generates the webhelp table-of-contents (TOC). --> <xsl:template - match="book|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex" + match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex" mode="webhelptoc"> <xsl:param name="currentid"/> <xsl:variable name="title"> @@ -794,10 +794,10 @@ <xsl:value-of select="$title"/> </a> </span> - <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"> + <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"> <ul> <xsl:apply-templates - select="part|reference|preface|chapter|bibliography|appendix|article|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv" + select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv" mode="webhelptoc"> <xsl:with-param name="currentid" select="$currentid"/> </xsl:apply-templates> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dc...@us...> - 2012-05-06 19:41:12
|
Revision: 9333 http://docbook.svn.sourceforge.net/docbook/?rev=9333&view=rev Author: dcramer Date: 2012-05-06 19:41:03 +0000 (Sun, 06 May 2012) Log Message: ----------- Webhelp: moving parameters into the standard location so they will be part of the parameter reference Modified Paths: -------------- trunk/xsl/html/param.ent trunk/xsl/html/param.xweb trunk/xsl/params/base.dir.xml trunk/xsl/params/webhelp.autolabel.xml trunk/xsl/params/webhelp.base.dir.xml trunk/xsl/params/webhelp.common.dir.xml trunk/xsl/params/webhelp.default.topic.xml trunk/xsl/params/webhelp.include.search.tab.xml trunk/xsl/params/webhelp.indexer.language.xml trunk/xsl/params/webhelp.start.filename.xml trunk/xsl/params/webhelp.tree.cookie.id.xml Added Paths: ----------- trunk/xsl/webhelp/xsl/webhelp-common.xsl Removed Paths: ------------- trunk/xsl/webhelp/xsl/webhelp.xsl Modified: trunk/xsl/html/param.ent =================================================================== --- trunk/xsl/html/param.ent 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/html/param.ent 2012-05-06 19:41:03 UTC (rev 9333) @@ -320,3 +320,11 @@ <!ENTITY chunked.filename.prefix SYSTEM "../params/chunked.filename.prefix.xml"> <!ENTITY html.script SYSTEM "../params/html.script.xml"> <!ENTITY html.script.type SYSTEM "../params/html.script.type.xml"> +<!ENTITY webhelp.autolabel SYSTEM "../params/webhelp.autolabel.xml"> +<!ENTITY webhelp.base.dir SYSTEM "../params/webhelp.base.dir.xml"> +<!ENTITY webhelp.common.dir SYSTEM "../params/webhelp.common.dir.xml"> +<!ENTITY webhelp.default.topic SYSTEM "../params/webhelp.default.topic.xml"> +<!ENTITY webhelp.include.search.tab SYSTEM "../params/webhelp.include.search.tab.xml"> +<!ENTITY webhelp.indexer.language SYSTEM "../params/webhelp.indexer.language.xml"> +<!ENTITY webhelp.start.filename SYSTEM "../params/webhelp.start.filename.xml"> +<!ENTITY webhelp.tree.cookie.id SYSTEM "../params/webhelp.tree.cookie.id.xml"> Modified: trunk/xsl/html/param.xweb =================================================================== --- trunk/xsl/html/param.xweb 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/html/param.xweb 2012-05-06 19:41:03 UTC (rev 9333) @@ -413,6 +413,16 @@ &eclipse.plugin.id; &eclipse.plugin.provider; </reference> +<reference xml:id="webhelp"><title>WebHelp</title> +&webhelp.autolabel; +&webhelp.base.dir; +&webhelp.common.dir; +&webhelp.default.topic; +&webhelp.include.search.tab; +&webhelp.indexer.language; +&webhelp.start.filename; +&webhelp.tree.cookie.id; +</reference> <reference xml:id="javahelp"><title>JavaHelp</title> &javahelp.encoding; </reference> @@ -753,6 +763,14 @@ <src:fragref linkend="variablelist.as.table.frag"/> <src:fragref linkend="variablelist.term.break.after.frag"/> <src:fragref linkend="variablelist.term.separator.frag"/> +<src:fragref linkend="webhelp.autolabel.frag"/> +<src:fragref linkend="webhelp.base.dir.frag"/> +<src:fragref linkend="webhelp.common.dir.frag"/> +<src:fragref linkend="webhelp.default.topic.frag"/> +<src:fragref linkend="webhelp.include.search.tab.frag"/> +<src:fragref linkend="webhelp.indexer.language.frag"/> +<src:fragref linkend="webhelp.start.filename.frag"/> +<src:fragref linkend="webhelp.tree.cookie.id.frag"/> <src:fragref linkend="writing.mode.frag"/> <src:fragref linkend="xref.label-page.separator.frag"/> <src:fragref linkend="xref.label-title.separator.frag"/> Modified: trunk/xsl/params/base.dir.xml =================================================================== --- trunk/xsl/params/base.dir.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/base.dir.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -21,7 +21,7 @@ <refsection><info><title>Description</title></info> -<para>If specified, the <parameter>base.dir</parameter> identifies +<para>If specified, the <parameter>base.dir</parameter> parameter identifies the output directory for chunks. (If not specified, the output directory is system dependent.)</para> Modified: trunk/xsl/params/webhelp.autolabel.xml =================================================================== --- trunk/xsl/params/webhelp.autolabel.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.autolabel.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -9,8 +9,8 @@ <refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo> </refmeta> <refnamediv> -<refname></refname> -<refpurpose></refpurpose> +<refname>webhelp.autolabel</refname> +<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,6 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>To include chapter and section numbers the table of contents pane, set this parameter to 1.</para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.base.dir.xml =================================================================== --- trunk/xsl/params/webhelp.base.dir.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.base.dir.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.base.dir</refname> -<refpurpose></refpurpose> +<refpurpose>The base directory for webhelp output.</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,10 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>If specified, the <parameter>webhelp.base.dir</parameter> +parameter identifies the output directory for webhelp. (If not +specified, the output directory is system dependent.) By default, this +parameter is set to <filename>docs</filename>.</para> + </refsection> </refentry> Modified: trunk/xsl/params/webhelp.common.dir.xml =================================================================== --- trunk/xsl/params/webhelp.common.dir.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.common.dir.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.common.dir</refname> -<refpurpose></refpurpose> +<refpurpose>Path to the directory for the common webhelp resources (JavaScript, css, common images, etc).</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,6 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>By default, webhelp creates a common directory containing resources such as JavaScript files, css, common images, etc. In some cases you may prefer to store these files in a standard location on your site and point all webhelp documents to that location. You can use this parameter to control the urls written to these common resources. For example, you might set this parameter to <code>/common</code> and create a single common directory at the root of your web server. </para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.default.topic.xml =================================================================== --- trunk/xsl/params/webhelp.default.topic.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.default.topic.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.default.topic</refname> -<refpurpose></refpurpose> +<refpurpose>The name of the file to which the start file in the webhelp base directory redirects</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,17 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>Currently webhelp creates a base directory and puts the output +files in a <filename>content</filename> subdirectory. It creates a +file in the base directory that redirects to a configured file in the +<filename>content</filename> directory. The +<parameter>webhelp.default.topic</parameter> parameter lets you +configure the name of the file that is redirected to. +<note> + <para>This parameter will be removed from a future version of + webhelp along with the <filename>content</filename> + directory.</para> +</note> +</para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.include.search.tab.xml =================================================================== --- trunk/xsl/params/webhelp.include.search.tab.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.include.search.tab.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.include.search.tab</refname> -<refpurpose></refpurpose> +<refpurpose>Should the webhelp output include a Search tab?</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,6 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>Set this parameter to 0 to suppress the search tab from webhelp output.</para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.indexer.language.xml =================================================================== --- trunk/xsl/params/webhelp.indexer.language.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.indexer.language.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.indexer.language</refname> -<refpurpose></refpurpose> +<refpurpose>The language to use for creating the webhelp search index.</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,31 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>To support stemming in the client-side webhelp stemmer, you must provide the language code. By default, the following languages are supported: +<itemizedlist> + <listitem> + <para><code>en</code>: English</para> + </listitem> + <listitem> + <para><code>de</code>: German</para> + </listitem> + <listitem> + <para><code>fr</code>: French</para> + </listitem> + <listitem> + <para><code>it</code>: Italian</para> + </listitem> + <listitem> + <para><code>cn</code>: Chinese</para> + </listitem> + <listitem> + <para><code>ja</code>: Japanese</para> + </listitem> + <listitem> + <para><code>ko</code>: Korean</para> + </listitem> +</itemizedlist> +See the webhelp documentation for information on adding support for additional languages. +</para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.start.filename.xml =================================================================== --- trunk/xsl/params/webhelp.start.filename.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.start.filename.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.start.filename</refname> -<refpurpose></refpurpose> +<refpurpose>The name of the start file in the webhelp base directory.</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,15 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>Currently webhelp creates a base directory and puts the output +files in a <filename>content</filename> subdirectory. It creates a +file in the base directory that redirects to a configured file in the +<filename>content</filename> directory. The <parameter>webhelp.start.filename</parameter> parameter lets you configure the name of the redirect file. +<note> + <para>This parameter will be removed from a future version of + webhelp along with the <filename>content</filename> + directory.</para> +</note> +</para> </refsection> </refentry> Modified: trunk/xsl/params/webhelp.tree.cookie.id.xml =================================================================== --- trunk/xsl/params/webhelp.tree.cookie.id.xml 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/params/webhelp.tree.cookie.id.xml 2012-05-06 19:41:03 UTC (rev 9333) @@ -10,7 +10,7 @@ </refmeta> <refnamediv> <refname>webhelp.tree.cookie.id</refname> -<refpurpose></refpurpose> +<refpurpose>Controls how the cookie that stores the webhelp toc state is named.</refpurpose> </refnamediv> <refsynopsisdiv> @@ -20,6 +20,19 @@ </refsynopsisdiv> <refsection><info><title>Description</title></info> -<para></para> +<para>The webhelp output does not use a frameset. Instead, the table of contents is a div on each page. To preserve the state of the table of contents as the user navigates from page to page, webhelp stores the state in a cookie and reads that cookie when you get to the next page. If you've published several webhelp documents on the same domain, it is important that each cookie have a unique id. In lieu of calling on a GUID generator, by default this parameter is just set to the number of nodes in the document on the assumption that it is unlikely that you will have more than one document with the exact number of nodes. A more optimal solution would be for the user to pass in some unique, stable identifier from the build system to use as the webhelp cookie id. For example, if you have safeguards in place to ensure that the xml:id of the root element of each document will be unique on your site, then you could set webhelptree.cookie.id as follows: +<programlisting><![CDATA[ + <xsl:param name="webhelp.tree.cookie.id"> + <xsl:choose> + <xsl:when test="/*/@xml:id"> + <xsl:value-of select="concat('treeview-',/*/@xml:id)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat( 'treeview-', count(//node()) )"/> + </xsl:otherwise> + </xsl:choose> + </xsl:param>]]> + </programlisting> + </para> </refsection> </refentry> Copied: trunk/xsl/webhelp/xsl/webhelp-common.xsl (from rev 9332, trunk/xsl/webhelp/xsl/webhelp.xsl) =================================================================== --- trunk/xsl/webhelp/xsl/webhelp-common.xsl (rev 0) +++ trunk/xsl/webhelp/xsl/webhelp-common.xsl 2012-05-06 19:41:03 UTC (rev 9333) @@ -0,0 +1,895 @@ +<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" + version="1.0" xmlns="http://www.w3.org/1999/xhtml" + exclude-result-prefixes="exsl ng db"> + +<!-- ******************************************************************** + $Id$ + ******************************************************************** + + This file is part customization layer on top of the XSL DocBook + Stylesheet distribution that generates webhelp output. + + ******************************************************************** --> + + <xsl:import href="../../xhtml/chunk.xsl"/> + + <xsl:output + method="html" + encoding="utf-8" + cdata-section-elements=""/> + + <xsl:param name="chunker.output.method"> + <xsl:choose> + <xsl:when test="contains(system-property('xsl:vendor'), 'SAXON 6')">saxon:xhtml</xsl:when> + <xsl:otherwise>html</xsl:otherwise> + </xsl:choose> + </xsl:param> + + <xsl:param name="doc.title"> + <xsl:call-template name="get.doc.title"/> + </xsl:param> + + <!-- Set some reasonable defaults for webhelp output --> + <xsl:param name="chunker.output.indent">yes</xsl:param> + <xsl:param name="navig.showtitles">0</xsl:param> + <xsl:param name="manifest.in.base.dir" select="0"/> + <xsl:param name="base.dir" select="concat($webhelp.base.dir,'/content/')"/> + <xsl:param name="suppress.navigation">0</xsl:param> + <!-- Generate the end-of-the-book index --> + <xsl:param name="generate.index" select="1"/> + <xsl:param name="inherit.keywords" select="'0'"/> + <xsl:param name="para.propagates.style" select="1"/> + <xsl:param name="phrase.propagates.style" select="1"/> + <xsl:param name="chunk.first.sections" select="1"/> + <xsl:param name="chunk.section.depth" select="1"/> + <xsl:param name="use.id.as.filename" select="1"/> + <xsl:param name="branding">not set</xsl:param> + <xsl:param name="brandname"> </xsl:param> + + <xsl:param name="section.autolabel" select="1"/> + <xsl:param name="chapter.autolabel" select="1"/> + <xsl:param name="appendix.autolabel" select="1"/> + <xsl:param name="qandadiv.autolabel" select="1"/> + <xsl:param name="reference.autolabel" select="1"/> + <xsl:param name="part.autolabel" select="1"/> + <xsl:param name="section.autolabel.max.depth" select="3"/> + <xsl:param name="section.label.includes.component.label" select="1"/> + + <xsl:param name="generate.section.toc.level" select="5"/> + <xsl:param name="component.label.includes.part.label" select="1"/> + <xsl:param name="suppress.footer.navigation">0</xsl:param> + <xsl:param name="callout.graphics.path"><xsl:value-of select="$webhelp.common.dir"/>images/callouts/</xsl:param> + <xsl:param name="callouts.extension">1</xsl:param> + <xsl:param name="admon.graphics.path"><xsl:value-of select="$webhelp.common.dir"/>images/admon/</xsl:param> + <xsl:param name="admon.graphics" select="0"/> + <!--xsl:param name="generate.toc">book toc</xsl:param--> + +<xsl:param name="generate.toc"> +appendix toc,title +article/appendix nop +article toc,title +book title,figure,table,example,equation +chapter toc,title +part toc,title +preface toc,title +qandadiv toc +qandaset toc +reference toc,title +sect1 toc +sect2 toc +sect3 toc +sect4 toc +sect5 toc +section toc +set toc,title +</xsl:param> + + <!-- Localizations of webhelp specific words. Your contributions for other languages are appreciated. + Currently, only around 10 translations needed. --> + <!-- Moved to files under 'gentext/locale/', search for WebHelp --> + + + <xsl:template name="system.head.content"> + <xsl:param name="node" select="."/> +<xsl:text> +</xsl:text> +<!-- +This avoids two problems in IE 8. We should someday figure out why this is happening and tweak the JavaScript so this <meta/> tag is not necessary: +1. When you perform a search and click the Toggle Highlight button, IE 8 adds a line break before the highlighted word. +2. If you click the show/hide toc button, the tab crashes. +These problems go away when you add this IE=7 mode meta tag. + --> + <meta http-equiv="X-UA-Compatible" content="IE=7" /> +<xsl:text> +</xsl:text> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> +<xsl:text> +</xsl:text> + </xsl:template> + + <!-- HTML <head> section customizations --> + <xsl:template name="user.head.content"> + <!-- <xsl:message> + webhelp.tree.cookie.id = <xsl:value-of select="$webhelp.tree.cookie.id"/> +++ <xsl:value-of select="count(//node())"/> + $webhelp.indexer.language = <xsl:value-of select="$webhelp.indexer.language"/> +++ <xsl:value-of select="count(//node())"/> + </xsl:message>--> + <script type="text/javascript"> + //The id for tree cookie + var treeCookieId = "<xsl:value-of select="$webhelp.tree.cookie.id"/>"; + var language = "<xsl:value-of select="$webhelp.indexer.language"/>"; + var w = new Object(); + //Localization + txt_filesfound = '<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'txt_filesfound'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>'; + txt_enter_at_least_1_char = "<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'txt_enter_at_least_1_char'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>"; + txt_browser_not_supported = "<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'txt_browser_not_supported'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>"; + txt_please_wait = "<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'txt_please_wait'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>"; + txt_results_for = "<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'txt_results_for'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>"; + </script> + +<!-- kasunbg: Order is important between the in-html-file css and the linked css files. Some css declarations in jquery-ui-1.8.2.custom.css are over-ridden. + If that's a concern, just remove the additional css contents inside these default jquery css files. I thought of keeping them intact for easier maintenance! --> + <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"/> + <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}css/positioning.css"/> + <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}jquery/theme-redmond/jquery-ui-1.8.2.custom.css"/> + <link rel="stylesheet" type="text/css" href="{$webhelp.common.dir}jquery/treeview/jquery.treeview.css"/> + + <style type="text/css"> +noscript{ + font-weight:bold; +} +input { + margin-bottom: 5px; + margin-top: 2px; +} +.folder { + display: block; + height: 22px; + padding-left: 20px; + background: transparent url(<xsl:value-of select="$webhelp.common.dir"/>jquery/treeview/images/folder.gif) 0 0px no-repeat; +} +span.contentsTab { + padding-left: 20px; + background: url(<xsl:value-of select="$webhelp.common.dir"/>images/toc-icon.png) no-repeat 0 center; +} +span.searchTab { + padding-left: 20px; + background: url(<xsl:value-of select="$webhelp.common.dir"/>images/search-icon.png) no-repeat 0 center; +} + +/* Overide jquery treeview's defaults for ul. */ +.treeview ul { + background-color: transparent; + margin-top: 4px; +} +#webhelp-currentid { + background-color: #D8D8D8 !important; +} +.treeview .hover { color: black; } +.filetree li span a { text-decoration: none; font-size: 12px; color: #517291; } + +/* Override jquery-ui's default css customizations. These are supposed to take precedence over those.*/ +.ui-widget-content { + border: 0px; + background: none; + color: none; +} +.ui-widget-header { + color: #e9e8e9; + border-left: 1px solid #e5e5e5; + border-right: 1px solid #e5e5e5; + border-bottom: 1px solid #bbc4c5; + border-top: 4px solid #e5e5e5; + border: medium none; + background: #F4F4F4; /* old browsers */ + background: -moz-linear-gradient(top, #F4F4F4 0%, #E6E4E5 100%); /* firefox */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F4F4F4), color-stop(100%,#E6E4E5)); /* webkit */ + font-weight: none; +} +.ui-widget-header a { color: none; } +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { +border: none; background: none; font-weight: none; color: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: black; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: none; background: none; font-weight: none; color: none; } + +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: none; background: none; font-weight: none; color: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { + color: black; text-decoration: none; + background: #C6C6C6; /* old browsers */ + background: -moz-linear-gradient(top, #C6C6C6 0%, #D8D8D8 100%); /* firefox */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C6C6C6), color-stop(100%,#D8D8D8)); /* webkit */ + -webkit-border-radius:15px; -moz-border-radius:10px; + border: 1px solid #f1f1f1; +} +.ui-corner-all { border-radius: 0 0 0 0; } + +.ui-tabs { padding: .2em;} +.ui-tabs .ui-tabs-nav li { top: 0px; margin: -2px 0 1px; text-transform: uppercase; font-size: 10.5px;} +.ui-tabs .ui-tabs-nav li a { padding: .25em 2em .25em 1em; margin: .5em; text-shadow: 0 1px 0 rgba(255,255,255,.5); } + </style> + + <!-- + browserDetect is an Oxygen addition to warn the user if they're using chrome from the file system. + This breaks the Oxygen search highlighting. + --> + <script type="text/javascript" src="{$webhelp.common.dir}browserDetect.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery-1.4.2.min.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery-ui-1.8.2.custom.min.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="{$webhelp.common.dir}jquery/jquery.cookie.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="{$webhelp.common.dir}jquery/treeview/jquery.treeview.min.js"> + <xsl:comment> </xsl:comment> + </script> + + <xsl:if test="$webhelp.include.search.tab = 'true'"> + <!--Scripts/css stylesheets for Search--> + <!-- TODO: Why THREE files? There's absolutely no need for having separate files. + These should have been identified at the optimization phase! --> + <script type="text/javascript" src="search/l10n.js"> + <xsl:comment></xsl:comment> + </script> + <script type="text/javascript" src="search/htmlFileList.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="search/htmlFileInfoList.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="search/nwSearchFnt.js"> + <xsl:comment> </xsl:comment> + </script> + + <!-- + NOTE: Stemmer javascript files should be in format <language>_stemmer.js. + For example, for English(en), source should be: "search/stemmers/en_stemmer.js" + For country codes, see: http://www.uspto.gov/patft/help/helpctry.htm + --> + <!--<xsl:message><xsl:value-of select="concat('search/stemmers/',$webhelp.indexer.language,'_stemmer.js')"/></xsl:message>--> + <script type="text/javascript" src="{concat('search/stemmers/',$webhelp.indexer.language,'_stemmer.js')}"> + <xsl:comment>//make this scalable to other languages as well.</xsl:comment> + </script> + + <!--Index Files: + Index is broken in to three equal sized(number of index items) files. This is to help parallel downloading + of files to make it faster. + TODO: Generate webhelp index for largest docbook document that can be find, and analyze the file sizes. + IF the file size is still around ~50KB for a given file, we should consider merging these files together. again. + --> + <script type="text/javascript" src="search/index-1.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="search/index-2.js"> + <xsl:comment> </xsl:comment> + </script> + <script type="text/javascript" src="search/index-3.js"> + <xsl:comment> </xsl:comment> + </script> + <!--End of index files --> + </xsl:if> + <xsl:call-template name="user.webhelp.head.content"/> + </xsl:template> + + <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to <head>. --> + <xsl:template name="user.webhelp.head.content"/> + + <xsl:template name="user.header.navigation"> + <xsl:param name="prev"/> + <xsl:param name="next"/> + <xsl:param name="nav.context"/> + <xsl:call-template name="webhelpheader"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/> + </xsl:call-template> + <!--xsl:call-template name="webhelptoc"/--> + + <!--testing toc in the content page> + <xsl:call-template name="webhelptoctoc"/> + <xsl:if test="$webhelp.include.search.tab != 'false'"> + <xsl:call-template name="search"/> + </xsl:if--> + </xsl:template> + + <xsl:template name="user.header.content"> + <xsl:comment> <!-- KEEP this code. --> </xsl:comment> + </xsl:template> + + <xsl:template name="user.footer.navigation"> + <xsl:call-template name="webhelptoc"> + <xsl:with-param name="currentid" select="generate-id(.)"/> + </xsl:call-template> + </xsl:template> + + <xsl:template match="/"> + <xsl:message>language: <xsl:value-of select="$webhelp.indexer.language"/> </xsl:message> + <!-- * Get a title for current doc so that we let the user --> + <!-- * know what document we are processing at this point. --> + <xsl:choose> + <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document, + toss the namespace and continue. Use the docbook5 namespaced + stylesheets for DocBook5 if you don't want to use this feature.--> + <!-- include extra test for Xalan quirk --> + <xsl:when test="$exsl.node.set.available != 0 and (*/self::ng:* or */self::db:*)"> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>stripped namespace before processing</xsl:text> + </xsl:with-param> + </xsl:call-template> + <xsl:variable name="nons"> + <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:call-template> + --> + <xsl:call-template name="log.message"> + <xsl:with-param name="level">Note</xsl:with-param> + <xsl:with-param name="source" select="$doc.title"/> + <xsl:with-param name="context-desc"> + <xsl:text>namesp. cut</xsl:text> + </xsl:with-param> + <xsl:with-param name="message"> + <xsl:text>processing stripped document</xsl:text> + </xsl:with-param> + </xsl:call-template> + <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:choose> + </xsl:otherwise> + </xsl:choose> + + <xsl:call-template name="index.html"/> + + <xsl:call-template name="l10n.js"/> + </xsl:template> + + + <!-- The WebHelp output structure. similar to main() method. + basic format: + <html> + <head> calls-appropriate-template </head> + <body> + some-generic-content + <div id="content"> + All your docbook document content goes here + .... + </div> + some-other-generic-content-at-footer + </body> + </html> + --> + <xsl:template name="chunk-element-content"> + <xsl:param name="prev"/> + <xsl:param name="next"/> + <xsl:param name="nav.context"/> + <xsl:param name="content"> + <xsl:apply-imports/> + </xsl:param> + + <xsl:call-template name="user.preroot"/> + + <html> + <xsl:call-template name="html.head"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + </xsl:call-template> + + <body> + <xsl:call-template name="body.attributes"/> + + <xsl:call-template name="user.header.navigation"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/> + </xsl:call-template> + + <div id="content"> + <noscript> <!-- Show a notification if the user has disabled javascript --> + + Javascript is disabled on your browser. Please enable Javascript to navigate the interface properly. + + </noscript> + <xsl:call-template name="user.header.content"/> + + <xsl:copy-of select="$content"/> + + <xsl:call-template name="user.footer.content"/> + + <!-- Redundant since the upper navigation bar always visible --> + <xsl:call-template name="footer.navigation"> + <xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/> + </xsl:call-template> + + <xsl:call-template name="user.webhelp.content.footer"/> + </div> + + <xsl:call-template name="user.footer.navigation"/> + </body> + </html> + <xsl:value-of select="$chunk.append"/> + </xsl:template> + + <!-- This is for the USERS. Users who want to customize webhelp may over-ride this template to add content to the footer of the content DIV. + i.e. within <div id="content"> ... </div> --> + <xsl:template name="user.webhelp.content.footer"/> + + <!-- The Header with the company logo --> + <xsl:template name="webhelpheader"> + <xsl:param name="prev"/> + <xsl:param name="next"/> + <xsl:param name="nav.context"/> + + <xsl:variable name="home" select="/*[1]"/> + <xsl:variable name="up" select="parent::*"/> + + <div id="header"> + <xsl:call-template name="webhelpheader.logo"/> + <!-- Display the page title and the main heading(parent) of it--> + <h1> + <xsl:call-template name="get.doc.title"/> + <br/> + <xsl:choose> + <xsl:when + test="count($up) > 0 and generate-id($up) != generate-id($home)"> + <xsl:apply-templates select="$up" mode="object.title.markup"/> + </xsl:when> + <xsl:when test="not(generate-id(.) = generate-id(/*))"> + <xsl:apply-templates select="." mode="object.title.markup"/> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + </h1> + <!-- Prev and Next links generation--> + <div id="navheader"> + <xsl:call-template name="user.webhelp.navheader.content"/> + <xsl:comment> + <!-- KEEP this code. In case of neither prev nor next links are available, this will help to + keep the integrity of the DOM tree--> + </xsl:comment> + <!--xsl:with-param name="prev" select="$prev"/> + <xsl:with-param name="next" select="$next"/> + <xsl:with-param name="nav.context" select="$nav.context"/--> + <table class="navLinks"> + <tr> + <td> + <a id="showHideButton" href="javascript:showHideToc();" + class="pointLeft" tabindex="5" title="Hide TOC tree">Sidebar + </a> + </td> + <xsl:if test="count($prev) > 0 + or (count($up) > 0 + and generate-id($up) != generate-id($home) + and $navig.showtitles != 0) + or count($next) > 0"> + <td> + <xsl:if test="count($prev)>0"> + <a accesskey="p" class="navLinkPrevious" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$prev"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'prev'"/> + </xsl:call-template> + </a> + </xsl:if> + + <!-- "Up" link--> + <xsl:choose> + <xsl:when test="count($up)>0 + and generate-id($up) != generate-id($home)"> + | + <a accesskey="u" class="navLinkUp" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$up"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'up'"/> + </xsl:call-template> + </a> + </xsl:when> + <xsl:otherwise> </xsl:otherwise> + </xsl:choose> + + <xsl:if test="count($next)>0"> + | + <a accesskey="n" class="navLinkNext" tabindex="5"> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="$next"/> + </xsl:call-template> + </xsl:attribute> + <xsl:call-template name="navig.content"> + <xsl:with-param name="direction" select="'next'"/> + </xsl:call-template> + </a> + </xsl:if> + </td> + </xsl:if> + </tr> + </table> + </div> + </div> + </xsl:template> + + <xsl:template name="webhelpheader.logo"> + <a target="_blank"> + <xsl:attribute name="href"> + <xsl:choose> + <xsl:when test="$branding = 'docbook'">http://docbook.org/</xsl:when> + <xsl:otherwise>#</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <img style='margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px' align="right" + src='{$webhelp.common.dir}images/logo.png' alt="{$brandname} Documentation"/> + </a> + </xsl:template> + + <xsl:template name="user.webhelp.navheader.content"/> + + <xsl:template name="webhelptoc"> + <xsl:param name="currentid"/> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:variable name="title"> + <xsl:if test="$webhelp.autolabel=1"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="key('id',$rootid)" mode="label.markup"/> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="key('id',$rootid)" mode="titleabbrev.markup"/> + </xsl:variable> + <xsl:variable name="href"> + <xsl:choose> + <xsl:when test="$manifest.in.base.dir != 0"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="key('id',$rootid)"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="object" select="key('id',$rootid)"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + </xsl:when> + + <xsl:otherwise> + <xsl:variable name="title"> + <xsl:if test="$webhelp.autolabel=1"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="/*" mode="label.markup"/> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="/*" mode="titleabbrev.markup"/> + </xsl:variable> + <xsl:variable name="href"> + <xsl:choose> + <xsl:when test="$manifest.in.base.dir != 0"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="/"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="href.target.with.base.dir"> + <xsl:with-param name="object" select="/"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <div id="sidebar"> <!--#sidebar id is used for showing and hiding the side bar --> + <div id="leftnavigation" style="padding-top:3px;"> + <div id="tabs"> + <ul> + <li> + <a href="#treeDiv" style="outline:0;" tabindex="1"> + <span class="contentsTab"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'TableofContents'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template> + </span> + </a> + </li> + <xsl:if test="$webhelp.include.search.tab != 'false'"> + <li> + <a href="#searchDiv" style="outline:0;" tabindex="1" onclick="doSearch()"> + <span class="searchTab"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'Search'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template> + </span> + </a> + </li> + </xsl:if> + <xsl:call-template name="user.webhelp.tabs.title"/> + </ul> + <div id="treeDiv"> + <img src="{$webhelp.common.dir}images/loading.gif" alt="loading table of contents..." + id="tocLoading" style="display:block;"/> + <div id="ulTreeDiv" style="display:none"> + <ul id="tree" class="filetree"> + <xsl:apply-templates select="/*/*" mode="webhelptoc"> + <xsl:with-param name="currentid" select="$currentid"/> + </xsl:apply-templates> + </ul> + </div> + + </div> + <xsl:if test="$webhelp.include.search.tab != 'false'"> + <div id="searchDiv"> + <div id="search"> + <form onsubmit="Verifie(searchForm);return false" + name="searchForm" + class="searchForm"> + <fieldset class="searchFieldSet"> + <legend> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'Search'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template> + </legend> + <center> + <input id="textToSearch" name="textToSearch" type="search" + class="searchText" tabindex="1"/> + <xsl:text disable-output-escaping="yes"> <![CDATA[ ]]> </xsl:text> + <input onclick="Verifie(searchForm)" type="button" + class="searchButton" + value="Go" id="doSearch" tabindex="1"/> + </center> + </fieldset> + </form> + </div> + <div id="searchResults"> + <center> </center> + </div> + <p class="searchHighlight"><a href="#" onclick="toggleHighlight()">Search Highlighter (On/Off)</a></p> + </div> + </xsl:if> + <xsl:call-template name="user.webhelp.tabs.content"/> + </div> + </div> + </div> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- Hooks for adding customs tabs --> + <xsl:template name="user.webhelp.tabs.title"/> + <xsl:template name="user.webhelp.tabs.content"/> + + <!-- Generates the webhelp table-of-contents (TOC). --> + <xsl:template + match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex" + mode="webhelptoc"> + <xsl:param name="currentid"/> + <xsl:variable name="title"> + <xsl:if test="$webhelp.autolabel=1"> + <xsl:variable name="label.markup"> + <xsl:apply-templates select="." mode="label.markup"/> + </xsl:variable> + <xsl:if test="normalize-space($label.markup)"> + <xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/> + </xsl:if> + </xsl:if> + <xsl:apply-templates select="." mode="titleabbrev.markup"/> + </xsl:variable> + + <xsl:variable name="href"> + <xsl:choose> + <xsl:when test="$manifest.in.base.dir != 0"> + <xsl:call-template name="href.target"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="href.target.with.base.dir"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:variable name="id" select="generate-id(.)"/> + + <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))"> + <!--li style="white-space: pre; line-height: 0em;"--> + <li> + <xsl:if test="$id = $currentid"> + <xsl:attribute name="id">webhelp-currentid</xsl:attribute> + </xsl:if> + <span class="file"> + <a href="{substring-after($href, $base.dir)}" tabindex="1"> + <xsl:value-of select="$title"/> + </a> + </span> + <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"> + <ul> + <xsl:apply-templates + select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv" + mode="webhelptoc"> + <xsl:with-param name="currentid" select="$currentid"/> + </xsl:apply-templates> + </ul> + </xsl:if> + </li> + </xsl:if> + </xsl:template> + + <xsl:template match="text()" mode="webhelptoc"/> + + <xsl:template name="user.footer.content"> + <script type="text/javascript" src="{$webhelp.common.dir}main.js"> + <xsl:comment> </xsl:comment> + </script> + </xsl:template> + + <!-- Generates index.html file at docs/. This is simply a redirection to content/$default.topic --> + <xsl:template name="index.html"> + <xsl:variable name="default.topic"> + <xsl:choose> + <xsl:when test="$webhelp.default.topic != ''"> + <xsl:value-of select="$webhelp.default.topic"/> + </xsl:when> + <xsl:when test="$htmlhelp.default.topic != ''"> + <xsl:value-of select="$htmlhelp.default.topic"/> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="make-relative-filename"> + <xsl:with-param name="base.dir"/> + <xsl:with-param name="base.name"> + <xsl:choose> + <xsl:when test="$rootid != ''"> + <xsl:apply-templates select="key('id',$rootid)" mode="chunk-filename"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates + select="*/*[self::preface|self::chapter|self::appendix|self::part][1]" + mode="chunk-filename"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <!-- <xsl:if test="$manifest.in.base.dir != 0"> --> + <!-- <xsl:value-of select="$base.dir"/> --> + <!-- </xsl:if> --> + <xsl:choose> + <xsl:when test="$webhelp.start.filename"> + <xsl:value-of select="concat($webhelp.base.dir,'/',$webhelp.start.filename)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'index.html'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + <xsl:with-param name="method" select="'xml'"/> + <xsl:with-param name="encoding" select="'utf-8'"/> + <xsl:with-param name="indent" select="'yes'"/> + <xsl:with-param name="content"> + <html> + <head> + <link rel="shortcut icon" href="favicon.ico"/> + <meta http-equiv="Refresh" content="1; URL=content/{$default.topic}"/> + <title><xsl:value-of select="//title[1]"/> </title> + </head> + <body> + If not automatically redirected, click <a href="content/{$default.topic}">content/<xsl:value-of select="$default.topic"/></a> + </body> + </html> + </xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template name="l10n.js"> + <xsl:call-template name="write.chunk"> + <xsl:with-param name="filename"> + <xsl:value-of select="concat($base.dir,'search/l10n.js')"/> + </xsl:with-param> + <xsl:with-param name="method" select="'text'"/> + <xsl:with-param name="encoding" select="'utf-8'"/> + <xsl:with-param name="indent" select="'no'"/> + <xsl:with-param name="content"> + //Resource strings for localization + var localeresource = new Object; + localeresource["search_no_results"]="<xsl:call-template name="gentext.template"> + <xsl:with-param name="name" select="'Your_search_returned_no_results'"/> + <xsl:with-param name="context" select="'webhelp'"/> + </xsl:call-template>"; + </xsl:with-param> + </xsl:call-template> + </xsl:template> + +</xsl:stylesheet> + Deleted: trunk/xsl/webhelp/xsl/webhelp.xsl =================================================================== --- trunk/xsl/webhelp/xsl/webhelp.xsl 2012-05-06 15:49:46 UTC (rev 9332) +++ trunk/xsl/webhelp/xsl/webhelp.xsl 2012-05-06 19:41:03 UTC (rev 9333) @@ -1,906 +0,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" - version="1.0" xmlns="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="exsl ng db"> - - <xsl:import href="../../xhtml/chunk.xsl"/> - - <xsl:output - method="html" - encoding="utf-8" - cdata-section-elements=""/> - - <xsl:param name="chunker.output.method"> - <xsl:choose> - <xsl:when test="contains(system-property('xsl:vendor'), 'SAXON 6')">saxon:xhtml</xsl:when> - <xsl:otherwise>html</xsl:otherwise> - </xsl:choose> - </xsl:param> - - <xsl:param name="doc.title"> - <xsl:call-template name="get.doc.title"/> - </xsl:param> - - <!-- webhelp-specific params! --> - <!-- To be added to normal params file someday --> - <xsl:param name="webhelp.include.search.tab">true</xsl:param> - <xsl:param name="webhelp.start.filename">index.html</xsl:param> - <xsl:param name="webhelp.base.dir">docs</xsl:param> - <!-- webhelp.common.dir includes the files including jquery, css files - which are required for general functionality of webhelp --> - <xsl:param name="webhelp.common.dir">../common/</xsl:param> - <!-- webhelp.tree.cookie.id preserves the TOC tree. - i.e. opened tree/sub-tree nodes and closed tree nodes. - Needed for jquery.treeview plugin --> - <xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/> - <!-- Specify the language of your docbook document. - This is needed for stemming support and to filter the subtle differences in the languages - 'en' (english) is the default. Refer the NOTE: on stemmers given below for more info. --> - <xsl:param name="webhelp.indexer.language">en</xsl:param> - <xsl:param name="webhelp.default.topic">index.html</xsl:param> - <xsl:param name="webhelp.autolabel">0</xsl:param> - <!-- webhelp-specific params! --> - - <!-- Set some reasonable defaults for webhelp output --> - <xsl:param name="chunker.output.indent">yes</xsl:param> - <xsl:param name="navig.showtitles">0</xsl:param> - <xsl:param name="manifest.in.base.dir" select="0"/> - <xsl:param name="base.dir" select="concat($webhelp.base.dir,'/content/')"/> - <xsl:param name="suppress.navigation">0</xsl:param> - <!-- Generate the end-of-the-book index --> - <xsl:param name="generate.index" select="1"/> - <xsl:param name="inherit.keywords" select="'0'"/> - <xsl:param name="para.propagates.style" select="1"/> - <xsl:param name="phrase.propagates.style" select="1"/> - <xsl:param name="chunk.first.sections" select="1"/> - <xsl:param name="chunk.section.depth" select="1"/> - <xsl:param name="use.id.as.filename" select="1"/> - <xsl:param name="branding">not set</xsl:param> - <xsl:param name="brandname"> </xsl:param> - - <xsl:param name="section.autolabel" select="1"/> - <xsl:param name="chapter.autolabel" select="1"/> - <xsl:param name="appendix.autolabel" select="1"/> - <xsl:param name="qandadiv.autolabel" select="1"/> - <xsl:param name="reference.autolabel" select="1"/> - <xsl:param name="part.autolabel" select="1"/> - <xsl:param name="section.autolabel.max.depth" select="3"/> - <xsl:param name="section.label.includes.component.label" select="1"/> - - <xsl:param name="generate.section.toc.level" select="5"/> - <xsl:param name="component.label.includes.part.label" select="1"/> - <xsl:param name="suppress.footer.navigation">0</xsl:param> - <xsl:param name="callout.graphics.path"><xsl:value-of select="$webhelp.common.dir"/>images/callouts/</xsl:param> - <xsl:param name=... [truncated message content] |
From: <bob...@us...> - 2012-06-02 21:56:25
|
Revision: 9396 http://docbook.svn.sourceforge.net/docbook/?rev=9396&view=rev Author: bobstayton Date: 2012-06-02 21:56:19 +0000 (Sat, 02 Jun 2012) Log Message: ----------- Import the VERSION.xsl file instead of VERSION so mimetype is interpreted correctly from the filename. Modified Paths: -------------- trunk/xsl/epub3/profile-docbook.xsl trunk/xsl/fo/docbook.xsl trunk/xsl/html/docbook.xsl trunk/xsl/roundtrip/dbk2ooo.xsl trunk/xsl/roundtrip/dbk2pages.xsl trunk/xsl/roundtrip/dbk2wordml.xsl trunk/xsl/roundtrip/dbk2wp.xsl trunk/xsl/slides/html/slides-common.xsl trunk/xsl/website/website-common.xsl trunk/xsl/xhtml5/xhtml-profile-docbook.xsl Modified: trunk/xsl/epub3/profile-docbook.xsl =================================================================== --- trunk/xsl/epub3/profile-docbook.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/epub3/profile-docbook.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -19,7 +19,7 @@ <!-- ==================================================================== --> -<xsl:include href="../VERSION"/> +<xsl:include href="../VERSION.xsl"/> <xsl:include href="../xhtml/param.xsl"/> <xsl:include href="../lib/lib.xsl"/> <xsl:include href="../common/l10n.xsl"/> Modified: trunk/xsl/fo/docbook.xsl =================================================================== --- trunk/xsl/fo/docbook.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/fo/docbook.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -24,7 +24,7 @@ <!-- ==================================================================== --> -<xsl:include href="../VERSION"/> +<xsl:include href="../VERSION.xsl"/> <xsl:include href="param.xsl"/> <xsl:include href="../lib/lib.xsl"/> <xsl:include href="../common/l10n.xsl"/> Modified: trunk/xsl/html/docbook.xsl =================================================================== --- trunk/xsl/html/docbook.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/html/docbook.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -23,7 +23,7 @@ <!-- ==================================================================== --> -<xsl:include href="../VERSION"/> +<xsl:include href="../VERSION.xsl"/> <xsl:include href="param.xsl"/> <xsl:include href="../lib/lib.xsl"/> <xsl:include href="../common/l10n.xsl"/> Modified: trunk/xsl/roundtrip/dbk2ooo.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2ooo.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/roundtrip/dbk2ooo.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -40,7 +40,7 @@ ******************************************************************** --> - <xsl:include href='../VERSION'/> + <xsl:include href='../VERSION.xsl'/> <xsl:template match="/" name='ooo.top'> <xsl:param name='doc' select='/'/> Modified: trunk/xsl/roundtrip/dbk2pages.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2pages.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/roundtrip/dbk2pages.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -23,7 +23,7 @@ ******************************************************************** --> - <xsl:include href='../VERSION'/> + <xsl:include href='../VERSION.xsl'/> <xsl:include href='param.xsl'/> <xsl:variable name='templatedoc' select='document($pages.template)'/> Modified: trunk/xsl/roundtrip/dbk2wordml.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2wordml.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/roundtrip/dbk2wordml.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -25,7 +25,7 @@ ******************************************************************** --> - <xsl:include href='../VERSION'/> + <xsl:include href='../VERSION.xsl'/> <xsl:include href='param.xsl'/> <xsl:strip-space elements='*'/> Modified: trunk/xsl/roundtrip/dbk2wp.xsl =================================================================== --- trunk/xsl/roundtrip/dbk2wp.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/roundtrip/dbk2wp.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -20,7 +20,7 @@ --> - <xsl:include href='../VERSION'/> + <xsl:include href='../VERSION.xsl'/> <!-- doc:docprop.author mode is for creating document metadata --> Modified: trunk/xsl/slides/html/slides-common.xsl =================================================================== --- trunk/xsl/slides/html/slides-common.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/slides/html/slides-common.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -3,7 +3,7 @@ version="1.0"> <xsl:import href="../../html/chunk.xsl"/> -<xsl:include href="../../VERSION"/> +<xsl:include href="../../VERSION.xsl"/> <xsl:include href="param.xsl"/> <xsl:include href="jscript.xsl"/> Modified: trunk/xsl/website/website-common.xsl =================================================================== --- trunk/xsl/website/website-common.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/website/website-common.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -19,7 +19,7 @@ <xsl:import href="../html/docbook.xsl"/> <xsl:import href="xbel.xsl"/> -<xsl:include href="../VERSION"/> +<xsl:include href="../VERSION.xsl"/> <xsl:include href="param.xsl"/> <xsl:include href="head.xsl"/> <xsl:include href="rss.xsl"/> Modified: trunk/xsl/xhtml5/xhtml-profile-docbook.xsl =================================================================== --- trunk/xsl/xhtml5/xhtml-profile-docbook.xsl 2012-06-02 21:48:57 UTC (rev 9395) +++ trunk/xsl/xhtml5/xhtml-profile-docbook.xsl 2012-06-02 21:56:19 UTC (rev 9396) @@ -19,7 +19,7 @@ <!-- ==================================================================== --> -<xsl:include href="../VERSION"/> +<xsl:include href="../VERSION.xsl"/> <xsl:include href="../xhtml/param.xsl"/> <xsl:include href="../lib/lib.xsl"/> <xsl:include href="../common/l10n.xsl"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tom...@us...> - 2012-07-05 14:50:09
|
Revision: 9469 http://docbook.svn.sourceforge.net/docbook/?rev=9469&view=rev Author: tom_schr Date: 2012-07-05 14:49:59 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Added support for @function attribute in keycap (uses keycap context from language files) => fixes RFE#3540451 If @function is set and keycap is empty, then template will use the content from the keycap context, otherwise it will use just the given text Modified Paths: -------------- trunk/xsl/fo/inline.xsl trunk/xsl/html/inline.xsl Modified: trunk/xsl/fo/inline.xsl =================================================================== --- trunk/xsl/fo/inline.xsl 2012-07-05 13:15:58 UTC (rev 9468) +++ trunk/xsl/fo/inline.xsl 2012-07-05 14:49:59 UTC (rev 9469) @@ -532,7 +532,21 @@ </xsl:template> <xsl:template match="keycap"> - <xsl:call-template name="inline.boldseq"/> + <xsl:choose> + <xsl:when test="@function and normalize-space(.) = ''"> + <xsl:call-template name="inline.boldseq"> + <xsl:with-param name="content"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'keycap'"/> + <xsl:with-param name="name" select="@function"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.boldseq"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="keycode"> Modified: trunk/xsl/html/inline.xsl =================================================================== --- trunk/xsl/html/inline.xsl 2012-07-05 13:15:58 UTC (rev 9468) +++ trunk/xsl/html/inline.xsl 2012-07-05 14:49:59 UTC (rev 9469) @@ -607,7 +607,21 @@ </xsl:template> <xsl:template match="keycap"> - <xsl:call-template name="inline.boldseq"/> + <xsl:choose> + <xsl:when test="@function and normalize-space(.) = ''"> + <xsl:call-template name="inline.boldseq"> + <xsl:with-param name="content"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'keycap'"/> + <xsl:with-param name="name" select="@function"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.boldseq"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="keycode"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |