[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Name of current node's parent?
Hi, I am new to the list and XSL. In an XSLT stylesheet I am currently working on, I want to compare the name of the current note's parent with a string using <xsl:if>. Let's say this is a fragment of an XML document: <a> <b></b> <b><c></c></b> <c></c> <a> Instead of using <xsl:template match="b/c"> </xsl:template> I want to use something like <xsl:template match="c"> <xsl:if test="boolean-expression"></xsl:if> </xsl:template> To check and see if the parent of <c> is <b> or not. However, I am not very familiar with XPath expressions and have no idea now to write the boolean expression inside <xsl:if>. Can someone help me? Michael Lee mlee@xxxxxxxxxx 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
|