Subject: Re: [xsl] Indent based on position() From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx> Date: Thu, 11 Apr 2002 10:13:15 -0600 |
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="content/line"/>
</xsl:template>
<xsl:template match="line">
<!-- Concatenate with a bunch of dashes -->
<xsl:variable name="dashes" select="'---------------------'"/>
<!-- Take the number of dashes corresponding to the line's position number -->
<xsl:value-of select="substring($dashes,1,position())"/>
<xsl:value-of select="."/>
<!-- Carriage-return-->
<xsl:text> </xsl:text>
</xsl:template>
</xsl:stylesheet>
Greg Faron Integre Technical Publishing Co.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Indent based on position(, Kirk Allen Evans | Thread | Re: [xsl] Indent based on position(, Kirk Allen Evans |
[xsl] XSL month sorting, murli bk | Date | [xsl] XSL month sorting (chronologi, murli bk |
Month |