App-Changelog2x
view release on metacpan or search on metacpan
lib/App/changelog2x/common-xhtml.xslt view on Meta::CPAN
<?xml version="1.0" encoding="UTF-8"?>
<!--
:tabSize=2:indentSize=2:wrap=hard:
$Id: common-xhtml.xslt 8 2009-01-19 06:46:50Z rjray $
This XSLT stylesheet contains all the operations/templates that are
common to the XHTML stylesheets.
-->
<xsl:stylesheet version="1.0"
xmlns:cl="http://www.blackperl.com/2009/01/ChangeLogML"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml">
<!--
The source-control identifying string for this component, used in some
credits-comments.
-->
<xsl:variable name="common-xhtml-id">
<xsl:text><![CDATA[$Id: common-xhtml.xslt 8 2009-01-19 06:46:50Z rjray $]]></xsl:text>
</xsl:variable>
<!--
This template creates a simple XML/XHTML comment block that contains the
current date/time stamp from the global parameter "$now", the string of
app/library information from the global "$credits", and whatever the caller
passed in the parameter "id" (usually the "Id" keyword from the version-
control system, expanded for the calling file).
-->
<xsl:template name="insert-comment">
<xsl:param name="id" select="''" />
<xsl:param name="indent" select="' '" />
<xsl:comment>
<xsl:value-of select="$newline" />
<xsl:value-of select="$indent" />
<xsl:text>Generated on </xsl:text>
<xsl:value-of select="$now" />
<xsl:value-of select="$newline" />
<xsl:value-of select="$indent" />
<xsl:text>Using </xsl:text>
<xsl:value-of select="$credits" />
<xsl:value-of select="$newline" />
<xsl:value-of select="$indent" />
<xsl:text>XSLT Sources:</xsl:text>
<xsl:value-of select="$newline" />
<xsl:if test="$id != ''">
<xsl:value-of select="$indent" />
<xsl:value-of select="$indent" />
<xsl:value-of select="$id" />
<xsl:value-of select="$newline" />
</xsl:if>
<xsl:value-of select="$indent" />
<xsl:value-of select="$indent" />
<xsl:value-of select="$common-xhtml-id" />
<xsl:value-of select="$newline" />
<xsl:value-of select="$indent" />
<xsl:value-of select="$indent" />
<xsl:value-of select="$common-id" />
<xsl:value-of select="$newline" />
</xsl:comment>
</xsl:template>
<!--
This template handles the div-block for a single release. It uses the value
of the @version attribute to create a unique ID attribute for the generated
div, as well as an anchor for the a-tag that wraps the h2.
-->
<xsl:template name="release-div" match="cl:release">
<xsl:param name="no_link_to_top" select="1" />
<xsl:param name="position" select="0" />
<xsl:variable name="version" select="translate(@version, '.', '_')" />
<xsl:variable name="div_id" select="concat('release_', $version, '_div')" />
<xsl:variable name="anchor_id" select="concat('release_', $version)" />
<xsl:variable name="subproject">
<xsl:if test="local-name(..) = 'subproject'">
<xsl:value-of select="../@name" />
</xsl:if>
</xsl:variable>
<xsl:variable name="path-prefix">
<xsl:if test="local-name(..) = 'subproject'">
<xsl:value-of select="concat(../@path, '/')" />
</xsl:if>
</xsl:variable>
<div class="changelog-release-div" name="{$anchor_id}" id="{$div_id}"><xsl:value-of select="$newline" />
( run in 1.523 second using v1.01-cache-2.11-cpan-39bf76dae61 )