xsl-list
[Top] [All Lists]

Re: substring-before<tab/> substring-after<tab/>

2003-02-21 15:12:23
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(_at_)borland(_dot_)com> wrote in message
news:3E569706(_dot_)2050506(_at_)borland(_dot_)com(_dot_)(_dot_)(_dot_)
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



<Prev in Thread] Current Thread [Next in Thread>