Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<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:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
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 | ||
ruby /home/shlomif/Download/unpack/file/docbook/docbook-xsl-ns-snapshot/epub/bin/dbtoepub -s "$(pwd)/docbook-epub-preproc.xslt" -o human-hacking-field-guide--english.epub human-hacking-field-guide--english.db5.xml |