Custom Namespaces

From RuntimeWiki

Jump to: navigation, search

Currently, the HTML 5 specification supports only a fixed set of namespaces: XHTML, MathML, SVG. See

 http://wiki.whatwg.org/wiki/FAQ#Will_there_be_support_for_namespaces_in_HTML.3F

This means that HTML 5 does not support any extensibility mechanism for introducing new elements or attributes. We want to be able to extend HTML with new elements and attributes like this:

<html xmlns=" http://www.w3.org/1999/xhtml" xmlns:custom="http://customWidgets">
<head><title>Custom Namespace</title></head>
<body>

<p>

  <custom:myWidget customAttribute="somevalue" />

</p>

</html>

Automatic XML Namespaces from Liam Quin

Summary (thanks to Noah Mendelsohn):

  • Namespace definition files provide prefix bindings
  • Default bindings can be associated with dated version of HTML specification

Distributed Extensibility Submission from Microsoft

Per a request from Sam Ruby (of IBM and co-chair of HTMLWG), Microsoft has submitted the following proposal:

Distributed Extensibility Submission from Microsoft

Summary (thanks to Noah Mendelsohn):

  • Mostly supports ordinary xmlns:pref syntax
  • Some special handling for HTML, SVG, MathML namespaces
  • Several proposed options for unbound prefix handling
  • Optional: allow default namespace binding except on root element
  • Optional: magic namespace assigned for unbound prefixes
  • Optional: predefine prefixes such as html:, math:, svg:
  • Removes Internet Explorer restriction that prefixes be bound on root element
Personal tools