Subject: Re: [xsl] Line Numbering From: Steve <subsume@xxxxxxxxx> Date: Fri, 4 Aug 2006 14:42:58 -0400 |
<xsl:call-template name="para"> <xsl:with-param name="lineNumber" select="1" /> <xs:with-param name="para" select="$para" /> </xsl:call-template>
<xsl:template name="para"> <xsl:param name="lineNumber">1</lineNumber> </xsl:param name="para" /> <output line='{$lineNumber}' text="substring($para,0,29)" /> <xsl:if test="test if length of $para is greater than 29" > <xsl:call-template name="para">
<xsl:with-param name="lineNumber" select="$lineNumber + 1"/> <xsl:with-param name="para" select="substring($para,30)" /> </xsl:call-template> </xsl:if> </xsl:template>
Hi,
I'm trying to number the lines of multiple paragraphs.
For example: xml-- <bill> ... <para> FOR AN ACT relating to crimes and offenses; to amend sections 28-101, 28-201 and 28-932, Revised Statutes Cumulative Supplement, 2004; to change provision relating to assault by a confined person; to create the offense of assault...(etc) </para>
I would need xsl code that makes the output look like so...
1 FOR AN ACT relating to crimes and offenses; to amend sections 2 28-101, 28-201 and 28-932, Revised Statutes Cumulative 3 Supplement, 2004; to change provision relating to assault by a 4 confined person; to creat the offense of assault...(etc)
Can anyone help me with this? I just getting my feet wet with xsl, any help would be much appreciated.
Thanks, Luke
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Line Numbering, Luke Jones | Thread | Re: [xsl] Line Numbering, Luke Jones |
[xsl] Line Numbering, Luke Jones | Date | Re: [xsl] Line Numbering, CyberSpace Industrie |
Month |