Hussein Shafie, Mon, 21 Jan 2013 09:27:35 +0100: > On 01/21/2013 04:38 AM, Leif Halvard Silli wrote:
>> When I created a file with that template, I got the following: >> >> <!DOCTYPE html> >> <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:svg="http://www.w3.org/2000/svg" >> xmlns:ns2="http://www.w3.org/1999/xlink" >> xmlns:ns="http://www.w3.org/1999/xhtml" >> xmlns:mml="http://www.w3.org/1998/Math/MathML"> >> <head> >> <meta charset="UTF-8" /> >> <title>Bla bla bla!</title> >> </head> >> <body><p>Blob blog blog!</p></body> >> </html> >> >> The namespace prefix declarations are of course invalid > > Why that? Namespace prefix declarations are always OK in XML. They > can pose problems only when they are not declared in the DTD. However > for (X)HTML5, there is no such DTD. Regarding those namespace declarations: * Except for xmlns="http://www.w3.org/1999/xhtml", they are non-conforming (but over all harmless) in text/html HTML5. Typically, when HTML files are non-conforming, we say that they are invalid. This is perhaps a heritage from HTML4, since HTML4 did have DTDs. HTML5 itself speaks about 'conformance'. * These 'invalidities' a well-formed in XHTML5. But as you say, since there is no DTD, one cannot claim that the file is non-valid per XML’s rules for what 'valid' means. * However, since my subject is XHTML5 that is simultaneously _conforming_ as HTML5 - polyglot markup, it seems relevant to use HTML terminology, despite that we talk about an XHTML5 file. >> - so I hope you >> fix it. But those xmlns errors are anyhow far less serious than the >> lack of DOCTYPE. > > This is embarrassing. We were completely wrong. We were persuaded > that <!DOCTYPE html> was not well-formed XML. We were so sure about > it that we didn't actually test files similar to what's above! (or > more simply re-read the XML spec in that respect: > http://www.w3.org/TR/xml/#NT-doctypedecl ) > > Starting from next release, we'll add <!DOCTYPE html> to our (X)HTML5 > templates. Many thanks for taking the time to report this problem. +1 Good to hear. It seems like the Polyglot Markup spec is quite useful as a source for pointing out this, perhaps not obvious, thing. :-) You should pay attention to that spec! PS: In the first editions of HTML5, the official DOCTYPE looked like so: <!doctype html> And that variant *is not* well-formed. For a DOCTYPE to be well-formed, the word 'DOCTYPE' *has* to be in UPPERCASE, like so: <!DOCTYPE html> XML also says that the 'root word' - 'html', in a *validating* XML parser, has to be in *lowercase*. But when there is no DTD then validating XML parsers is no issue, and so you can even do <!DOCTYPE hTmL> if you want. (And in fact, in the template I created for XMLmind, I did in fact use the doctype in UPPERCASE, like so <!DOCTYPE HTML>, just to verify that it didn't matter. >>> PS: This open source software *may* interest you: >>> --- >>> XHTML 5 resources comprising a robust, self-contained, W3C XML Schema >>> for XHTML 5 and highly parameterizable, easy to customize, XSLT 2 >>> stylesheets allowing to transform XHTML 1.0, 1.1, 5.0 to XSL-FO. >>> --- >>> http://www.xmlmind.com/xhtml5_resources.shtml >> >> I see that the page says: "These XHTML 5 resources are software >> components used to add XHTML support to XMLmind XML Editor." So does >> that mean that that package is already inside XMLMind? Or can that >> package do more than XMLMind can? > > These components are already in XMLmind XML Editor. We have extracted > them from our product and packaged them to make them open source. > (Just to be nice guys, as our open source software: > > http://www.xmlmind.com/opensource.html > > has no positive impact whatsoever on our web reputation or on our > page ranks.) :-) >> Does it produce polyglot markup, perhaps? > > No. It's just an W3C XML Schema and some XSL stylesheets. The > documentation is found here: > > http://www.xmlmind.com/_xhtml5_resources/xhtml5_resources.README.html Thanks. -- leif halvard silli -- XMLmind XML Editor Support List xmleditor-support@xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support