|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] replacing values in file1 from file2
Hi
I've been stuck on this - I thought it would be simpler than it is. (I'm pretty much only just past beginner level) I have two xml files. One with pairs of terms in source and target language but with an untranslated target language term (say, English and Danish). In another xml file I have the Danish translations, one for each pair of terms, and sequenced in exactly the same way. <file1>
<terms>
<source lang="english">
<term>dog</term>
</source>
<source lang="danish">
<term>dog</term>
</source>
</terms>
<terms>
<source lang="english">
<term>dog</term>
</source>
<source lang="danish">
<term>dog</term>
</source>
</terms>
</file1><file2> <tranlated> <term lang="danish">hund</term> <term lang="danish">bord</term> </translated> </file2> I've tried matching a nodeset in file1 using <.. match="//source[@lang='danish']/term"> seems fine. Then I've tried to copy-of the value from select="document('file2.xml')//term/text()" in various ways. I get the first value only from the list copied, but in all the locations I wanted. How do I pass on the number of the node in the first nodeset to the nodeset selected from the second file. I tried setting up a variable using position() but couldn't get it to work. Sorry this is so long-winded. I simplified the xml. In reality I'm using tmx which is a translation memory format. thanks Ronan _________________________________________________________________ Fe alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








