DTD for XML file with HTML entities
Thread poster: xxxkichwa
xxxkichwa
English to Italian
Apr 26, 2008

Hello,
I need to create a DTD for a file which contains some XML code with HTML entities in it (see below). I need this DTD to let me translate the text between the tags "value" and "comment", but it should also recognize the HTML tags in it. The problem is that the HTML tags are delimited by the HTML entities &l-t; and &g-t; and not by the symbols < and >. Trados does not interpret those tags as HTML tags but simply displays them as editable text.

If I open the following text with Trados using the DTD I created, the text between the tags "value" and "comment" is translatable but so is the content of the "input" tag and which should be protected. Is there any way to tell Trados to treat &l-t; and &g-t; as < and >, and therefore consider those as HTML tags?

I used LESSTHAN and GREATERTHAN to represent the symbols < and > and I intentionally put a hyphen in the HTML entities.

LESSTHANdata name="ButtonEnter" xml:space="preserve"GREATERTHAN
LESSTHANvalueGREATERTHANEntraLESSTHAN/valueGREATERTHAN
LESSTHANcommentGREATERTHANpulsantiLESSTHAN/commentGREATERTHAN
LESSTHAN/dataGREATERTHAN
LESSTHANdata name="ButtonSend" xml:space="preserve"GREATERTHAN
LESSTHANvalueGREATERTHANInviaLESSTHAN/valueGREATERTHAN
LESSTHAN/dataGREATERTHAN
LESSTHANdata name="CancelStateUnsuccessful" xml:space="preserve"GREATERTHAN
LESSTHANvalueGREATERTHANNon è stato possibile cancellare il servizio indicato, si prega di contattare il call center.LESSTHAN/valueGREATERTHAN
LESSTHAN/dataGREATERTHAN
LESSTHANdata name="HotelNoResults" xml:space="preserve"GREATERTHAN
LESSTHANvalueGREATERTHANNessun hotel disponibile trovato.&l-t;br /&g-t; &l-t;input type="button" value="Indietro" class="pulsante1" id="cerca" onclick="javascript:location.href='ricerca_hotel.aspx?action=back'" /&g-t; LESSTHAN/valueGREATERTHAN
LESSTHAN/dataGREATERTHAN

Thanks.


Direct link Reply with quote
 

tectranslate ITS GmbH
Local time: 20:50
German
+ ...
Ouch Apr 26, 2008

Try replacing all occurrences of &lt; with <htmlxlate and all occurrences of &gt; with dummyattribute="here">. This should encapsulate the HTML stuff in a new element called htmlxlate.

If necessary, generate a new settings file, then translate. After translation, revert the above replacements (the dummyattribute="here" thing is to make sure you don't damage the XML tags inadvertently).

Can't try it right now, so there's no guarantee this'll work. You may have to fiddle around with it a bit in case the HTML elements with attributes act up (they're probably not valid while you have the htmlxlate element in there).

HTH,
Benjamin

P.S.: Whoops, messed up the tags at first. Fixed.

[Edited at 2008-04-26 10:28]


Direct link Reply with quote
 
xxxkichwa
English to Italian
TOPIC STARTER
Thanks Apr 26, 2008

Thanks Benjamin,
I'll try that out later this afternoon. However, I think I see one problem with what you suggest: I assume that the "value" inside the "input" tag will not be translatable as it should be (and as it is using a regular HTML4 DTD setting in trados). I'll try that and see if it does work or not.
Thanks.


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

DTD for XML file with HTML entities

Advanced search







PDF Translation - the Easy Way
TransPDF converts your PDFs to XLIFF ready for professional translation.

TransPDF converts your PDFs to XLIFF ready for professional translation. It also puts your translations back into the PDF to make new PDFs. Quicker and more accurate than hand-editing PDF. Includes free use of Infix PDF Editor with your translated PDFs.

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »



All of ProZ.com
  • All of ProZ.com
  • Term search
  • Jobs