Exclude notes based on attribute wildcard in XSL node selection

Posted by C A on Stack Overflow See other posts from Stack Overflow or by C A
Published on 2010-05-08T17:04:38Z Indexed on 2010/05/08 17:08 UTC
Read the original article Hit count: 150

Filed under:
|
|

Using cruisecontrol for continuous integration, I have some annoyances with Weblogic Ant tasks and how they think that server debug information are warnings rather than debug, so are shown in my build report emails. The XML output from cruise is similar to:

<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 cruisecontrol XSL template the current selection for the task list is:

<xsl:variable name="tasklist" select="/cruisecontrol/build//target/task"/>

What I would like is something which selects the tasklist in the same way, but doesn't include any target nodes which have the attribute name="*weblogic" where * is a wildcard. I have tried

<xsl:variable name="tasklist" select="/cruisecontrol/build//target[@name!='*weblogic']/task"/>

but this doesn't seem to have worked. I'm not an expert with XSLT, and just want to get this fixed so I can carry on the real development of the project. Any help is much appreciated.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt