xsl-list
[Top] [All Lists]

Re: [xsl] check parent text present between child nodes

2006-04-21 10:49:52
On 4/21/06, Vivek Kumar-LN,Gurgaon <kvivek(_at_)hcl(_dot_)in> wrote:
Hi i am struck with this situation

XML is like this
<element1>this is element1 text<newElement1>this is newElement1
text</newElement1>element1 text continue<newElement2>this is newElement2
text</newElement2><newElement3>this is newElement3 text</newElement3>

This isn't a very good example.  Are newElement1, newElement2,
newElement3 supposed to be children of element1 as you've given?  Or
are they supposed to be siblings of element1? Since there's no closing
tag for Element1 it's impossible to tell.


now i want to find that whether newElement1 and newElement2 containing text
of element1 or not same with newElement2 and newElement3.

This makes no sense to me.  Are you trying to check to see if the
"text" of newElement1 is the same as new Element2?  If you're just
checking to see if newElement1 containst the text of element1 your
statement seems odd.  Ie I'd expect you just to say find whether the
text of newElement1 contains element1.

Try to have a well-formed example and the expected output.  It's also
difficult to see how you want to "check".  Do you want a single
operation that returns true if the condition is true for any node in
the nodeset?  Or do you want multiple tests, etc?


Jon Gorman

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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