xsl-list
[Top] [All Lists]

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

2006-04-21 10:27:19
I am having some trouble extracting meaning from your problem description.

To the best of my ability, I think you need a concept something like this

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<xsl:output method="text" />

<xsl:template match="/element1">
   <xsl:apply-templates select="newElement1" />
   <xsl:apply-templates select="newElement2" />
</xsl:template>

<xsl:template match="newElement1">
   <xsl:value-of
select="following-sibling::text()[following-sibling::newElement2]" />
</xsl:template>

<xsl:template match="newElement2">
   <xsl:value-of
select="following-sibling::text()[following-sibling::newElement3]" />
</xsl:template>

</xsl:stylesheet>

Regards,
Mukul

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>

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



please note that there will not be any new line character or any character
that seprate the text of element1

--~------------------------------------------------------------------
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>