Exclude nodes based on attribute template in XSL selection node
Using cruisecontrol for continuous integration I am having some trouble with Weblogic Ant tasks and how they think the server debug information is warnings and not debugs, which is why they are shown in my build report messages. XML exit from cruise is like:
<cruisecontrol>
<build>
<target name="compile-xxx">
<task name="xxx" />
</target>
<target name="xxx.weblogic">
<task name="wldeploy">
<message priority="warn">Message which isn't really a warning"</message>
</task>
</target>
</build>
</cruisecontrol>
In the XSL cruisecontrol template, the current selection for the task list is:
<xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/>
What I would like is something that selects the task list in the same way, but does not include any target nodes that have a name = "* weblogic" attribute, where * is a wildcard. I tried
<xsl:variable name="tasklist" select="/cruisecontrol/build//target[@name!='*weblogic']/task"/>
but that didn't seem to work. I'm not an XSLT expert and just want this to be fixed so I can continue to actually develop the project. Any help is greatly appreciated.
a source to share
In the XSL cruisecontrol template, the current selection for the task list is:
<xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/>
What I would like is something that selects the task list in the same way, but does not contain any target nodes that have a name = "* weblogic" attribute where * is a wildcard
Using
/cruisecontrol/build
//target
[not(substring(@name, string-length(@name)-7)
= 'weblogic'
)
]/task
a source to share