[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] EPUB: dbtimestamp PI in pubdate or date
On 17.5.2014 13:48, Thomas Schraitle wrote:
> Digging deeper into the EPUB3 stylesheets, I assume the "dbtimestamp" PI isn't
> supported at all. The pubdate is used as OPF metadata in the following
> template:
>
> <xsl:template match="date|pubdate" mode="opf.metadata">
> <xsl:variable name="date">
> <xsl:call-template name="format.meta.date">
> <xsl:with-param name="string" select="normalize-space(.)"/>
> </xsl:call-template>
> </xsl:variable>
> <!-- ... --->
> </xsl:template>
>
> However, "format.meta.data" just checks if the given text is in the right
> format. If not, it displays the above warning message.
>
> Now I'm wondering if this is the right approach. 8-) Shouldn't we distinguish
> between two cases:
I think that instead of using . we should call apply-templates, so
<?dbtimestamp?> is processed. Something like:
<xsl:template match="date|pubdate" mode="opf.metadata">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:variable name="date">
<xsl:call-template name="format.meta.date">
<xsl:with-param name="string" select="normalize-space($content)"/>
</xsl:call-template>
</xsl:variable>
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
------------------------------------------------------------------
Attachment:
signature.asc
Description: OpenPGP digital signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]