|
Subject: Re: Determining if the first child is a para element From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 09 Nov 2000 14:41:50 +0000 |
So, to test whether the first child node of the current node is an element, use:
<xsl:if test="child::node()[1][self::*]"> ... </xsl:if>
<CHAPTER> <para>Here's my first child element, a para.</para> ... </CHAPTER>
<xsl:if test="child::node()[not(.=normalize-space(.))][1][self::para]"> ... </xsl:if>
Regards, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx 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 ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Determining if the first child , Jeni Tennison | Thread | Re: Determining if the first child , Wendell Piez |
| Re: topological sort, Peter B. West | Date | RE: Good example of xml to xsl styl, Xu, Xiaocun |
| Month |