Page 1 of 1

How do I define entities for the author mode ?

Posted: Thu Nov 29, 2007 5:26 am
by amix
I want to represent German umlauts as in HTML (ie: Ä ü etc.). How can I do this ?
When I add the <!ENTITY> element to an XML document after the XML prolog, it gets marked as error. I also do not understand, how exactly I should do this entity declaration, ie, how it looks like. Thanks.

Posted: Thu Nov 29, 2007 11:46 am
by sorin_ristache
Hello,

Just declare them as character entities:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
<!ENTITY Auml '&#196;'>
<!ENTITY uuml '&#252;'>
]>
<root>
The &Auml; and &uuml; characters.
</root>
You can also use the character codes directly:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<root>
The &#196; and &#252; characters.
</root>
Regards,
Sorin

Posted: Fri Nov 30, 2007 12:31 am
by amix
Thanks Sorin. This explains my mistake. I put a & and quotes around the first argument to the entitiy declaration and left out the <!DOCTYPE> element.