Validating the html

5 views
Skip to first unread message

johnwards

unread,
Sep 28, 2007, 5:16:48 AM9/28/07
to Web Forms 2.0 Implementation
Hi folks,

Brilliant work Weston by the way.

Now we would like to find out a way of getting the added functionality
of webforms2 past validators.

So I have 2 questions

1) Does a DTD exist for webforms2

2) Can this DTD be added to a xhtml1 (or xhtml1.1) DTD to get it past
a validator (like adding a MathML DTD)

Cheers
John

Weston Ruter

unread,
Sep 28, 2007, 11:35:40 AM9/28/07
to webf...@googlegroups.com
Thanks John... the spec states:

HTML documents that use the new features described in this specification and that are served over HTTP must be sent as text/html and must use the following DOCTYPE: <!DOCTYPE html>.

XML documents using elements from the XHTML namespace that use the new features described in this specification and that are served over HTTP must be sent using an XML MIME type such as application/xml or application/xhtml+xml and must not be served as text/html. [RFC3023]

These XML documents may contain a DOCTYPE if desired, but this is not required.

Documents that use the new features described in this specification cannot be strictly conforming XHTML1.1 or HTML4 documents, since they contain features not defined in those specifications.

So for HTML documents we must use simply "<!DOCTYPE html>". But for XML documents, it would be nice if a DTD could be developed for WF2. The HTML 4.01 DTD could be taken and then modified/extended to support WF2... maybe I'll work on this tomorrow. If I'm successful, I'll include the DTD in the project and make it available for download.

Good idea, John.

Weston

Weston Ruter

unread,
Sep 28, 2007, 11:37:33 AM9/28/07
to webf...@googlegroups.com
...er, I mean take an XHTML 1.0 DTD and modify it to support WF2, just like John said.

Weston Ruter

unread,
Sep 29, 2007, 11:27:42 PM9/29/07
to webf...@googlegroups.com
I think I have successfully adapted the XHTML 1.0 Strict DTD to incorporate Web Forms 2.0. This "XHTML 1.0 Strict + Web Forms 2.0 DTD" is available here: http://webforms2.googlecode.com/svn/trunk/DTD/xhtml1-strict-wf2.dtd

Weston Ruter

unread,
Sep 30, 2007, 1:11:37 AM9/30/07
to webf...@googlegroups.com
And here is the XHTML 1.0 Transitional DTD adapted for Web Forms 2.0: http://webforms2.googlecode.com/svn/trunk/DTD/xhtml1-transitional-wf2.dtd

I would greatly appreciate help verifying that these DTDs are valid, or any suggestions on naming or coding conventions.

Thanks,
Weston

johnwards

unread,
Oct 1, 2007, 3:41:03 AM10/1/07
to Web Forms 2.0 Implementation
Morning Weston,

Thanks for this. Just need to figure out a way of getting these
validated somehow. The company I work for are trying to make sure all
their sites are valid xhtml strict and I have thrown a spanner in the
works by showing them your brilliant tool, which is just perfect for
our latest job.

If anyone can beat me to if validating this please shout and tell me
how!

Cheers
John

johnwards

unread,
Oct 1, 2007, 5:11:19 AM10/1/07
to Web Forms 2.0 Implementation
One of the developers found this:
http://www.alistapart.com/articles/customdtd/

I may set up the validator at lunch time.

johnwards

unread,
Oct 1, 2007, 6:17:14 AM10/1/07
to Web Forms 2.0 Implementation
Right set up the validator in my tea break.

Got the validator working and confirmed that is validating my valid
xhtml.

Then changed the DTD to your one (strict and transitional) but I think
your DTD is broken.

