Mobile menu

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: 22:47
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


Translation news related to SDL Trados





TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



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