DTD for XML file with HTML entities
Thread poster: xxxkichwa

English to Italian
Apr 26, 2008

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
LESSTHANdata name="ButtonSend" xml:space="preserve"GREATERTHAN
LESSTHANdata name="CancelStateUnsuccessful" xml:space="preserve"GREATERTHAN
LESSTHANvalueGREATERTHANNon è stato possibile cancellare il servizio indicato, si prega di contattare il call center.LESSTHAN/valueGREATERTHAN
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


Direct link Reply with quote

tectranslate ITS GmbH
Local time: 07:40
+ ...
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).


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

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

Direct link Reply with quote

English to Italian
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.

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

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 »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »

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