Subject: [xsl] problem matching attribute From: Ann Marie Rubin <Annmarie.Rubin@xxxxxxx> Date: Mon, 15 Nov 2004 18:41:49 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Dynamic processing of xml, ALAN DIVORTY | Thread | RE: [xsl] problem matching attribut, Evan Lenz |
Re: [xsl] Dynamic processing of xml, M. David Peterson | Date | RE: [xsl] problem matching attribut, Evan Lenz |
Month |