Announcement: Typeful [x]html combinators -- pre-release 0
Mattias Bengtsson
moonlite at dtek.chalmers.se
Mon Jan 7 09:57:21 EST 2008
On Wed, 2007-12-19 at 15:06 +0000, Jon Fairbairn wrote:
> "Yitzchak Gale" <gale at sefer.org> writes:
> > What you are doing here is enforcing a DTD using
> > the Haskell type system. Apart from your plans for
> > HTML 4.01, perhaps a better generalization would
> > be to generate typeful combinators that could
> > validate at compile time for any given XML DTD.
>
> I think that would be the job of something like HaXml or
> HXT, and there are plenty of good people working on them.
> To clarify, what these types enforce is something stronger
> than an XML DTD, more like the SGML DTD of html (and as I
> write this I am inclining myself further towards making the
> document tree types fit the common subset); it enforces the
> restrictions that are only expressed in prose in the
> xhtml1.0 standard. You could think of it as enforcing a
> schema (that the w3c didn't provide).
It seems that they did actually[1].
Making a program for generating ADT's and combinators from XML schemas
to provide type safe XML is something i'd very much like to do someday.
One thing i'm uncertain of is whether supporting namespaces would be a
problem or not. It would be a shame to have a bunch of generated
XML-standards in Haskell that can't be used together (ie. embedding
MathML or SVG in XHTML).
Mattias
1: http://www.w3.org/TR/xhtml1-schema/
More information about the Libraries
mailing list