- From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
- Date: Mon, 18 May 2009 11:28:55 +0200
AFAIK, WebKit is not going to validate XML, they say it makes page load too slow. Besides, entities introduce a security risk because it can contain incomplete syntax fragments and they can open a path to XML injection into, say, <![DANGER[<span title="&malicious-entity;" >sweet kittens</span >]]>. So XML processors often refuse to load cross-domain DTD or ENTITIES. There are several XHTML entities that are indispensable for authors, namely those that disambiguate characters are invisible or are indistinguishable from others in a monospaced typeface. These include spacing, dashes, quotes and maybe text direction (deprecated). Converting them to their corresponding characters deteriorates the editing experience in an ordinary text editor. As far as codes for letters are concerned, text in a non-Latin script would consist mainly of entities, which would make it extremely hard to read, so this approach is not practical. An editor limited to the ASCII character set would be better off using a transliteration scheme and a converter. However, as some of the entities are indispensable, a DOCTYPE is required. The browsers may support built-in entities but XML processors used to process XHTML documents need not. Providing a set of the entities needed in-line is easy; however, the problem is that some validating processors like MSXML require that the DTD, if provided, should fully describe the document; providing entities only is not supported by default and the processor refuses to load the document. That means a DOCTYPE for XHTML is necessary and should be provided by WHATWG (or by an independent party). This DTD should be external in order to use parameter entities and, of course, to make the document smaller. It cannot, of course, define all nuances of XHTML, but an upper approximation would be sufficient. The problem, of course, is maintenance, since XHTML is in flux. XHTML is currently described formally by a RELAX NG grammar and maintaining a separate DTD would double the work to do so it would be best to be able to generate the DTD automatically. However, the converter I was advised to use was unable to produce a DTD from the grammar because it is too complex for the DTD formalism (of course). Best regards, Chris Aside: Note that you cannot use DocBook with MSIE directly; a bug in the default XSLT processor causes an error in initialization code. This kills all transformations, whatever your document is. (I do not know about TEI.)
Received on Monday, 18 May 2009 02:28:55 UTC