Subject: RE: Line Numbering From: "Spychalski, Frank" <frank.spychalski@xxxxxxx> Date: Mon, 14 Aug 2000 22:13:56 +0200 |
->-----Original Message----- ->From: Darrin Bishop [mailto:dbishop@xxxxxxxxxxxxxxxxx] ->Subject: Line Numbering Hi, ->I know that xml is not about formatting, but I need to ->transform some xml ->to html that will allow me to put sixty charecters on a line ->and then break. ->I have not seen any discussion on this nor is there anything ->in the archives ->that I could find. Is this not possible with xslt? I have XSLT ->Programmer's Reference but can not seem to get going in the ->right direction. yes, it is possible. Use recursion: <xsl:template name="out"> <xsl:param name="text"/> ... <xsl:value-of select="substring ($text, 1,60)"/> ... <xsl:if test="substring($text,61) != ''"> <xsl:call-template name="out"> <xsl:with-param name="text"> <xsl:value-of select="substring($text,61)"/> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template> I didn't test it, but it should work :-) bye Frank - Frank Spychalski Research Engineer SAP Labs, Palo Alto frank.spychalski@xxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Line Numbering, David_Marston | Thread | RE: Line Numbering, Darrin Bishop |
ANN: Jeni's Tutorials, Jeni Tennison | Date | RE: XSL and blank textarea, David_Marston |
Month |