xsl-list
[Top] [All Lists]

Re: problem matching attribute

2004-11-16 09:35:22
this works:

<xsl:template
match="read-access/namespace-resource/security-role-mapping[attribute::name='consoleadmins']/user[attribute::name='guestadmin']">
     <xsl:copy> 
     <xsl:attribute name="name">foo</xsl:attribute>
     </xsl:copy>
  </xsl:template> 

I needed to match down to the specific attribute and use xsl:copy to
output the attribute name.

thanks,

Ann Marie


Ann Marie Rubin wrote:

Hi Evan,

I've tried all these combinations, but still don't get "foo" in the output. 
(Yes, I do have the basic identity code at the top of the stylesheet.)

Any idea what could be wrong?

thanks,

Ann Marie


 
<!--<xsl:template 
match="read-access/namespace-resource/security-role-mapping[attribute::NAME='consoleadmins']/user[attribute::NAME='guestadmin']">-->
<!--<xsl:template 
match="read-access/namespace-resource/security-role-mapping/user/@name">-->
<xsl:template 
match="security-role-mapping[(_at_)name='consoleadmins']/user/@name[.='guestadmin']">
     
<!-- <xsl:attribute name="name">foo</xsl:attribute> -->
 
   <xsl:copy>  
       <xsl:attribute name= "{(_at_)name}">foo</xsl:attribute> 
   </xsl:copy>
RE: [xsl] problem matching attribute</xsl:template>  


 




--~------------------------------------------------------------------
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>