RE: [xsl] Testing for text before an element

Subject: RE: [xsl] Testing for text before an element
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 17 Jul 2001 10:41:33 -0400
Jarno (and Tim),

At 11:11 PM 7/16/01, you wrote:
>       I'm using a <xsl:if
> test="not(child::*[1][self::para])"><LineBreak/></xsl:if>
> test.  How do I
> modify this expression to evaluate false if text preceeds a
> <para> child?


And for the second test, assuming the text and <para> element are children
of the current node

<xsl:if test="not(text()[following-sibling::para])"><LineBreak/></xsl:if>

Wouldn't it be


to test if text precedes the first para child?

(I think not(text()[following-sibling::para]) will test false if you have any text node child before any para child, not just before the first para.)



XSL-List info and archive:

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

XSL-List info and archive:

Current Thread