@opf_lines.to_s.should =~ /rights[^>]+>Copyright © dddd O/
end
+ it "should use the <publishername> as dc:publisher for the 'Real Book' test document #{@xml_file}" do
+ @opf_lines.to_s.should =~ /publisher[^>]+>O'Rxxxxx Mxxxx, Ixx.</
+ end
+
after(:all) do
FileUtils.rm_r(@tmpdir, :force => true)
FileUtils.rm_r(@tmpdir2, :force => true)
<!-- All rights reserved. -->
<!-- Published by -->
<publisher>
- <publishername>
-O’Rxxxxx Mxxxx, Ixx. </publishername>
+ <publishername>O'Rxxxxx Mxxxx, Ixx.</publishername>
<address format="linespecific">
<street>dddd Gxxxxxxxxxx Hxxxxxx Nxxxx</street>
<city>Sxxxxxxxxx</city>
</xsl:element>
</xsl:template>
- <xsl:template match="publisher/publishername|publishername" mode="opf.metadata">
+ <xsl:template match="publisher" mode="opf.metadata">
+ <xsl:apply-templates select="publishername" mode="opf.metadata"/>
+ </xsl:template>
+
+ <xsl:template match="publishername" mode="opf.metadata">
<xsl:element name="dc:publisher">
<xsl:value-of select="normalize-space(string(.))"/>
</xsl:element>