I am building my own humble (x)html parser. All is ok, but some doctype tags break it. Let me show you:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
<!ENTITY D "—">
<!ENTITY o "‘">
<!ENTITY c "’">
<!ENTITY O "“">
<!ENTITY C "”">
]>
As far as I know, no other kind of tag is allowed to be nested in this way (I mean inside the tag name), i.e. incl. xml instructions and commenting tags.
My question is, what can you say about this issue. It looks so much against common sense to me. And of course, it's perfectly valid as far as XML is concerned.
Thanks!