Yep, your right. What I had written would return all children of the
context node whose first following sibling node contained a text node.
This is what I intended on writing:
select="*[not(following-sibling::node()[1]/self::text())]"
Which will select all children of the context node whose first
following-sibling node is not a text node...
Josh
On Fri, 3 Sep 2004 07:32:35 +0300, George Cristian Bina
<george(_at_)sync(_dot_)ro> wrote:
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(_at_)oxygenxml(_dot_)com
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/
----- Original Message -----
From: "Josh Canfield" <joshcanfield(_at_)gmail(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Friday, September 03, 2004 2:11 AM
Subject: Re: [xsl] 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
--+------------------------------------------------------------------
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>
--+--