jwards@jwards-desktop:~$ ./validate.sh /home/jwards/svn/technode/trunk/
web/template.htm
[Error] xhtml1-strict-wf2.dtd:380:21: The element type "input" was
already specified in the content model of the element decl "p".
[Error] xhtml1-strict-wf2.dtd:380:21: The element type "select" was
already specified in the content model of the element decl "p".
[Error] xhtml1-strict-wf2.dtd:380:21: The element type "textarea" was
already specified in the content model of the element decl "p".
[Error] xhtml1-strict-wf2.dtd:380:21: The element type "button" was
already specified in the content model of the element decl "p".
[Error] xhtml1-strict-wf2.dtd:380:21: The element type "label" was
already specified in the content model of the element decl "p".
[Error] xhtml1-strict-wf2.dtd:392:23: The element type "input" was
already specified in the content model of the element decl "h1".
[Error] xhtml1-strict-wf2.dtd:392:23: The element type "select" was
already specified in the content model of the element decl "h1".
[Error] xhtml1-strict-wf2.dtd:392:23: The element type "textarea" was
already specified in the content model of the element decl "h1".
[Error] xhtml1-strict-wf2.dtd:392:23: The element type "button" was
already specified in the content model of the element decl "h1".
[Error] xhtml1-strict-wf2.dtd:392:23: The element type "label" was
already specified in the content model of the element decl "h1".
[Error] xhtml1-strict-wf2.dtd:397:22: The element type "input" was
already specified in the content model of the element decl "h2".
[Error] xhtml1-strict-wf2.dtd:397:22: The element type "select" was
already specified in the content model of the element decl "h2".
[Error] xhtml1-strict-wf2.dtd:397:22: The element type "textarea" was
already specified in the content model of the element decl "h2".
[Error] xhtml1-strict-wf2.dtd:397:22: The element type "button" was
already specified in the content model of the element decl "h2".
[Error] xhtml1-strict-wf2.dtd:397:22: The element type "label" was
already specified in the content model of the element decl "h2".
[Error] xhtml1-strict-wf2.dtd:402:22: The element type "input" was
already specified in the content model of the element decl "h3".
[Error] xhtml1-strict-wf2.dtd:402:22: The element type "select" was
already specified in the content model of the element decl "h3".
[Error] xhtml1-strict-wf2.dtd:402:22: The element type "textarea" was
already specified in the content model of the element decl "h3".
[Error] xhtml1-strict-wf2.dtd:402:22: The element type "button" was
already specified in the content model of the element decl "h3".
[Error] xhtml1-strict-wf2.dtd:402:22: The element type "label" was
already specified in the content model of the element decl "h3".
[Error] xhtml1-strict-wf2.dtd:407:22: The element type "input" was
already specified in the content model of the element decl "h4".
[Error] xhtml1-strict-wf2.dtd:407:22: The element type "select" was
already specified in the content model of the element decl "h4".
[Error] xhtml1-strict-wf2.dtd:407:22: The element type "textarea" was
already specified in the content model of the element decl "h4".
[Error] xhtml1-strict-wf2.dtd:407:22: The element type "button" was
already specified in the content model of the element decl "h4".
[Error] xhtml1-strict-wf2.dtd:407:22: The element type "label" was
already specified in the content model of the element decl "h4".
[Error] xhtml1-strict-wf2.dtd:412:22: The element type "input" was
already specified in the content model of the element decl "h5".
[Error] xhtml1-strict-wf2.dtd:412:22: The element type "select" was
already specified in the content model of the element decl "h5".
[Error] xhtml1-strict-wf2.dtd:412:22: The element type "textarea" was
already specified in the content model of the element decl "h5".
[Error] xhtml1-strict-wf2.dtd:412:22: The element type "button" was
already specified in the content model of the element decl "h5".
[Error] xhtml1-strict-wf2.dtd:412:22: The element type "label" was
already specified in the content model of the element decl "h5".
[Error] xhtml1-strict-wf2.dtd:417:22: The element type "input" was
already specified in the content model of the element decl "h6".
[Error] xhtml1-strict-wf2.dtd:417:22: The element type "select" was
already specified in the content model of the element decl "h6".
[Error] xhtml1-strict-wf2.dtd:417:22: The element type "textarea" was
already specified in the content model of the element decl "h6".
[Error] xhtml1-strict-wf2.dtd:417:22: The element type "button" was
already specified in the content model of the element decl "h6".
[Error] xhtml1-strict-wf2.dtd:417:22: The element type "label" was
already specified in the content model of the element decl "h6".
[Error] xhtml1-strict-wf2.dtd:452:22: The element type "input" was
already specified in the content model of the element decl "dt".
[Error] xhtml1-strict-wf2.dtd:452:22: The element type "select" was
already specified in the content model of the element decl "dt".
[Error] xhtml1-strict-wf2.dtd:452:22: The element type "textarea" was
already specified in the content model of the element decl "dt".
[Error] xhtml1-strict-wf2.dtd:452:22: The element type "button" was
already specified in the content model of the element decl "dt".
[Error] xhtml1-strict-wf2.dtd:452:22: The element type "label" was
already specified in the content model of the element decl "dt".
[Error] xhtml1-strict-wf2.dtd:466:27: The element type "input" was
already specified in the content model of the element decl "address".
[Error] xhtml1-strict-wf2.dtd:466:27: The element type "select" was
already specified in the content model of the element decl "address".
[Error] xhtml1-strict-wf2.dtd:466:27: The element type "textarea" was
already specified in the content model of the element decl "address".
[Error] xhtml1-strict-wf2.dtd:466:27: The element type "button" was
already specified in the content model of the element decl "address".
[Error] xhtml1-strict-wf2.dtd:466:27: The element type "label" was
already specified in the content model of the element decl "address".
[Error] xhtml1-strict-wf2.dtd:538:24: The element type "input" was
already specified in the content model of the element decl "span".
[Error] xhtml1-strict-wf2.dtd:538:24: The element type "select" was
already specified in the content model of the element decl "span".
[Error] xhtml1-strict-wf2.dtd:538:24: The element type "textarea" was
already specified in the content model of the element decl "span".
[Error] xhtml1-strict-wf2.dtd:538:24: The element type "button" was
already specified in the content model of the element decl "span".
[Error] xhtml1-strict-wf2.dtd:538:24: The element type "label" was
already specified in the content model of the element decl "span".
[Error] xhtml1-strict-wf2.dtd:543:23: The element type "input" was
already specified in the content model of the element decl "bdo".
[Error] xhtml1-strict-wf2.dtd:543:23: The element type "select" was
already specified in the content model of the element decl "bdo".
[Error] xhtml1-strict-wf2.dtd:543:23: The element type "textarea" was
already specified in the content model of the element decl "bdo".
[Error] xhtml1-strict-wf2.dtd:543:23: The element type "button" was
already specified in the content model of the element decl "bdo".
[Error] xhtml1-strict-wf2.dtd:543:23: The element type "label" was
already specified in the content model of the element decl "bdo".
[Error] xhtml1-strict-wf2.dtd:557:22: The element type "input" was
already specified in the content model of the element decl "em".
[Error] xhtml1-strict-wf2.dtd:557:22: The element type "select" was
already specified in the content model of the element decl "em".
[Error] xhtml1-strict-wf2.dtd:557:22: The element type "textarea" was
already specified in the content model of the element decl "em".
[Error] xhtml1-strict-wf2.dtd:557:22: The element type "button" was
already specified in the content model of the element decl "em".
[Error] xhtml1-strict-wf2.dtd:557:22: The element type "label" was
already specified in the content model of the element decl "em".
[Error] xhtml1-strict-wf2.dtd:560:26: The element type "input" was
already specified in the content model of the element decl "strong".
[Error] xhtml1-strict-wf2.dtd:560:26: The element type "select" was
already specified in the content model of the element decl "strong".
[Error] xhtml1-strict-wf2.dtd:560:26: The element type "textarea" was
already specified in the content model of the element decl "strong".
[Error] xhtml1-strict-wf2.dtd:560:26: The element type "button" was
already specified in the content model of the element decl "strong".
[Error] xhtml1-strict-wf2.dtd:560:26: The element type "label" was
already specified in the content model of the element decl "strong".
[Error] xhtml1-strict-wf2.dtd:563:23: The element type "input" was
already specified in the content model of the element decl "dfn".
[Error] xhtml1-strict-wf2.dtd:563:23: The element type "select" was
already specified in the content model of the element decl "dfn".
[Error] xhtml1-strict-wf2.dtd:563:23: The element type "textarea" was
already specified in the content model of the element decl "dfn".
[Error] xhtml1-strict-wf2.dtd:563:23: The element type "button" was
already specified in the content model of the element decl "dfn".
[Error] xhtml1-strict-wf2.dtd:563:23: The element type "label" was
already specified in the content model of the element decl "dfn".
[Error] xhtml1-strict-wf2.dtd:566:24: The element type "input" was
already specified in the content model of the element decl "code".
[Error] xhtml1-strict-wf2.dtd:566:24: The element type "select" was
already specified in the content model of the element decl "code".
[Error] xhtml1-strict-wf2.dtd:566:24: The element type "textarea" was
already specified in the content model of the element decl "code".
[Error] xhtml1-strict-wf2.dtd:566:24: The element type "button" was
already specified in the content model of the element decl "code".
[Error] xhtml1-strict-wf2.dtd:566:24: The element type "label" was
already specified in the content model of the element decl "code".
[Error] xhtml1-strict-wf2.dtd:569:24: The element type "input" was
already specified in the content model of the element decl "samp".
[Error] xhtml1-strict-wf2.dtd:569:24: The element type "select" was
already specified in the content model of the element decl "samp".
[Error] xhtml1-strict-wf2.dtd:569:24: The element type "textarea" was
already specified in the content model of the element decl "samp".
[Error] xhtml1-strict-wf2.dtd:569:24: The element type "button" was
already specified in the content model of the element decl "samp".
[Error] xhtml1-strict-wf2.dtd:569:24: The element type "label" was
already specified in the content model of the element decl "samp".
[Error] xhtml1-strict-wf2.dtd:572:23: The element type "input" was
already specified in the content model of the element decl "kbd".
[Error] xhtml1-strict-wf2.dtd:572:23: The element type "select" was
already specified in the content model of the element decl "kbd".
[Error] xhtml1-strict-wf2.dtd:572:23: The element type "textarea" was
already specified in the content model of the element decl "kbd".
[Error] xhtml1-strict-wf2.dtd:572:23: The element type "button" was
already specified in the content model of the element decl "kbd".
[Error] xhtml1-strict-wf2.dtd:572:23: The element type "label" was
already specified in the content model of the element decl "kbd".
[Error] xhtml1-strict-wf2.dtd:575:23: The element type "input" was
already specified in the content model of the element decl "var".
[Error] xhtml1-strict-wf2.dtd:575:23: The element type "select" was
already specified in the content model of the element decl "var".
[Error] xhtml1-strict-wf2.dtd:575:23: The element type "textarea" was
already specified in the content model of the element decl "var".
[Error] xhtml1-strict-wf2.dtd:575:23: The element type "button" was
already specified in the content model of the element decl "var".
[Error] xhtml1-strict-wf2.dtd:575:23: The element type "label" was
already specified in the content model of the element decl "var".
[Error] xhtml1-strict-wf2.dtd:578:24: The element type "input" was
already specified in the content model of the element decl "cite".
[Error] xhtml1-strict-wf2.dtd:578:24: The element type "select" was
already specified in the content model of the element decl "cite".
[Error] xhtml1-strict-wf2.dtd:578:24: The element type "textarea" was
already specified in the content model of the element decl "cite".
[Error] xhtml1-strict-wf2.dtd:578:24: The element type "button" was
already specified in the content model of the element decl "cite".
[Error] xhtml1-strict-wf2.dtd:578:24: The element type "label" was
already specified in the content model of the element decl "cite".
[Error] xhtml1-strict-wf2.dtd:581:24: The element type "input" was
already specified in the content model of the element decl "abbr".
[Error] xhtml1-strict-wf2.dtd:581:24: The element type "select" was
already specified in the content model of the element decl "abbr".
[Error] xhtml1-strict-wf2.dtd:581:24: The element type "textarea" was
already specified in the content model of the element decl "abbr".
[Error] xhtml1-strict-wf2.dtd:581:24: The element type "button" was
already specified in the content model of the element decl "abbr".
[Error] xhtml1-strict-wf2.dtd:581:24: The element type "label" was
already specified in the content model of the element decl "abbr".
[Error] xhtml1-strict-wf2.dtd:584:27: The element type "input" was
already specified in the content model of the element decl "acronym".
[Error] xhtml1-strict-wf2.dtd:584:27: The element type "select" was
already specified in the content model of the element decl "acronym".
[Error] xhtml1-strict-wf2.dtd:584:27: The element type "textarea" was
already specified in the content model of the element decl "acronym".
[Error] xhtml1-strict-wf2.dtd:584:27: The element type "button" was
already specified in the content model of the element decl "acronym".
[Error] xhtml1-strict-wf2.dtd:584:27: The element type "label" was
already specified in the content model of the element decl "acronym".
[Error] xhtml1-strict-wf2.dtd:587:21: The element type "input" was
already specified in the content model of the element decl "q".
[Error] xhtml1-strict-wf2.dtd:587:21: The element type "select" was
already specified in the content model of the element decl "q".
[Error] xhtml1-strict-wf2.dtd:587:21: The element type "textarea" was
already specified in the content model of the element decl "q".
[Error] xhtml1-strict-wf2.dtd:587:21: The element type "button" was
already specified in the content model of the element decl "q".
[Error] xhtml1-strict-wf2.dtd:587:21: The element type "label" was
already specified in the content model of the element decl "q".
[Error] xhtml1-strict-wf2.dtd:593:23: The element type "input" was
already specified in the content model of the element decl "sub".
[Error] xhtml1-strict-wf2.dtd:593:23: The element type "select" was
already specified in the content model of the element decl "sub".
[Error] xhtml1-strict-wf2.dtd:593:23: The element type "textarea" was
already specified in the content model of the element decl "sub".
[Error] xhtml1-strict-wf2.dtd:593:23: The element type "button" was
already specified in the content model of the element decl "sub".
[Error] xhtml1-strict-wf2.dtd:593:23: The element type "label" was
already specified in the content model of the element decl "sub".
[Error] xhtml1-strict-wf2.dtd:596:23: The element type "input" was
already specified in the content model of the element decl "sup".
[Error] xhtml1-strict-wf2.dtd:596:23: The element type "select" was
already specified in the content model of the element decl "sup".
[Error] xhtml1-strict-wf2.dtd:596:23: The element type "textarea" was
already specified in the content model of the element decl "sup".
[Error] xhtml1-strict-wf2.dtd:596:23: The element type "button" was
already specified in the content model of the element decl "sup".
[Error] xhtml1-strict-wf2.dtd:596:23: The element type "label" was
already specified in the content model of the element decl "sup".
[Error] xhtml1-strict-wf2.dtd:599:22: The element type "input" was
already specified in the content model of the element decl "tt".
[Error] xhtml1-strict-wf2.dtd:599:22: The element type "select" was
already specified in the content model of the element decl "tt".
[Error] xhtml1-strict-wf2.dtd:599:22: The element type "textarea" was
already specified in the content model of the element decl "tt".
[Error] xhtml1-strict-wf2.dtd:599:22: The element type "button" was
already specified in the content model of the element decl "tt".
[Error] xhtml1-strict-wf2.dtd:599:22: The element type "label" was
already specified in the content model of the element decl "tt".
[Error] xhtml1-strict-wf2.dtd:602:21: The element type "input" was
already specified in the content model of the element decl "i".
[Error] xhtml1-strict-wf2.dtd:602:21: The element type "select" was
already specified in the content model of the element decl "i".
[Error] xhtml1-strict-wf2.dtd:602:21: The element type "textarea" was
already specified in the content model of the element decl "i".
[Error] xhtml1-strict-wf2.dtd:602:21: The element type "button" was
already specified in the content model of the element decl "i".
[Error] xhtml1-strict-wf2.dtd:602:21: The element type "label" was
already specified in the content model of the element decl "i".
[Error] xhtml1-strict-wf2.dtd:605:21: The element type "input" was
already specified in the content model of the element decl "b".
[Error] xhtml1-strict-wf2.dtd:605:21: The element type "select" was
already specified in the content model of the element decl "b".
[Error] xhtml1-strict-wf2.dtd:605:21: The element type "textarea" was
already specified in the content model of the element decl "b".
[Error] xhtml1-strict-wf2.dtd:605:21: The element type "button" was
already specified in the content model of the element decl "b".
[Error] xhtml1-strict-wf2.dtd:605:21: The element type "label" was
already specified in the content model of the element decl "b".
[Error] xhtml1-strict-wf2.dtd:608:23: The element type "input" was
already specified in the content model of the element decl "big".
[Error] xhtml1-strict-wf2.dtd:608:23: The element type "select" was
already specified in the content model of the element decl "big".
[Error] xhtml1-strict-wf2.dtd:608:23: The element type "textarea" was
already specified in the content model of the element decl "big".
[Error] xhtml1-strict-wf2.dtd:608:23: The element type "button" was
already specified in the content model of the element decl "big".
[Error] xhtml1-strict-wf2.dtd:608:23: The element type "label" was
already specified in the content model of the element decl "big".
[Error] xhtml1-strict-wf2.dtd:611:25: The element type "input" was
already specified in the content model of the element decl "small".
[Error] xhtml1-strict-wf2.dtd:611:25: The element type "select" was
already specified in the content model of the element decl "small".
[Error] xhtml1-strict-wf2.dtd:611:25: The element type "textarea" was
already specified in the content model of the element decl "small".
[Error] xhtml1-strict-wf2.dtd:611:25: The element type "button" was
already specified in the content model of the element decl "small".
[Error] xhtml1-strict-wf2.dtd:611:25: The element type "label" was
already specified in the content model of the element decl "small".
[Error] xhtml1-strict-wf2.dtd:881:26: The element type "input" was
already specified in the content model of the element decl "legend".
[Error] xhtml1-strict-wf2.dtd:881:26: The element type "select" was
already specified in the content model of the element decl "legend".
[Error] xhtml1-strict-wf2.dtd:881:26: The element type "textarea" was
already specified in the content model of the element decl "legend".
[Error] xhtml1-strict-wf2.dtd:881:26: The element type "button" was
already specified in the content model of the element decl "legend".
[Error] xhtml1-strict-wf2.dtd:881:26: The element type "label" was
already specified in the content model of the element decl "legend".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h1" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h2" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h3" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h4" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h5" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "h6" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "ul" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "ol" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:890:67: The element type "dl" was
already specified in the content model of the element decl "button".
[Error] xhtml1-strict-wf2.dtd:953:28: The element type "input" was
already specified in the content model of the element decl "caption".
[Error] xhtml1-strict-wf2.dtd:953:28: The element type "select" was
already specified in the content model of the element decl "caption".
[Error] xhtml1-strict-wf2.dtd:953:28: The element type "textarea" was
already specified in the content model of the element decl "caption".
[Error] xhtml1-strict-wf2.dtd:953:28: The element type "button" was
already specified in the content model of the element decl "caption".
[Error] xhtml1-strict-wf2.dtd:953:28: The element type "label" was
already specified in the content model of the element decl "caption".

Weston Ruter

unread,
Oct 1, 2007, 7:13:33 AM10/1/07
to webf...@googlegroups.com
Humm... not sure why that is happening. I uploaded the DTD onto Validome and it validated: http://www.validome.org/grammar/
 
And I developed it in Microsoft Visual Web Developer and it also came up with no errors.
 
I didn't actually use the DTD to validate against a document though.
 
If anyone has any suggestions, I'd appreciate it.
 
Weston
Reply all
Reply to author
Forward
0 new messages