from librarian import XMLNamespace, RDFNS, DCNS, WLNS, NCXNS, OPFNS, NoDublinCore
from librarian.dcparser import BookInfo
+from librarian import functions
+
+functions.reg_person_name()
+
def inner_xml(node):
""" returns node's text and children as a string
<?xml version="1.0" encoding="UTF-8"?>\r
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/">\r
+<xsl:stylesheet version="1.0" \r
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+ xmlns:dc="http://purl.org/dc/elements/1.1/"\r
+ xmlns:wl="http://wolnelektury.pl/functions">\r
<xsl:output method="html" version="1.0" encoding="utf-8" />\r
<xsl:output doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />\r
<xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN" />\r
<div class='title-page'>\r
<xsl:choose>\r
<xsl:when test="//autor_utworu | //nazwa_utworu">\r
- <xsl:apply-templates select="//autor_utworu | //nazwa_utworu | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
+ <xsl:apply-templates select="//autor_utworu" mode="poczatek"/>\r
+ <xsl:apply-templates select="//nazwa_utworu | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
</xsl:when>\r
<xsl:otherwise>\r
- <xsl:apply-templates select="//dc:creator | //dc:title | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
+ <xsl:apply-templates select="//dc:creator" mode="poczatek"/>\r
+ <xsl:apply-templates select="//dc:title | //podtytul | //dzielo_nadrzedne" mode="poczatek"/>\r
</xsl:otherwise>\r
</xsl:choose>\r
</div>\r
</div>\r
</xsl:template>\r
\r
+ <xsl:template match="dc:creator/text()">\r
+ <div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
+ <xsl:value-of select="wl:person_name(.)" />\r
+ </div>\r
+ </xsl:template>\r
+\r
<xsl:template match="autor_utworu" mode="poczatek">\r
<div class="author" xmlns="http://www.w3.org/1999/xhtml">\r
<xsl:apply-templates />\r