Subject: Re: [docbook] DocBook HTML Forms
Noah, You find yourself on the canyon's edge where one aspect of XML technology diverges sharply from another. It's a difficult area to navigate, and you have to be careful you don't fall in. The cusp is the boundary between XML namespaces and DTD support. DTDs are agnostic to XML namespaces, which means if you don't tread carefully your DTDs may not know enough to validate documents that may be valid using other validation technologies. Now for some particulars. "The DocBook HTML Forms Document Type" (your reference ) is "a customization of DocBook XML V4.3". Version 4.3 is a DTD-centric standard, and the main DocBook module is not in a namespace until version 5. You then refer over to the DocBook 5 "Definitive Guide" (your reference ) for an example of using the HTML forms module. You can validate HTML forms within DocBook documents, but currently only with namespace-aware validation technologies, such as Relax NG (the "Norm"ative DocBook 5 definition technology) and W3C XML Schemas. However, you then combine the two examples, and you see an attempt to validate a DocBook 5 document using a DocBook 4.3-based DTD. DocBook 5 is in a namespace of which the DTD is unaware, and so you end up tumbling off the ledge. More specifically, your DTD validator thinks the "xmlns" declaration on the "article" element is just another attribute, and nothing in the DTD allows such an attribute on the "article" element. Yes, it is possible to generate DTDs that do support careful use of namespaces, and we may yet see such a profile of DocBook 5 in the future. I recommend deleting your doctype declaration from the document, validating using Relax NG for the time being, and allowing the DocBook 5 standard and support to mature a bit further. Even the documentation is still under development. Trying to help you climb back up, John L. Clark  http://xml.coverpages.org/namespacesAndDTDsSperbergMQ200105.html >  http://www.docbook.org/tdg5/en/html/html.form.html >  http://www.docbook.org/specs/wd-docbook-htmlforms-1.2CR1.html On Wed, Nov 09, 2005 at 03:38:28AM +0000, Noah Slater wrote: > Hello, > > I am trying to use the DocBook HTML Forms extension to embed a form in > a DocBook document AND have mozilla recognise and process the > <html:foo> tags properly. > > Using the example from the DocBook docs for <html:form>  and the > recommended DTD from  we get the following document: > While this works in Mozilla, this however does not seem to validate: > > noah@behemoth: ~ $ xmlto txt test-article.xml > xmlto: input does not validate (status 3) > test-article.xml:6: element article: validity error : No declaration > for attribute xmlns of element article > test-article.xml:6: element article: validity error : No declaration > for attribute xmlns:html of element article > test-article.xml does not validate > > Where am I going wrong? Do I need to declare the xml namespace of the > HTML elements differently?