Re: XPath help
try [not(a) or not(b)] u may have to explicitly say test the name() of the current element. cheers, jim fuller ----- Original Message ----- From: "William Bagby" <williamb@xxxxxxxxx> To: "XSL Mailing List (E-mail)" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, September 07, 2001 2:35 PM Subject: XPath help > What XPath do I use to specify "elements which are neither <a> nor <b>"? > Here's an example: > > <top> > <a>1</a> > <a>2</a> > <a>3</a> > <b>1</b> > <b>2</b> > <c>1</c> > <c>2</c> > <c>3</c> > <c>4</c> > <c>5</c> > <d>1</d> > <d>2</d> > </top> > > I would like to iterate over all but the <a> and <b> elements, in this case, > <c> and <d> elements. > > Something like this is what I had in mind: > > <xsl:template match="top"> > <xsl:for-each select="*[not(a|b)]"> > <!-- do something --> > </xsl:for-each> > </xsl:template> > > But it does not seem to work. I can't find the syntax for this, but it can't > be that hard. Suggestions? > > > William Bagby. > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > 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