This directory contains an implementataion in RELAX NG of the modularization of XHTML specified by the Modularization of XHTML Recommendation.
The RELAX NG patterns have not been mechanically derived from the DTDs. Rather, they have been hand-crafted so as to produce good quality RELAX NG patterns. However, they may well contain bugs.
The modules directory contains
all the modules; xhtml-basic.rng uses the
modules to implement XHTML
Basic; xhtml-strict.rng uses the
modules to implement XHTML
1.0 strict; xhtml.rng uses
the modules to implement the union of XHTML 1.0 transitional and XHTML 1.0 frameset. You can
download everything as a zip file. To
create a custom version of XHTML, simply copy xhtml.rng
and delete the inclusions of the modules that you do not want.
The biggest difference between the RELAX NG implementation and the DTD implementation is that the RELAX NG implementation does not require you to create a model module specific to the combination of XHTML modules you are using. Instead, simply include the modules you want. The modules take care of redefining the content models appropriately.
Note also the following differences:
frameset element does not
restrict the optional noframes element to follow all the
other child elements. XHTML Modularization is inconsistent with both
HTML 4.0 and XHTML 1.0 here.table
element does not have a width attribute. The XHTML Rec is
ambiguous here: the abstract module has the attribute, but the DTD
does not.params precede other content.