[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: check parent text present between child nodes

Subject: Re: check parent text present between child nodes
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Fri, 21 Apr 2006 22:56:45 +0530
following sibling text
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@xxxxxx> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.