xsl-list
[Top] [All Lists]

problem matching attribute

2004-11-15 16:41:49
Hello List,

If I have xml such as the this:

        <namespace-access>
                <read-access>
                        <namespace-resource root="">
                                <security-role-mapping name="consoleadmins" >
                                   <user name="iasadmin"/>
                                   <user name="guestadmin"/>
                                   <group name="admins" />
                                   <group name= "special" />
                              </security-role-mapping>
                        </namespace-resource>
                </read-access>
                <write-access>
                        <namespace-resource root="">
                                <security-role-mapping>
                                        <group name="jazn.com/administrators"/>
                                </security-role-mapping>
                        </namespace-resource>
                </write-access>
        </namespace-access>

I want to update 'name="guestadmin"' to 'name="foo"'
undre the "consoleadmins" role?

I tried this:

<xsl:template match="read-access/namespace-resource/security-role-mapping/user">
 <xsl:attribute name="{name()}">
 <xsl:value-of select="'foo'"/>
 </xsl:attribute>


but got this result:

read-access>
                        <namespace-resource root="">
                                <security-role-mapping name="">
                                   
                                   
                                   <group name=""/>
                                   <group name=""/>
                              </security-role-mapping>
                        </namespace-resource>
                </read-access>

I seem to be matching the wrong node and replacing it with blank lines.

Ann Marie




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>