I've got an XSL issue.开发者_如何学Go With the following code I exclude Box1
<xsl:for-each select="//box[@id!='box1']">
But I also want to exclude Box7. Is that possible and how can I do that?
You can AND those predicates together:
<xsl:for-each select="//box[@id!='box1'][@id!='box7']">
Use:
//box[not(@id='box1') and not(@id='box2')]
If you have many ids to exclude, use (in this example I am excluding "box1" - "box4"):
//box[not(contains('|box1|box2|box3|box4|', concat('|', @id, '|'))]
精彩评论