Changeset 213 for rfc2629xslt/rfc2629toFO.xslt
- Timestamp:
- 17/02/08 16:30:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toFO.xslt
r189 r213 2352 2352 </xsl:template> 2353 2353 2354 <!-- measuring lengths --> 2355 <xsl:template match="x:length-of"> 2356 <xsl:variable name="target" select="//*[@anchor=current()/@target]"/> 2357 <xsl:if test="count($target)!=1"> 2358 <xsl:call-template name="error"> 2359 <xsl:with-param name="msg" select="concat('@target ',@target,' defined ',count($target),' times.')"/> 2360 </xsl:call-template> 2361 </xsl:if> 2362 <xsl:variable name="content"> 2363 <xsl:apply-templates select="$target"/> 2364 </xsl:variable> 2365 <xsl:variable name="lineends" select="string-length($content) - string-length(translate($content,' ',''))"/> 2366 <xsl:variable name="indents"> 2367 <xsl:choose> 2368 <xsl:when test="@indented"> 2369 <xsl:value-of select="number(@indented) * $lineends"/> 2370 </xsl:when> 2371 <xsl:otherwise>0</xsl:otherwise> 2372 </xsl:choose> 2373 </xsl:variable> 2374 <xsl:value-of select="string-length($content) + $lineends - $indents"/> 2375 </xsl:template> 2376 2377 <!-- Nop --> 2378 <xsl:template match="x:span"> 2379 <xsl:apply-templates/> 2380 </xsl:template> 2381 2354 2382 <!-- box drawing --> 2355 2383
Note: See TracChangeset
for help on using the changeset viewer.