File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Convert Text File (.txt) into XLIFF. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Convert Text File (.txt) into XLIFF." Watch "Convert Text File (.txt) into XLIFF." New topic
Author

Convert Text File (.txt) into XLIFF.

Rohit More
Greenhorn

Joined: May 06, 2013
Posts: 10

Hello Everyone ,
I want to convert txt file into XLIFF. but I am unable to get its properties which I have applied.
properties Like :
its font , size, font- style

and I am newly entered in XLIFF. so dont know much, If anyone have good conversion document
so kindly requesting you to please provide me documents/ tutorial and sample code too.

Thanking you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41603
    
  55
Just briefly looking at it (XLIFF), it would seems that XLIFF concerns itself with text, not its formatting. (Edit: I stand corrected. Apparently the ctype and font attributes are meant for carrying just this information.)

What, exactly, do you mean by "which I have applied"? What was the input, how was processing done, what was the output, and how did that differ from what you expected it to be?


Ping & DNS - my free Android networking tools app
Rohit More
Greenhorn

Joined: May 06, 2013
Posts: 10

Ulf Dittmer wrote:Just briefly looking at it (XLIFF), it would seems that XLIFF concerns itself with text, not its formatting. (Edit: I stand corrected. Apparently the ctype and font attributes are meant for carrying just this information.)


Exactly, It used to carries its formatting too by using attributes.

Ulf Dittmer wrote: What, exactly, do you mean by "which I have applied"? What was the input, how was processing done, what was the output, and how did that differ from what you expected it to be?


---

I created simple demo.txt file.
and enter some no of sentences and applied font is "Verdana" font style is "Bold" and Font size is 10. I am making its segment looking towards the sentence.
now I am reading that file contents and storing that into <trans-unit> tag. issue is I am unable to get content's properties, like its font type is Verdana or something different likewise.
now how do I get its properties?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41603
    
  55
Raw Text files have no formatting. You need to use an API that can get at the formatting information for whatever document format you have - Apache POI comes to mind for DOC and DOCX files.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Convert Text File (.txt) into XLIFF.