This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Testing for text before an element
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] Testing for text before an element
- From: Wendell Piez <wapiez at mulberrytech dot com>
- Date: Tue, 17 Jul 2001 10:41:33 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
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
test="not(para[1][preceding-sibling::text()])"
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.)
Cheers,
Wendell
>Jarno
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
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: http://www.mulberrytech.com/xsl/xsl-list