I want to display the value of name by using the static attribute. In other words, I want the value of static to be the element that is displayed. Is it possible?

Shamith Hamid

Assume that you have the follwoing XML:

<?xml version="1.0" encoding="UTF-8"?>
	<att1 static="name"/>
then the following XSL will produce the required output:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
	<xsl:value-of select="xml/*[name() = /xml/att1/@static]" />

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact