hello, i had a xml file in this format:
Code:
<?xml version="1.0"?>
<?xml-stylesheet href="K+Report.xsl" type="text/xsl"?> <ReportBody>
<Document Title = "df"> 
<Chapter Tag = "0" Name = "df" Label = "folders" Dimension = "1"> 
<TableDef> 
<ColLabel> 
<D>Code</D> 
</ColLabel> 
</TableDef> 
<Bloc Tag = "1" Level = "1" Label = ""> 
<DataRow Total = "false"> 
<D Code="U1527">BOOKFX_TEA</D> </DataRow> 
<DataRow Total = "false"> 
< D Code="U152">BOOKFX_TEA</D> </DataRow> 
<DataRow Total = "false"> 
<D Code="U155">BOOKSK_TEA</D> </DataRow> 
</Bloc> 
</Chapter> 
</Document> 
</ReportBody>
in my xsl file i had those lines:
Code:
<xsl:variable name="df_folder" select="document('df1.xml')/ReportBody/Document/Chapter/Bloc" />
<xsl:template match="/deal">
<xsl:variable name="user">
<xsl:choose>
<xsl:when test="/deal/@role='MAKER'">
<xsl:value-of select="/deal/maker_id" />
</xsl:when>
<xsl:when test="/deal/@role='TAKER'">
<xsl:value-of select="/deal/taker_id" />
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="result">
<xsl:value-of select="$df_folder/DataRow/D[@Code=$user]" />
</xsl:variable>
that worked fine - if $user was in the file, like U152 then $result would have got the value BOOKFX_TEA from the file and if there was no such user in the file, $result would have been empty.

as of today, my system who write down the xml file do it in a new format, now the file look like this:
Code:
<?xml version="1.0"?>
<?xml-stylesheet href="K+Report.xsl" type="text/xsl"?>
<ReportBody>
    <Document Title = "df">
        <Chapter Tag = "0" Name = "df" Label = "folders" Dimension = "1">
            <TableDef>
                <ColLabel>
                    <D>Code</D> 
		    <D>folder</D>
                </ColLabel>
            </TableDef>
            <Bloc Tag = "1" Level = "1" Label = "">
                <DataRow Total = "false">
                    <D>U15272</D>
		    <D>BOOKFX_TEA</D>
                </DataRow>
<DataRow Total = "false">
                    <D>U1527</D>
        	    <D>BOOKFX_TEA</D>
                </DataRow>
<DataRow Total = "false">
                    <D>U152722</D>
                    <D>BOOKSK_TEA</D>
		</DataRow>
            </Bloc>
        </Chapter>
    </Document>
</ReportBody>
as a result, in my xsl file the $result is always empty and i don't know how to give it the value of <D>folder</D> when the <D>Code</D> is equal to $user.

as you can see from my question i'm not XML\XSL person, it's just something i made few years ago as side work and now that my main system who generate the xml file changed, i have no idea how to change the xsl file as well and will be happy for every little help...

thanks,
Gabriel