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

Re: Check for text between two elements??

Subject: Re: Check for text between two elements??
From: "George Cristian Bina" <george@xxxxxxx>
Date: Fri, 3 Sep 2004 07:32:35 +0300
result document no text
Hi Josh,

I guess that

>   <no-text><xsl:copy-of
> select="*[following-sibling::node()[1]/text()]"/></no-text>


should be:

<no-text><xsl:copy-of
select="*[following-sibling::node()[1][self::text()]]"/>

Best Regards,
George
-------------------------------------------------------
George Cristian Bina mailto:george@xxxxxxxxxxxxx
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/


----- Original Message -----
From: "Josh Canfield" <joshcanfield@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, September 03, 2004 2:11 AM
Subject: Re:  Check for text between two elements??


> You aren't testing if there is text between two tags, but rather
> whether a text node is the first node following an element node.
>
> In your case, if you want to output all of the nodes with no following
> text node:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <xsl:stylesheet
>     version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="xml" indent="yes"/>
>
> <xsl:template match="/AAA">
>   <no-text><xsl:copy-of
> select="*[following-sibling::node()[1]/text()]"/></no-text>
> </xsl:template>
>
> </xsl:stylesheet>
>
> The select statement says:
> select every child element of the context node (AAA) that has a text
> node as it's first following sibling.
>
> Josh

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.