This repository has been archived by the owner on Mar 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added optional ability to apply xslt transformation to fb2 - after some
html entities are encoded but before anything else. Changed how strings are splitted into words during hyphenation - better whitespaces handling. Added unescaping of text strings to allow proper processing of the XSLT transformation results.
- Loading branch information
1 parent
f85f31c
commit 4796bcd
Showing
8 changed files
with
71 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# vim | ||
*.swp | ||
*_clip.txt | ||
|
||
# releases | ||
*.7z | ||
|
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
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,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fb="http://www.gribuser.ru/xml/fictionbook/2.0"> | ||
<xsl:output method="xml" encoding="UTF-8" indent="no"/> | ||
|
||
<xsl:template match="node()|@*"> | ||
<xsl:copy> | ||
<xsl:apply-templates select="node()|@*"/> | ||
</xsl:copy> | ||
</xsl:template> | ||
|
||
<xsl:template match="fb:p"> | ||
<xsl:choose> | ||
<xsl:when test="starts-with(.,'– ')"> | ||
<xsl:element name="p" namespace="http://www.gribuser.ru/xml/fictionbook/2.0"> | ||
<xsl:text disable-output-escaping="yes">–&emsp;</xsl:text> | ||
<xsl:value-of select="substring(.,3)"/> | ||
</xsl:element> | ||
</xsl:when> | ||
<xsl:when test="starts-with(.,'–')"> | ||
<xsl:element name="p" namespace="http://www.gribuser.ru/xml/fictionbook/2.0"> | ||
<xsl:text disable-output-escaping="yes">–&emsp;</xsl:text> | ||
<xsl:value-of select="substring(.,2)"/> | ||
</xsl:element> | ||
</xsl:when> | ||
<xsl:otherwise> | ||
<xsl:copy> | ||
<xsl:apply-templates/> | ||
</xsl:copy> | ||
</xsl:otherwise> | ||
</xsl:choose> | ||
</xsl:template> | ||
|
||
</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,3 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
VERSION = u'2.0.1' | ||
VERSION = u'2.1.0' |