wrote:
> Hi All, this is fairly simple, but I am a noob. Take a look at this:
>
> <entry dn="CN=JB01,OU=Domain Controllers,DC=www,DC=site,DC=org">
> <objectclass>
> <oc-value>top</oc-value>
> <oc-value>person</oc-value>
> <oc-value>organizationalPerson</oc-value>
> <oc-value>user</oc-value>
> <oc-value>computer</oc-value>
> </objectclass>
> <entry dn="CN=Joe Black,OU=Managed
> Users,OU=GROUPER,DC=www,DC=site,DC=org">
> <objectclass>
> <oc-value>top</oc-value>
> <oc-value>person</oc-value>
> <oc-value>organizationalPerson</oc-value>
> <oc-value>user</oc-value>
> </objectclass>
>
> I am trying to retrieve the attribute dn by checking the different
> objectclass/oc-value, but I only want to select it if it is only a
> user, not a user and a computer. Any ideas?
>
> Thanks
> woody
>
<xsl:template
match="entry[objectclass/oc-value[.='user']][objectclass/oc-value[not(.='computer')]]/@dn"/>
<xsl:value-of select="."/>
</xsl:match>
To make it more obvious, it is
match="entry[][]/@dn"
with these two conditions
1. [objectclass/oc-value[.='user']
2. [objectclass/oc-value[not(.='computer')]]
HTH
Volkm@r