but if I put manually
<xsl:variable name="codice" select="SegmentList/Segment/Destination/Code"/>
<xsl:value-of select="/CommandList/CheckRouting/Summary/Destination/AirportList/Airport/Code[.='LGW']/preceding-sibling::Name[1]" />
I get displayed all the informations.
The variable codice is not empty if I print it it is displayed.
Subject:xsl variable problems (simple) Author:Minollo I. Date:22 Aug 2006 01:06 PM
Not sure what behavior you are looking for... we would need more details about how that code is being used in your overall XSLT and what you are trying to do.
Subject:xsl variable problems (simple) Author:Minollo I. Date:22 Aug 2006 02:04 PM
I guess the problem is that each entry can have multiple segments; so, your variable defined as:
<xsl:variable name="codice" select="SegmentList/Segment/Destination/Code"/>
...ends up being a nodeset made of multiple elements. Not sure which segment you need to match, but, for example, if you want to match the first one, you can do:
Subject:xsl variable problems (simple) Author:Minollo I. Date:22 Aug 2006 03:11 PM
If you see nothing out of <xsl:value-of select="//Airport[Code=$codice]/Name"/> (I am assuming you forgot // before Airport?) it means that there is no $codice equivalent in the list of Airport codes/names.
For example, in the small fragment you have posted, you have VIE as airport code that has no equivalent in the summary section, so the value-of above won't return anything.