AxKit-App-TABOO
view release on metacpan or search on metacpan
htdocs/transforms/articles/xhtml/oocommon.xsl view on Meta::CPAN
<xsl:value-of select="translate(normalize-space($string), ' ', '-')"/>
</xsl:template>
<!-- convert centimeters to pixels (badly) -->
<xsl:template name="cm2px">
<xsl:param name="string"/>
<xsl:choose>
<xsl:when test="contains($string, 'cm')">
<xsl:variable name="c" select="substring-before($string, 'cm')"/>
<xsl:choose>
<xsl:when test="string(number($c))='NaN'">
<xsl:value-of select="$string"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat( string( ceiling( number($c) div 2.55 * 72)) , 'px')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
( run in 0.304 second using v1.01-cache-2.11-cpan-4d50c553e7e )