@opf_lines.to_s.should =~ /date[^>]+>2008-04-15</
end
+ it "should use the <subjectset> as dc:subject for the 'Real Book' test document #{@xml_file}" do
+ @opf_lines.to_s.should =~ /subject[^>]+>COM018000</
+ end
+
+
after(:all) do
FileUtils.rm_r(@tmpdir, :force => true)
<para>Rxxxxxx Dxxx xx x xxxxxxxxx xxxxxx xxxxxxxxxxxx xx MxSQL xxxxxxxx xxxxxxxx xxx xx xxx xxxxxx xx xxx MxSQL Kxxxxxxxx Bxxx (xxxx://xxx.xxxxx.xxx/xxxxxxx/xxxxxxxxxxxxx.xxxx). Hx xx xxx xxxxxx xx MxSQL xx x Nxxxxxxx (xxxx://xxx.xxxxxxx.xxx/xxxxxxx/xxxxxxxx/) xxx xxx xxxxxx xxxxxxxx xxx xxxxxxx xxxxxxxxx: Dxx Zxxx (x MxSQL xxxxxxxxxxx), Lxxxx Jxxxxxx, ONxxxx.xxx, Txx Pxxx Jxxxxxx, Rxx Hxx Mxxxxxxx, SxxAxxxx Mxxxxxxx, Txxx Rxxxxxxx, Uxxx Rxxxxx, xxx XML.xxx. Hx xxx xxxx xxxxxxxx xxx xxxxx xxxxx, “Ix Sxxxxx xx Kxxxx”. Mxxx xxxxxxxxxxx xx Rxxxxxx, xxxxx xxxx x xxxx xx xxx xxxxxxxxx xxxxxxxx xxxx xxxxx xx xxxx, xxx xx xxxxx xx xxx xxx xxxx xx xxxx://xxxxxxx.xxxxxxxxx.xxx</para>
</authorblurb>
</author>
+ <subjectset><subject><subjectterm>COM018000</subjectterm></subject></subjectset>
<editor>
<firstname>Axxx</firstname>
<surname>Oxxx</surname>
</xsl:element>
</xsl:template>
+ <xsl:template match="subjectset" mode="opf.metadata">
+ <xsl:apply-templates select="subject/subjectterm" mode="opf.metadata"/>
+ </xsl:template>
+
+ <xsl:template match="subjectterm" mode="opf.metadata">
+ <xsl:element name="dc:subject">
+ <xsl:value-of select="normalize-space(string(.))"/>
+ </xsl:element>
+ </xsl:template>
+
<xsl:template match="publisher" mode="opf.metadata">
<xsl:apply-templates select="publishername" mode="opf.metadata"/>
</xsl:template>