Automatic DTD verification

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic DTD verification

Damien Cassou-3
Hi,

I wonder if it would be possible for Seaside to verify when it renders
html, that this html is valid XHTML ? For example, 'p' can't contain
block elements (like 'p' itself). Another example comes with attributes,
some are required and it would be interesting that Seaside display a
warning when you forget something.

There are two approaches I think:

- each tag knows what it requires and what it accepts as subtags. When
Seaside close a tag, the tag can verify that all requirement are
fulfilled. This can be difficult to implement and long.
- a DTD parser (or Relax NG or XML Schema) would verify at the end of
the rendering that the xhtml generated is valid. It might be simple to
implement, and can be provided in a separate package.


What do you think ?

--
Damien Cassou
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Automatic DTD verification

Göran Krampe
Hi!

Damien Cassou <[hidden email]> wrote:
> Hi,
>
> I wonder if it would be possible for Seaside to verify when it renders
> html, that this html is valid XHTML ? For example, 'p' can't contain

Any attempts in this direction should look *hard* at Todd Blanchard's
code that he uses at www.badpage.net.
He demoed it at the BOF (is on one of the videos). It is available on
SM:

http://map.squeak.org/accountbyid/6f5fb68f-90c3-4be6-8189-cc6843167e6a/p
ackage/e5f9003d-a8ea-47fc-b9a1-adf04a47aefa


regards, Göran
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside