O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modifying XHTML Content Models

In the examples so far, I've just added entirely new elements and attributes to XHTML, without making any effort to incorporate them into existing XHTML content models. But what if you wanted to change XHTML so that, for example, you add a new element named <description> to the <object> element? To do that, you can start by creating this new element, but you'll also need to modify the content model of the <object> element to include the <description> element.

The way you change an existing element's content model differs in XHTML 1.0 and XHTML 1.1, and I'll take a look at both ways in overview here.

Modifying XHTML 1.0 Content Models

Here's the content model for the <object> element in the XHTML 1.0 Transitional ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required