• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Segments during converting

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone, i try to make some converting manipulations with files such as converting translated simple text file into xml file with using JAXP+SAX. So, i have an xml file like this for example:

<?xml version="1.0" encoding="UTF-8"?><xliff xlmns="urn:oasis:names:tc:xliff:document:1.2">
<file>
<body>
<trans-unit id="1">
<source xml:lang="en">File Conversion. Convert File to XLIFF Format.
Transport Project Files to Orignal Format.</source>
</trans-unit>
<trans-unit id="2">
<source xml:lang="en">Convert File to XLIFF Format.</source>
</trans-unit>



i extract text from source tag this file in text file, then i translate it, and then again convert it text file into a similar xml file. And i must became in this new translated xml file exactly such text content on each source element, for example, this content from source element in trans-unit with id="1", here is 3 sentences

<trans-unit id="1">
<source xml:lang="en">File Conversion. Convert File to XLIFF Format.
Transport Project Files to Orignal Format.</source>
</trans-unit>



would be translated in another language, and it is on text file, and i convert it in xml again, and become this xml file with this 3 sentences again:

<trans-unit id="1">
<target>File Konvertierung. Den File in XLIFF Format konvertieren.
Projektdateien in ursprungsformat transportieren.</target>
</trans-unit>


so could someone please give me any suggestions or advices in wich way schould i go, how can i become exactly that amount of sentences of the text in deutsch in an output xml file during converting it from text file such as in an input english xml file?


Thank you
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
WHat do you need help with? reading from XML file? writing to XML file? converting English to German?
 
S Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need help on making this alignment during converting the text file into xml
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

S Roberts wrote:how can i become exactly that amount of sentences of the text in deutsch in an output xml file during converting it from text file such as in an input english xml file?



Sorry, S Roberts, I don't understand this sentence. It looks to me like your native language is German and you are trying to ask a question in English. Unfortunately your question is a mess. So could I suggest, if you are having trouble expressing yourself in English, that you could ask somebody to help you with that? If you don't ask a question which people can understand, you are going to get nowhere.
 
S Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm very sorry for my english , so i try it again with some picture in attachments, how can I get from C exactly those units of source element wich is in A, when I convert the text from C to D?
Untitled.jpg
[Thumbnail for Untitled.jpg]
Schema
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the output XML file in exactly the same sequence of Elements with the same names, differing only that text in the source element gets translated?

Or are there other differences in structure, element names, etc.?

Bill
 
S Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
otput xm file is in exactly the same sequence of Elements differing the text, but only the source element changes to target element. instead of source cames target.
 
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic