Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting a value from multi-valued attributes

Status
Not open for further replies.

Chewie71

MIS
Sep 4, 2001
89
US
I'm using the DirXML LDAP driver provided by Novell and using XSLT style sheets would like to perform an operation on some LDAP attributes.

I've got an LDAP attribute that holds several values. Basically I'd like to test that a certain value exists in the attribute then either take and put that single value in another attribute, or possibly perform some operation such as...

If value A exists in attribute1 do X
else if value B exists in attribute1 do Y

How can I do this in XML/XSLT?

Thanks,
Matt
 
well i know nothing of novell or ldap but this is the general xslt to do this sort of attribute operation:

..

<xsl:choose>
<xsl:when test=&quot;@attribute1 = 'A'&quot;>
... do x ...
</xsl:when>
<xsl:when test=&quot;@attribute1 = 'B'&quot;>
... do y ...
</xsl:when>

</xsl:choose>

..


hope this helps


matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top