Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Querying an Active Directory memberOf Attribute

From: "Cailo ." <frenzal68@----------->
To:
Date: 8/1/2006 6:49:00 AM
Hi all,



I am new to this and I am pulling my hair out. I am working on a product 
called RightFax which has the ability to sync users in from Active Directory 
using XSL. I am trying to query the Active Directory memberOf attribute and 
depending on whether the user is in a particular group, put them in the 
respective group within RightFax. My problem is that because memberOf is an 
array within AD, the query is only searching the first 'string' of the array 
and hence not returning correct results. What I would like to do is to 
either query the entire array or join each string within the array to create 
one long string, then query the string. Please see below my script:



<xsl:template match="rf:attr[@name='memberOf']">
 <attr name="GroupID">
   <value>
     <xsl:variable name="group" select="*" />
     <xsl:choose>
       <xsl:when test="contains($group,'Group_1')">100663298</xsl:when>
       <xsl:when test="contains($group,'Group_2')">100663299</xsl:when>
       <xsl:otherwise><xsl:value-of select="100663296" /></xsl:otherwise>
     </xsl:choose>
   </value>
 </attr>
</xsl:template>


I have done this previously with javascript and it worked fine however I am 
unable to get this to work. Please see below the javascript:



Dim strGroups
If IsArray(varProp) Then
   strGroups = (Join(varProp))
      If (InStr(strGroups, "CN=Group_1") > 0 ) Then
            objUser.IsUnprotected = 0
            objUser.GroupID="Orlando"
      End If
End If


Any help would be greatly appreciated.



Thanks in advance



Cails


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent