- From: Robert Leif <rleif@rleif.com>
- Date: Mon, 24 Oct 2011 12:42:47 -0700
- To: "'Benjamin Hawkes-Lewis'" <bhawkeslewis@googlemail.com>
- Cc: "'Edward O'Connor'" <eoconnor@apple.com>, <public-html-xml@w3.org>
- Message-ID: <04f701cc9285$1bf3a600$53daf200$@rleif.com>
Benjamin Hawkes-Lewis et al. Hawkes-Lewis: "I'm not sure why this thread is so wary of linking to the actual specs." Leif: I am neither a language lawyer nor expert. I am trying to do something that I believe to be worthwhile and to be of significant general interest to partake in this discussion. I want to use HTML5 or some variant thereof by including XML elements that can, if at all possible, be validated by an XSD schema. This use is necessary for forms and similar entities. I believe that software, which is used for medical devices should include type checking and promote reuse. For instance, much of the informatics required for the Obama health care legislation is in the form of XML schema written in XSD (XML Schema Definition Language). One other use is that HTML5 appears to have sufficient functionality that it could be used to create formal documents, such as medical structured reports and scientific papers. I would further venture that I believe, perhaps naively, office type applications with a truly portable file format could be created in HTML5. Hawkes-Lewis: " A DOCTYPE is a required preamble. Note: DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different rendering mode that is incompatible with some specifications. Including the DOCTYPE in a document ensures that the browser makes a best-effort attempt at following the relevant specifications." Leif wrote: > In short, we need to state that the only purpose of the DOCTYPE declaration is to communicate to the browser the format of the document." From the point of view of someone trying to create an HTML5 web page, my remark is sufficient. I will admit that yours is appropriate for a scientific or similar publication on software. Given that <!DOCTYPE html> is what XMLSpy 2012 Professional Edition produces for a new HTML5 and HTML5 differences from HTML4, W3C Working Draft 25 May 2011, 2.2. The DOCTYPE indicate that “The DOCTYPE declaration is <!DOCTYPE html>”, I used <!DOCTYPE html> and <html xmlns="http://www.w3.org/1999/xhtml"> However, I found in HTML5 differences from HTML4, W3C Working Draft 25 May 2011, 2. Syntax http://www.w3.org/TR/html5-diff/ “The other syntax that can be used for HTML5 is XML. This syntax is compatible with XHTML1 documents and implementations. Documents using this syntax need to be served with an XML media type and elements need to be put in the http://www.w3.org/1999/xhtml namespace following the rules set forth by the XML specifications. [XML] “ ------------------------------------------------------------------------------------------------------------------------------- Below is an example document that conforms to the XML syntax of HTML5. Note that XML documents must be served with an XML media type such as application/xhtml+xml or application/xml. <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Example document</title> </head> <body> <p>Example paragraph</p> </body> </html> I tested the following page with XMLSpy and although it is well formed, it does not validate. <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <!--xmlns:string_bd="string_bd16.xsd" as the input datatype does not validate--> <head> <title>XHTML5_Form_Minimal</title> <meta content="application/xhtml+xml" http-equiv="content-type"/> <link href="form.css" rel="stylesheet" type="text/css"/> </head> <body> <form action="string_bd16.xml" enctype="application/x-www-form-urlencoded" method="post"> <div class="entry"> <p> <label for="form-1">Name</label> <input id="form-1" name="string_bd16" type="text"/> </p> </div> <!-- entry end --> <div class="button"> <button type="submit">Send</button> </div> </form> <section class="block" > <p>This is a test.</p> </section> </body> </html> The presence of <section> resulted in: File D:\XHTML&HTML5\Forms\Not_Validated.html is not valid. Content model of element 'body' disallows element 'section'. Error location: html / body / section Details VC: Element Valid: Content model of element 'body' disallows element 'section'. -------------------------------------------------------------------------------------------------------------------------- I believe that my real problem, as stated in Polyglot Markup: HTML-Compatible XHTML Documents, W3C Editor's Draft 18 August 2011 5.1 Element-Level Namespaces (http://dev.w3.org/html5/html-xhtml-author-guide/#example-document) is “Polyglot markup does not declare any other default or prefixed element namespace, because [HTML5] does not natively support the declaring of any other default or prefixed element namespace.” I looked at HTML5, 1.6 HTML vs. XHTML, which is non-normative (http://www.w3.org/TR/html5/introduction.html#html-vs-xhtml) “The second concrete syntax is the XHTML syntax, which is an application of XML. When a document is transmitted with an XML MIME type, such as application/xhtml+xml, then it is treated as an XML document by Web browsers, to be parsed by an XML processor. Authors are reminded that the processing for XML and HTML differs; in particular, even minor syntax errors will prevent a document labeled as XML from being rendered fully, whereas they would be ignored in the HTML syntax. This specification defines version 5 of the XHTML syntax, known as "XHTML5".” I could neither find polyglot nor xmlns is this document. My question is how do I add namespaces to an XHTML5 document? If presently this is not possible, do you or anyone else have a solution? I presume that the RDFa group has provided some suggestions on prefixes. ----------------------------------------------------------------------------------------------------------------------------------------- Hawkes-Lewis: If you're asking for a schema for XHTML5, there's no official schema for XHTML5 but unofficial schemas are being used by the validator. <http://about.validator.nu/> http://about.validator.nu/ Preset Schemas HTML5 (experimental) HTML5 (text/html-compatible content models) HTML5+ARIA (experimental) HTML5 with ARIA (unendorsed integration prototype) Mike(tm) Smith has generated documentation for this schema.” Hawkes-Lewis: <https://bitbucket.org/validator/syntax/src/908b343f782e/relaxng/xhtml5.rnc> https://bitbucket.org/validator/syntax/src/908b343f782e/relaxng/xhtml5.rnc validator/ syntaxhttp://validator.nu/ Employment of an “experimental” tool with a medical device would be difficult to justify. A tool included in a commercial product is better suited for my work. Microsoft has an xsd schema with Expression Web, which has a Russian Doll design. This design-structure (http://developers.sun.com/jsenterprise/archive/nb_enterprise_pack/reference/techart/design_patterns.html) does not permit reuse of any of its component datatypes. It is not obvious with Expression Web how to work with user schemas. XMLSpy has the advantage of being able to validate XHTML5, XML, and XSD. It is also relatively easy to use. Thank you, Yours respectfully, Bob Robert C. Leif, Ph.D. -----Original Message----- From: Benjamin Hawkes-Lewis [mailto:bhawkeslewis@googlemail.com] Sent: Saturday, October 22, 2011 3:46 PM To: rleif@rleif.com Cc: Edward O'Connor; public-html-xml@w3.org Subject: Re: HTML/XML TF report introductory text I'm not sure why this thread is so wary of linking to the actual specs. On Sat, Oct 22, 2011 at 6:07 AM, Robert Leif < <mailto:rleif@rleif.com> rleif@rleif.com> wrote: > In short, we need to state that the only purpose of the DOCTYPE > declaration is to communicate to the browser the format of the document. <http://dev.w3.org/html5/spec/syntax.html#the-doctype> http://dev.w3.org/html5/spec/syntax.html#the-doctype - defines the doctype string in text/html as a legacy-encumbered rendering mode switch. <http://www.w3.org/TR/REC-xml/#sec-prolog-dtd> http://www.w3.org/TR/REC-xml/#sec-prolog-dtd - defines what an XML doctype declaration is. > This leads to the question, what should one put in the first line for an XHTML5 page? This question is answered in the spec. <http://dev.w3.org/html5/spec/the-xhtml-syntax.html#writing-xhtml-documents> http://dev.w3.org/html5/spec/the-xhtml-syntax.html#writing-xhtml-documents - says that XML documents using the XHTML vocabulary may have an XML doctype but it's not required to conform to the HTML5 spec. The question can be rephrased "what should one put in the first line for an XML page", since XHTML is just an XML vocabulary. (The answer depends on your circumstances, e.g. it could be a version declaration, a comment, a document type declaration, the root element, whitespace, etc.) > The problem is that it is probably not economically feasible under the > present circumstances to create a full schema that describes html5 and > thus provides xhtml5, which would then use <?xml version="1.0" > encoding="UTF-8"?> or similar statement. Therefore, essentially some > sort of add-on is needed to extend html5 to provide the functionality of xhtml5. What are you talking about? If you're asking for a schema for XHTML5, there's no official schema for XHTML5 but unofficial schemas are being used by the validator. <http://about.validator.nu/> http://about.validator.nu/ <https://bitbucket.org/validator/syntax/src/908b343f782e/relaxng/xhtml5.rnc> https://bitbucket.org/validator/syntax/src/908b343f782e/relaxng/xhtml5.rnc So for some value of "full" that takes into account the limitations of schema languages, this is demonstrably "economically feasible". If you're asking for something else, what is it? -- Benjamin Hawkes-Lewis
Received on Monday, 24 October 2011 19:43:18 UTC