Hi,
I would have written those custom templates to match on revhistory, not on
the descendants of revhistory:
<!-- Get rid of the revhistory element -->
<xsl:template match="d:revhistory" mode="titlepage.mode" />
<xsl:template match="d:revhistory" />
Did you try that?
Bob Stayton
Sagehill Enterprises
[email protected]
--------------------------------------------------
From: "Shlomi Fish" <[email protected]>
Sent: Friday, March 29, 2013 12:31 PM
To: "Shlomi Fish" <[email protected]>
Cc: <[email protected]>
Subject: Re: [docbook-apps] [HELP] How can I get rid of the output of the
<revhistory /> tag in the EPUB output
Hi all,
On Mon, 25 Mar 2013 19:15:50 +0200
Shlomi Fish <[email protected]> wrote:
Hi all,
I am trying to get rid of the <revhistory /> tag in the EPUB output here:
https://github.com/shlomif/Human-Hacking-Field-Guide/tree/master/HHFG/text
see below for more information - any help will be appreciated.
Thanks for all your help.
OK, now my XSLT file reads:
«QUOTE»
<xsl:stylesheet version = '1.0'
xmlns="http://docbook.org/ns/docbook"
xmlns:d="http://docbook.org/ns/docbook"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<xsl:import href="epub/docbook.xsl" />
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"
/>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="local-name() = 'legalnotice'">
<legalnotice>
<xsl:copy-of select="@*"/>
<xsl:call-template name="nc_legal_notice" />
</legalnotice>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{local-name()}">
<xsl:copy-of select="@*" />
<xsl:apply-templates />
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="nc_legal_notice">
<para>
This document is copyrighted by Shlomi Fish
under the
<link
xlink:href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative
Commons
Attribution Noncommercial Share-Alike (Unported) License (CC-by-nc-sa)
version
3.0</link>
(or at your option, any greater version).
</para>
<para>
Note that the original text of the story and its DocBook source is
under "CC-by-sa", but the author relicensed the final EPUB to
"CC-by-nc-sa" upon publishing.
</para>
</xsl:template>
<!-- Get rid of the revhistory element -->
<xsl:template match="d:revhistory//*" mode="titlepage.mode" />
<xsl:template match="d:revhistory//*" />
</xsl:stylesheet>
«/QUOTE»
I am still getting the <revhistory /> elements in the EPUB right at the
beginning. I invoke the command like this:
<<QUOTE>>
ruby
-s
/home/shlomif/Download/unpack/file/docbook/docbook-xsl-ns-snapshot/epub/bin/dbtoepub
-s docbook-epub-preproc.xslt -o human-hacking-field-guide--english.epub
human-hacking-field-guide--english.db5.xml
<</QUOTE>
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Freecell Solver - http://fc-solve.shlomifish.org/
Chuck Norris is the greatest man in history. He killed all the great men
who
could ever pose a competition.
— http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
Please reply to list if it's a mailing list post - http://shlom.in/reply .
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]