[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: determining whether an XPATH points to an element
> <xsl:template match="//tagname1[fads and @fads]/tagname2"> > <xsl:choose> > <xsl:when test=" self::*"><!-- if it points to element --> > <TagOperation> > </xsl:when> > <xsl:otherwise><!-- if it points to attribute--> > <AttributeOperation> > </xsl:otherwise> > </xsl:choose> > </xsl:template> With this template only elements with name "tagname2" (and tagname1 as parent, which ...) will be processed. So you don't need to test on element or attribute. Regards, Joerg XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|