This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XSL output method="text" and indent preservation
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] XSL output method="text" and indent preservation
- From: selva <selva at india dot hp dot com>
- Date: Tue, 31 Jul 2001 19:05:18 +0530
- Organization: Hewlett Packard
- References: <98C7D2E5BCD2374C9AAE0BCD2E9C1DD9075B0B@esebe013.NOE.Nokia.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Jarno,
Thanks. It works. I am going with the template approach. Since I am new to this
XSL stuff, shall I know the resources (may be text book) to learn XSL properly.
Regards,
Selva
Jarno.Elovirta@nokia.com wrote:
> > have one issue. In
> > your suggestion you had given it to get the substring after
> > the FIRST occurrence
> > of the new line character, of preceding element. I would like
> > to get the
> > substring after the LAST occurrence of the new line
> > character. It would give me
> > the white spaces only, in my case. It would be a great help,
>
> <xsl:template name="after-last-linefeed">
> <xsl:param name="text" select="preceding::text()[1]" />
> <xsl:choose>
> <xsl:when test="contains($text, '
')">
> <xsl:call-template name="after-last-linefeed">
> <xsl:with-param name="text" select="substring-after($text, '
')"
> />
> </xsl:call-template>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="$text" />
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> Or write an extension function for
>
> substring-after(exf:reverse(preceding::text()[1]), '
')
>
> Jarno
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list