The autocomplete attribute and web documents using XHTML: Difference between revisions

Jump to navigation Jump to search
Line 20: Line 20:
2. The web is gradually transitioning from HTML to XML-based markup, helped by minority browsers that can parse the application/xhtml+xml internet media type correctly.
2. The web is gradually transitioning from HTML to XML-based markup, helped by minority browsers that can parse the application/xhtml+xml internet media type correctly.


3. When writing HTML, it is trivial to express the <code>autocomplete</code> attribute using the SGML standard by creating a custom DTD and using that as your doctype. You can create such a DTD by simply adding the following line to the HTML 4.01 DTD:
3. When writing HTML, it is trivial to express the <code>autocomplete</code> attribute using the SGML standard by creating a custom DTD and using that as your doctype. You can create such a DTD importing an HTML DTD and then simply adding the following line:


<blockquote><code><!ATTLIST (form|input) autocomplete (on,off) #IMPLIED></code></blockquote>
<blockquote><code><!ATTLIST (form|input) autocomplete (on,off) #IMPLIED></code></blockquote>
I've put up some example DTDs at my site:
* [http://www.benjaminhawkeslewis.com/legacymarkup/dtd/html-4.01-transitional-plus-autocomplete.dtd]
* [http://www.benjaminhawkeslewis.com/legacymarkup/dtd/html-4.01-transitional-plus-autocomplete.dtd]
* [http://www.benjaminhawkeslewis.com/legacymarkup/dtd/html-4.01-strict-plus-autocomplete.dtd]
I've also added an [http://www.benjaminhawkeslewis.com/legacymarkup/examples/html-4.01-strict-plus-autocomplete.html example document using the Strict version].


4. The X in XHTML stands for "extensible". But because all elements and attributes are namespaced in XML and the W3C jealously guard their XHTML namespace from extension by others, a site author may not do the same with XHTML-based markup. While it is certainly possible to build a custom XML DTD to include an <code>autocomplete</code>, the act would be meaningless as the W3C have made it clear they would not regard documents extending the XHTML namespace in this way as even using XHTML at all ([http://www.w3.org/TR/xhtml-modularization/conformance.html#s_conform XHTML Modularization 1.1: Working Draft: Conformance Definition], also see [http://alistapart.com/articles/customdtds2/ A List Apart: More About Custom DTDs]).
4. The X in XHTML stands for "extensible". But because all elements and attributes are namespaced in XML and the W3C jealously guard their XHTML namespace from extension by others, a site author may not do the same with XHTML-based markup. While it is certainly possible to build a custom XML DTD to include an <code>autocomplete</code>, the act would be meaningless as the W3C have made it clear they would not regard documents extending the XHTML namespace in this way as even using XHTML at all ([http://www.w3.org/TR/xhtml-modularization/conformance.html#s_conform XHTML Modularization 1.1: Working Draft: Conformance Definition], also see [http://alistapart.com/articles/customdtds2/ A List Apart: More About Custom DTDs]).

Navigation menu