[Home] [By Thread] [By Date] [Recent Entries]
We can perform such tests with XPath. Please consider this example:
XML file is: <?xml version="1.0" encoding="UTF-8"?> <x> <y> <z/> </y> </x> XSLT stylesheet is: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" /> <xsl:template match="/"> <xsl:apply-templates select="x" /> </xsl:template> <xsl:template match="x"> <xsl:if test=".//z"> x is ancestor of z </xsl:if> </xsl:template> </xsl:stylesheet> If this is a general XPath question, then I think above could be the appropriate answer. If you need to do something specific, please let us know. There could be other explanations. On 9/14/06, Wolfgang Jeltsch <wolfgang@xxxxxxxxxxx> wrote: Hello, -- Regards, Mukul Gandhi http://gandhimukul.tripod.com
|

Cart



