OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: generating meta attributes for epub


I've already solved this.
Inside     <xsl:template name="head.content"> I apply templates with:
            <xsl:apply-templates select="d:info/d:biblioid" mode="html.header"/>
 
Then outside the template head.content, I have the following code to generate the meta content for biblioid:
    <xsl:template match="d:biblioid" mode="html.header">
        <xsl:if test="@class='doi' and self::node() != ''">
            <meta name="DCTERMS.identifier">
                <xsl:attribute name="scheme">
                    <xsl:text>DCTERMS.DOI</xsl:text>
                </xsl:attribute>
                <xsl:attribute name="content">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </meta>           
        </xsl:if>

        <xsl:if test="@class='isbn' and self::node() != ''">
            <meta name="DCTERMS.identifier">
                <xsl:attribute name="scheme">
                    <xsl:text>DCTERMS.ISBN</xsl:text>
                </xsl:attribute>
                <xsl:attribute name="content">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </meta>
        </xsl:if>

        <xsl:if test="@class='issn' and self::node() != ''">
            <meta name="DCTERMS.identifier">
                <xsl:attribute name="scheme">
                    <xsl:text>DCTERMS.ISSN</xsl:text>
                </xsl:attribute>
                <xsl:attribute name="content">
                    <xsl:value-of select="."/>
                </xsl:attribute>
            </meta>
        </xsl:if>
    </xsl:template>
 
 This gives me the meta tag in XHTML of:
      <meta name="DCTERMS.identifier" scheme="DCTERMS.ISBN" content="9780643096059"/>
 
 It's nice coding because it also tests whether the biblioid tag has content; if not, it won't output.
 
Dave Gardiner



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]