You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Kevin O'Neill <ke...@jacus.com.au> on 2002/08/09 00:20:01 UTC
Re: [RT] Instead of XHTML 1.0, why don't we implement a subset of
the XHTML 2.0 proposal?
{snip]
> I took a *deep* look into XHTML 1.0 and 1.1 (the modular thing) over the
> past week, and it seemed quite difficult to me to import only portions
> of it inside our existing doc-v11 DTD. I see XHTML2 is being build up
> from the same modular stuff, so either we drop doc-v11 and move to
> XHTML2, or we stick to doc-v11 for legacy purposes.
I recently had to do the same thing. My solution, switch from using DTDs for
specification and validation and instead use
RelaxNG (http://www.oasis-open.org/committees/relax-ng/) James Clark has
created xhtml 1.1 grammars http://thaiopensource.com/relaxng/xhtml/. They are
so easy to combine, for example xhtml basic looks like this:
<grammar ns="http://www.w3.org/1999/xhtml"
xmlns="http://relaxng.org/ns/structure/1.0">
<include href="modules/datatypes.rng"/>
<include href="modules/attribs.rng"/>
<include href="modules/struct.rng"/>
<include href="modules/text.rng"/>
<include href="modules/hypertext.rng"/>
<include href="modules/list.rng"/>
<include href="modules/basic-form.rng"/>
<include href="modules/basic-table.rng"/>
<include href="modules/image.rng"/>
<include href="modules/param.rng"/>
<include href="modules/object.rng"/>
<include href="modules/meta.rng"/>
<include href="modules/link.rng"/>
<include href="modules/base.rng"/>
</grammar>
I've begun to switch more and more of my grammar relaxng it's one of those you use
it once and you never go back (a little like xslt really ;))
-k.
Re: [RT] Instead of XHTML 1.0, why don't we implement a subset of the XHTML 2.0 proposal?
Posted by Jeff Turner <je...@apache.org>.
On Fri, Aug 09, 2002 at 08:20:01AM +1000, Kevin O'Neill wrote:
> {snip]
>
> > I took a *deep* look into XHTML 1.0 and 1.1 (the modular thing) over the
> > past week, and it seemed quite difficult to me to import only portions
> > of it inside our existing doc-v11 DTD. I see XHTML2 is being build up
> > from the same modular stuff, so either we drop doc-v11 and move to
> > XHTML2, or we stick to doc-v11 for legacy purposes.
See http://www.xml.com/pub/r/334:
"The Itsy Bitsy Teeny Weeny Simple Hypertext DTD (IBTWSH) is an XML
Document Type Definition (DTD) which describes a subset of XHTML Basic
for embedded use within other XML DTDs."
Unfortunately the referred site has vanished :( I'll contact the author.
Attached is a Relax NG version, which I've imported into my own schemas
with:
<grammar ...
<include href="ibtwsh6.rng">
<start combine="choice">
<ref name="project"/>
</start>
</include>
<define name="project">
...
</define>
...
</grammar>
How about Forrest adopting RNG as the primary schema format, and then
generating DTDs with James Clark's translator[1] ?
--Jeff
[1] http://www.thaiopensource.com/relaxng/trang.html
> I recently had to do the same thing. My solution, switch from using DTDs for
> specification and validation and instead use
> RelaxNG (http://www.oasis-open.org/committees/relax-ng/) James Clark has
> created xhtml 1.1 grammars http://thaiopensource.com/relaxng/xhtml/. They are
> so easy to combine, for example xhtml basic looks like this:
>
> <grammar ns="http://www.w3.org/1999/xhtml"
> xmlns="http://relaxng.org/ns/structure/1.0">
>
> <include href="modules/datatypes.rng"/>
> <include href="modules/attribs.rng"/>
> <include href="modules/struct.rng"/>
> <include href="modules/text.rng"/>
> <include href="modules/hypertext.rng"/>
> <include href="modules/list.rng"/>
> <include href="modules/basic-form.rng"/>
> <include href="modules/basic-table.rng"/>
> <include href="modules/image.rng"/>
> <include href="modules/param.rng"/>
> <include href="modules/object.rng"/>
> <include href="modules/meta.rng"/>
> <include href="modules/link.rng"/>
>
> <include href="modules/base.rng"/>
>
> </grammar>
>
> I've begun to switch more and more of my grammar relaxng it's one of those you use
> it once and you never go back (a little like xslt really ;))
>
> -k.