Lookup table inside xslt

N0tICe

New Member
I have 2 xml files like thatThe lookup table, its from url http://www.and.com/lookup/administrative_division\[code\]<lookup table="administrative_division"> <entry> <code>01</code> <name>ACT</name></entry><entry> <code>02</code> <name>NSW</name></entry><entry> <code>03</code> <name>NT</name></entry>\[/code\]The main xml that will link to the lookup table to find out the name of the code\[code\]<features> <feature> <administrative_division>01</administrative_division> </feature> <feature> <administrative_division>02</administrative_division> </feature> <feature> <administrative_division>03</administrative_division> </feature></features>\[/code\]This is my effort:\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:variable name="administrative" select="document('http://www.and.com/lookup/administrative_division')/lookup/entry" /><xsl:template match="/"><table border="1"> <tbody> <xsl:for-each select="features/feature"> <tr> <td> <xsl:value-of select="$administrative
Code:
/name" />                        </td>                           </tr>                </xsl:for-each>            </tbody>        </table></xsl:template></xsl:stylesheet>\[/code\]The idea is parsing the feature xml via jsp then passing it into xsl, from xsl will load the lookup xml to compare with the code after that display the actual name instead of code. My prolbme is the page is blank when i run. So could anyone point me to the correct way, Im very beginner with xls. Thanks
 
Back
Top