Hello, first post here so take it easy :)

I have been searching with no luck on finding a solution - hopefully you can help!

I need to reference a xml file and get the value of an element. In my initial xml post, I will send along an ip address, this ip address will be set as a variable in my xsl transform. I need to use that variable to be used to reference the element on the xml document.

sample xml (IP to Alias lookup):

	<ip id="">
	<ip id="">
	<ip id="">

xsl transform

<!--this is the variable set from my xml post -->
<xsl:variable name="server1ip" select="/config/server1ip"/>  
<!-- this is the variable that references the servers.xml doc -->
<xsl:variable name="server1ipLU" select="document('servers.xml')"/>
<!--this is the select I am having issues with - I need it to return the server value value -->
<xsl:value-of select="$server1ipLU/servers[@ip=$server1ip]/server"/>

Let me know if you need more information, I appreciate the help!



ip is a node, NOT an attribute.

for testing purposes try: select="document('servers.xml')/servers/ip[@id='']"