cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simeon Walker <>
Subject RoleFilterTransformer - is it broken or is it me?
Date Fri, 04 Jun 2004 15:54:27 GMT

Whilst look for something to access request.isUserInRole I found the 
RoleFilterTransformer. It does not seem to be mentioned anywhere other 
than the Cocoon java api docs.

I have setup the transform acting on the output of SQL Transformer which 
produces a list of all possible role in our system. Here's a bit of the 

<map:match pattern="roles.xml">
  <map:generate src="cocoon://database/auth/ldap-roles.xml"/>
  <map:transform src="roles.xsl"/>
  <map:transform type="role-filter">
    <map:parameter name="element-name" value="dummy"/>
    <map:parameter name="count" value="100"/>
  <map:serialize type="xml"/>

The roles.xsl filter does the following to an SQL Tranformer rowset:

<xsl:template match="sql:rowset">
    <xsl:for-each select="sql:row">
      <row roles:read-only="{sql:role_name}">
        <entry><xsl:value-of select="sql:role_name"/></entry>

But this gives and odd result. The rows for the rows I possess have an 
attribute roles:read-only="" and rows for the roles I don't possess are 
passed through untouched! Surely this is not what's meant to happen?

If I try to use roles:restricted in the xsl above then I get a

Does anyone use this transformer? How did you get it to work?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message