Re: [xsl] How to test a given node ?

Subject: Re: [xsl] How to test a given node ?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 12 Mar 2001 10:14:00 GMT

> In my XSLT, when I process the Element node, I want to check if the
> ElementType node (which has the same name attribute value as the Element
> name attribute) has a "Group" child.

<xsl:template match="Element">
  <xsl:if test="/Schema/ElementType[@name=current()/@name]/Group">
    yes



If your schema is in the schema namespace you'll need
/x:Schema/x:/ElementType
etc for a suitable declaration of x:

David

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


Current Thread