← Prev in month
← Prev in thread
generating meta attributes for epub
X-NONE X-NONE MicrosoftInternetExplorer4 When transforming using DocBook 1.76.1-ns stylesheets to epub, I need to generate meta tags for DC.identifier. The XML book file has, immediately inside an info element: <biblioid class ="isbn">9780643096059 </biblioid> <biblioid class="doi"/> I need to generate a separate meta element for each and every biblioid using a variation of Dublin Core, such that for the ISBN I want the meta element to appear with an additional “scheme” attribute within the XHTML <head> as: <meta name="DCTERMS.identifier" scheme=" DCTERMS.ISBN" content=" 9780643096059"> The scheme attribute is derived from the biblioid class attribute. I’ve tried to modify the head.content template with this code (which sits inside the code beginning with <xsl:if test="$generate.meta.abstract != 0">): <xsl:if test="$info and $info/d:biblioid"> <meta name = "DCTERMS.identifier"> <xsl:if test="@class='doi'"> <xsl:attribute name="scheme"> <xsl:text> DCTERMS.DOI</xsl:text> </xsl:attribute> <xsl:attribute name="content"> <xsl:for-each select="$info/d:biblioid[@class='doi']"> <xsl:value-of select="normalize-space(.)"/> <xsl:if test="position() < last()" > <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:attribute> </xsl:if> <xsl:if test="@class='isbn'"> <xsl:attribute name="scheme"> <xsl:text> DCTERMS.ISBN</xsl:text> </xsl:attribute> <xsl:attribute name="content"> <xsl:for-each select="$info/d:biblioid[@class='isbn']"> <xsl:value-of select="normalize-space(.)"/> <xsl:if test="position() < last()" > <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:attribute> </xsl:if> <xsl:if test="@class='issn'"> <xsl:attribute name="scheme"> <xsl:text> DCTERMS.ISSN</xsl:text> </xsl:attribute> <xsl:attribute name="content"> <xsl:for-each select="$info/d:biblioid[@class='issn']"> <xsl:value-of select="normalize-space(.)"/> <xsl:if test="position() < last()" > <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </xsl:attribute> </xsl:if> </meta> </xsl:if> All I get is a meta tag with nothing after the meta name: <meta name="DCTERMS.identifier"/> Can you please suggest better logic. Thanks, Dave Gardiner
← Prev in month
← Prev in thread