[xsl] Re: substring-before<tab/> substring-after<tab/>

Subject: [xsl] Re: substring-before<tab/> substring-after<tab/>
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Fri, 21 Feb 2003 23:12:23 +0100
You need:

    para/text()[1]

to get the first text node child of "para"

and

    para/text()[2]

to get the second text node child of "para"


In case you do not know how many text children has "para", but that it has
exactly one "tab" child, which is surrounded by the text you need, you can
get:

    para/tab/preceding-sibling::node()[1]

and

    para/tab/following-sibling::node()[1]



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




"Deb Berkson" <dberkson@xxxxxxxxxxx> wrote in message
news:3E569706.2050506@xxxxxxxxxxxxxx
> Hi!
> I am trying to get the text before and after the <tab/> demarcation in
> order to insert the strings into separate fields in a table.
>
> <!-- using xsl:copy-of -->
>        <para>
>                   <para style="T2">Provider<tab/>The name of the
> provider to use for the connection.</para>
>
> I can't think of a way to get the information separated... when I output
> the xsl:value-of  the same node I get:
>
> <para>ProviderThe name of the provider to use for the connection.</para>
>
> I looked on the FAQs and archives but I didn't quite know how to word
> this query.
>
>
> Any suggestions would be greatly appreciated!
>
> Thank you in advance!
>
> Deb Berkson
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread