Subject: [xsl] determining if 2 sequences of strings intersect From: Robert Koberg <rob@xxxxxxxxxx> Date: Fri, 26 Jun 2009 14:13:14 -0700 |
<dbo.ROLE USER_ID="19955" ROLE="CAEMP"/> <dbo.ROLE USER_ID="19955" ROLE="INCPL"/> <dbo.ROLE USER_ID="19955" ROLE="MNGR"/> <dbo.ROLE USER_ID="19955" ROLE="NewHire"/> <dbo.ROLE USER_ID="19955" ROLE="NONHIEMP"/> <dbo.ROLE USER_ID="19955" ROLE="VEHALLW"/>
<xsl:with-param name="roles" as="xs:string+" select="for $r in $roles return string($r/@ROLE)" tunnel="yes"/>
<xsl:variable name="restrictions" select="tokenize(@roleRestrictions, ' ')" as="xs:string+"/>
<xsl:function name="f:has-role" as="xs:boolean+"> <xsl:param name="roles" as="xs:string+"/> <xsl:param name="restrictions" as="xs:string+"/> <xsl:sequence select="for $r in $restrictions return if (index-of($roles, $r)) then true() else false()"/> </xsl:function>
thanks, -Rob
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl-url -- passing xsl:va, Hermann Stamm-Wilbra | Thread | Re: [xsl] determining if 2 sequence, David Carlisle |
Re: [xsl] Failing string() test fai, Karl Stubsjoen | Date | Re: [xsl] Failing string() test fai, Karl Stubsjoen |
Month |