[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Line Numbering
->-----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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|