Anyone can maybe help me with this problem?
Thanks in advance!
Kind regards, Kim
XSL FILE
XML FILE
RESULT
be.foo.igor.Igortest
be.foo.kim1.TestKim
be.foo.kim2.TestKim
EXPECTED RESULT
be.foo.igor.Igortest
aaaa
be.foo.kim1.TestKim
bbbb
be.foo.kim2.TestKim
cccc
dddd
eeee
Thanks in advance!
Kind regards, Kim
XSL FILE
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] version="1.0">
<xsl:key name="key1" match="advise" use="concat(package/text(),class/text())"/>
<xsl:template match="/">
<html>
<head>
<title>Weave info</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="advise">
<xsl:if test="count(key('key1',concat(package/text(),class/text()))[1]|self::node())=1" xml:space="preserve">
<xsl:value-of select="concat(package/text(),'.',class/text())"/><br />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
XML FILE
Code:
<?xml version="1.0" ?>
<weaveinfo>
<advise>
<type>aaaa</type>
<package>be.foo.igor</package>
<class>Igortest</class>
</advise>
<advise>
<type>bbbb</type>
<package>be.foo.kim1</package>
<class>TestKim</class>
</advise>
<advise>
<type>cccc</type>
<package>be.foo.kim2</package>
<class>TestKim</class>
</advise>
<advise>
<type>dddd</type>
<package>be.foo.kim2</package>
<class>TestKim</class>
</advise>
<advise>
<type>eeee</type>
<package>be.foo.kim2</package>
<class>TestKim</class>
</advise>
<advise>
<type>eeee</type>
<package>be.foo.kim2</package>
<class>TestKim</class>
</advise>
<advise>
<type>eeee</type>
<package>be.foo.kim2</package>
<class>TestKim</class>
</advise>
</weaveinfo>
RESULT
be.foo.igor.Igortest
be.foo.kim1.TestKim
be.foo.kim2.TestKim
EXPECTED RESULT
be.foo.igor.Igortest
aaaa
be.foo.kim1.TestKim
bbbb
be.foo.kim2.TestKim
cccc
dddd
eeee