xtofl
xtofl

Reputation: 41509

XML allows for external entities; what about XHTML?

This question about web page 'inclusion' triggered my curiosity. The XML allows you to specify a reference to an 'external' portion. Can you do the same in XHTML, then?

XML example:

<!ENTITY foo SYSTEM "http://www.mydomain.com/logo.gif" NDATA GIF87A>
...
<SOMETHING>&foo;</SOMETHING>

Upvotes: 0

Views: 317

Answers (2)

Ali Habibzadeh
Ali Habibzadeh

Reputation: 11558

XHTML is a defined set of tags which are semantically defined to deliver meaningful content to other platforms who wish to read it. However you can extend this and create your own tags but it will not be HTML anymore and therefore unrecognizable by search engines etc

for providing support for your custom tags you need to have 'application/xhtml+xml' as the mime type.

as what you want to do is to combine xml and html

Upvotes: 1

Quentin
Quentin

Reputation: 943240

Yes but…

  • It ceases to be XHTML and becomes XHTML with stuff
  • It won't work with a text/html mime type (goodbye IE) or in any browser which doesn't do DTD processing (probably goodbye to most other browsers).

Upvotes: 1

Related Questions