xsl-list
[Top] [All Lists]

RE: identifying elements by contents of an attribute

2003-03-28 02:46:26

For different values of the attribute "Type"  (i.e. "Block", 
"Key") differnet templates should be applied. These have to 
access the name and contents of the matched element 
respectively. Can anybody give me a hint on this? Thanks

<xsl:template match="*[(_at_)Type='Block']">
  name: <xsl:value-of select="name()"/>
  content: <xsl:value-of select="."/>
</xsl:template>

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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