Small xml:if problem

I

ina

Good Morning,

My Name is Ina and I have a problem if a test in the xsl file, I am
newbie in XML transformation :)

So this is a piece of my code xml. Contracts nodes I have fund contract
<garage>
<Contracts>
<Car>
<Contracts>
<CtoF_Contract From_Date="" To_Date="">
<CtoF_Contract_Type Type="Administrator"/>
<Company_FID>Company_204736</Company_FID>
</CtoF_Contract>
<CtoF_Contract From_Date="" To_Date="">
<CtoF_Contract_Type Type="Firm"/>
<Company_FID>Company_204785</Company_FID>
</Contracts>
<Car>

<Companies>
<Company_FID>Company_204736</Company_FID>
<Company_Legal_Name From_Date="" To_Date="">
<Company_Name>Company A</Company_Name>
<Legal_Type>Unknown</Legal_Type>
</Company_Legal_Name>
<Legal_Domicile >
<Country>USA</Country>
</Legal_Domicile>
</Company>
<Company_FID>Company_204785</Company_FID>
<Company_Legal_Name From_Date="" To_Date="">
<Company_Name>Company B</Company_Name>
<Legal_Type>Unknown</Legal_Type>
</Company_Legal_Name>
<Legal_Domicile >
<Country>GB</Country>
</Legal_Domicile>
</Company>
</Companies>
</garage>


file.xsl DOESN'T WORK
<Company>
<xsl:if test="Contracts/CtoF_Contract/Company_FID =
.../../Companies/Company/Company_FID">
<xsl:value-of
select="../../Companies/Company/Company_Legal_Name/Company_Name"/>
</xsl:if>
</Company>


I would like to obtain
<garage>
<carName>
<Administrator>company A</Administrator>
<domicile>USA</domicile>
<Firm>company B</Firm>
<domicile>GB</domicile>
</garage>

Any suggestions?

Ina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,002
Messages
2,570,261
Members
46,858
Latest member
FlorrieTuf

Latest Threads

Top