Subject: Re: [xsl] XPath: excluding a descendant From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 1 Sep 2003 17:10:07 +0100 |
> <xsl:apply-templates select="abcd:Gathering[not(self::LongitudeDecimal)]"/> this would select all Gathering elements in abcd namespace that are not LongitudeDecimal in no namespace (which is the same as select="abcd:Gathering") I guess you don't want to exclude anything at this point just have <xsl:apply-templates select="abcd:Gathering"/> together with a template <xsl:template match="LongitudeDecimal"/> that does nothing on thse elements. then when you do want to process the elements do (according to taste) <xsl:apply-templates abcd:Gathering/GatheringSite/SiteCoordinates/LongitudeDecimal" mode="somemode"/> together with some templates in somemode to do whatever needs doing or if you don't want a new mode do <xsl:apply-templates abcd:Gathering/GatheringSite/SiteCoordinates/LongitudeDecimal/node()" /> so you process the children of LongitudeDecimal. this assumes Gathering is in a namespace and the other elements are not, it's hard to tell from your post. If everything is in a namespace prefix all element names in all Xpaths with abcd: David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XPath: excluding a descendant, Hahn, Andrea | Thread | RE: [xsl] XPath: excluding a descen, Michael Kay |
Re: [xsl] making <p>s or <br> in ht, David Carlisle | Date | [xsl] making <p>s or <br> in html f, Brook Ellingwood |
Month |