</xsl:template>\r
\r
<xsl:template name="editors">\r
- <xsl:if test="//dc:contributor.editor|//dc:contributor.technical_editor">\r
+ <xsl:if test="//dc:contributor.editor[text()]|//dc:contributor.technical_editor[text()]">\r
<p class="info">\r
<xsl:text>Opracowanie redakcyjne i przypisy: </xsl:text>\r
- <xsl:for-each select="//dc:contributor.editor|//dc:contributor.technical_editor[not(//dc:contributor.editor/text()=text())]">\r
+ <xsl:for-each select="//dc:contributor.editor[text()]|//dc:contributor.technical_editor[text() and not(//dc:contributor.editor/text()=text())]">\r
<xsl:sort />\r
<xsl:if test="position() != 1">, </xsl:if>\r
<xsl:apply-templates mode="person" />\r
for person in doc.xpath("|".join('//dc:'+(tag) for tag in (
'creator', 'contributor.translator', 'contributor.editor', 'contributor.technical_editor')),
namespaces = {'dc': str(DCNS)})[::-1]:
+ if not person.text:
+ continue
p = Person.from_text(person.text)
person_parsed = deepcopy(person)
person_parsed.tag = person.tag + '_parsed'
else:
source = ''
- contributors = ', '.join(person.readable() for person in sorted(set(parsed_dc.technical_editors + parsed_dc.editors)))
+ contributors = ', '.join(person.readable() for person in
+ sorted(set(p for p in (parsed_dc.technical_editors + parsed_dc.editors) if p)))
if contributors:
contributors = "\n\nOpracowanie redakcyjne i przypisy: %s" % contributors
else:
<rdf:Description rdf:about="http://wiki.wolnepodreczniki.pl/Lektury:Asnyk/Między_nami_nic_nie_było">
<dc:creator xml:lang="pl">Asnyk, Adam</dc:creator>
<dc:title xml:lang="pl">Między nami nic nie było</dc:title>
+<dc:contributor.editor xml:lang="pl" />
<dc:contributor.editor xml:lang="pl">Sekuła, Aleksandra</dc:contributor.editor>
<dc:contributor.technical_editor xml:lang="pl">Sutkowska, Olga</dc:contributor.technical_editor>
<dc:publisher xml:lang="pl">Fundacja Nowoczesna Polska</dc:publisher>