Merge pull request #2 from mgorny/fb2
[librarian.git] / librarian / fb2 / inline.xslt
diff --git a/librarian/fb2/inline.xslt b/librarian/fb2/inline.xslt
new file mode 100644 (file)
index 0000000..221fbfd
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+       This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+       Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+       xmlns:wl="http://wolnelektury.pl/functions"
+       xmlns:dc="http://purl.org/dc/elements/1.1/"
+       xmlns="http://www.gribuser.ru/xml/fictionbook/2.0"
+       xmlns:l="http://www.w3.org/1999/xlink">
+
+       <!-- inline elements -->
+
+       <!-- ignored -->
+       <xsl:template match="motyw" mode="inline"/>
+
+       <!-- formatting -->
+       <xsl:template match="slowo_obce|tytul_dziela">
+               <emphasis>
+                       <xsl:apply-templates mode="inline"/>
+               </emphasis>
+       </xsl:template>
+       <xsl:template match="wyroznienie">
+               <strong>
+                       <xsl:apply-templates mode="inline"/>
+               </strong>
+       </xsl:template>
+
+       <!-- text -->
+       <xsl:template match="text()" mode="inline">
+               <xsl:value-of select="wl:substitute_entities(.)"/>
+       </xsl:template>
+
+       <xsl:template match="uwaga" mode="inline"/>
+       <xsl:template match="extra" mode="inline"/>
+</xsl:stylesheet>