[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Selecting other than certain children
Subject: Re: [xsl] Selecting other than certain children From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Wed, 1 Jan 2003 22:24:49 -0800 (PST) |
"Gregory Murphy" <Gregory.Murphy@xxxxxxxxxxx> wrote in message news:Pine.GSO.4.10.10301012146290.12101-100000@xxxxxxx > > Assuming an element 'n' with children elements 'c', and some number of > other, unknown, children elements, the only way that I know to test for the > presence of elements other than 'c' is: > > <xsl:template match="n"> > <xsl:if test="*[name() != 'c']"> > <!-- Do stuff --> > </xsl:if> > </xsl:template> > > This strikes me as somewhat awkward. Is there a more direct test? > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list Depends on how one defines "more direct". For example, is the following more direct? <xsl:template match="n[*[not(self::c)]]"> <!-- Do stuff --> </xsl:template> ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Selecting other than cert, Joerg Pietschmann | Thread | [xsl] wishing all a very happy new , Vasu Chakkera |
RE: [xsl] Selecting other than cert, Conal Tuohy | Date | [xsl] wishing all a very happy new , Vasu Chakkera |
Month |