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

Re: Determining if the first child is a para element

Subject: Re: Determining if the first child is a para element
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Nov 2000 17:10:58 -0500
what is para element xslt
At 00/11/08 19:08 -0800, kenb@xxxxxxxxxxx wrote:
I've looked at the FAQ which describes how to determine if a node has a
single child element, but I need to know if the first child of a node is an
element (para, in this case).  The test needs to be done in the parent's
<template> element, prior to an <apply-templates/>.  Is there a
straightforward <if> test I can use for this case?  Thanks!

If you don't care what the name of the element is, how about:

<xsl:if test="generate-id(*)=generate-id(node())">

This function operates on only the first member of the supplied node list.

I hope this helps.

................ Ken

G. Ken Holman                    mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML services, training, libraries, products.
Book: Practical Transformation Using XSLT and XPath ISBN1-894049-05-5
Article:          What is XSLT? http://www.xml.com/pub/2000/08/holman
Next public instructor-led training:        2000-12-03/04,2001-01-27,
-                                 2000-02-21,2000-03-26,2000-04-06/07

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.