for flag in flags:
document.edoc.getroot().set(flag, 'yes')
+ document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
+
# add editors info
editors = document.editors()
if editors:
<xsl:template match="uwaga" />
<xsl:template match="nota_red" />
+ <xsl:template match="abstrakt" />
<!--pominięcie tych metadanych-->
<xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
+ document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
+
style_filename = os.path.join(os.path.dirname(__file__), 'fb2/fb2.xslt')
style = etree.parse(style_filename)
document.edoc.getroot().set(flag, 'yes')
document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
if not options:
options = {}
return unmerged
- def clean_ed_note(self):
+ def clean_ed_note(self, note_tag='nota_red'):
""" deletes forbidden tags from nota_red """
- for node in self.edoc.xpath('|'.join('//nota_red//%s' % tag for tag in
+ for node in self.edoc.xpath('|'.join('//%s//%s' % (note_tag, tag) for tag in
('pa', 'pe', 'pr', 'pt', 'begin', 'end', 'motyw'))):
tail = node.tail
node.clear()
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->