|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Infinite Recursion Looking for Whitespace. RESOLUT
thanks for the assistance. here's what the working code looks like... this allows me to call a template from my XSL that splits the last node of a sectioned document into two separate rows of a table, the top row is wider than the bottom, allowing for an image in the last TD of the bottom row. I'm sure there's probably a more economical way to do this, but I thought I'd post the code I came up with, for posterity sake. <xsl:template name="lastBlah"> <xsl:param name="leftStringLength"/> <xsl:param name="leftStringValue"/> <xsl:param name="topOrBot" /> <xsl:if test="substring($leftStringValue,number($leftStringLength),1) != ' ' and $leftStringLength >0 "> <!-- recursive call --> <xsl:call-template name="lastBlah"> <xsl:with-param name="leftStringLength" select="$leftStringLength - 1"/> <xsl:with-param name="leftStringValue" select="substring($leftStringValue,'1',number($leftStringLength)-1)" /> <xsl:with-param name="topOrBot" select="$topOrBot"/> </xsl:call-template> </xsl:if> <xsl:if test="substring($leftStringValue,number($leftStringLength),'1') = ' ' and $leftStringLength >0 "> <xsl:choose> <xsl:when test="$topOrBot=0"> <xsl:value-of select="substring($leftStringValue,0,$leftStringLength)" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring(.,$leftStringLength)" /> </xsl:otherwise> </xsl:choose> </xsl:if> </xsl:template> heath deforrest allison "Arrowed!" 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
|

Cart








