[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

problem matching attribute

Subject: problem matching attribute
From: Ann Marie Rubin <Annmarie.Rubin@xxxxxxx>
Date: Mon, 15 Nov 2004 18:41:49 -0500
security role mapping
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.