There are probably better ways to select the proper map layer node but this should work
Code:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <table border='1' width='100%'> <col width="15%" /> <col width="35%" /> <col width="15%" /> <col width="35%" /> <xsl:for-each select ='NewDataSet/FACILITY_INFO'> <tr> <td>Facility Number</td> <td> <xsl:value-of select='FACILITY_NUMBER'/> </td> <td>Layer Name</td> <td> <xsl:call-template name='maplayer'> <xsl:with-param name='layerId'> <xsl:value-of select ='LAYER_ID'/> </xsl:with-param> </xsl:call-template> </td> </tr> <tr> <td>Description</td> <td> <xsl:value-of select='FACILITY_DESC'/> </td> <td>Facility ID</td> <td> <xsl:value-of select ='SDS_ID'/> </td> </tr> </xsl:for-each> </table> </xsl:template> <xsl:template name='maplayer'> <xsl:param name='layerId' /> <xsl:for-each select='//MAP_LAYER'> <xsl:if test='LAYER_ID = $layerId'> <xsl:value-of select ='LAYER_NAME' /> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>




Reply With Quote