Subject: Re: [xsl] Exclusions in XPATH From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 21 Nov 2002 11:14:43 -0500 |
XPATH help appreciated !
XML: <A> <B> <C>101</C> <D> <E W="XYZ">0204268270</E> <F> <G>Versicherungsstr. 1</G> <H>Offenburg</H> </F> </E> </D> </B> </A>
XSL: <xsl:template match="A"> <xsl:for-each select="./*[1]//*[not(*)]|./*[1]//@*[not(*)]"> <xsl:value-of select="name()"/> <xsl:if test="position()!=last()">;</xsl:if>
</xsl:for-each> <xsl:apply-templates/> </xsl:template>
This gives me output of: C;E;W;G;H
Question 1: Can I get both attribute-names and element-names more easily in the select or does it have to be like I have it above ?
Question 2: How can I exclude the descendants of element F from the select ? Output would then be C;E;W. I've tried various combinations but either end up with all-or-nothing.
Cheers, Wendell
___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Exclusions in XPATH, David Carlisle | Thread | [xsl] attribute management, bix xslt |
Re: [xsl] How do you select all uni, Jeni Tennison | Date | [xsl] How do can I select distinct , Cams Ismael |
Month |