[imps] Extending the tree builder test format to cover SVG and MathML
Henri Sivonen
hsivonen at iki.fi
Wed Jun 25 03:37:42 PDT 2008
I think we should extend the html5lib tree builder test format to
cover MathML and SVG. This means the need to express that an element
is in the MathML or SVG namespace and the ability to express that an
attribute is in the XML or XLink namespace.
Strictly speaking, it would also require dealing with the xmlns
namespace, however, I suggest we don't mix xmlns attribute testing
with the rest of foreign content testing, because namespace
declaration attributes are special e.g. in SAX and, therefore,
requiring xmlns attributes to be preserved and in the right order
causes hardship for implementations that map to XML APIs that don't
represent namespace declarations as attributes.
Since the tree builder output can't have arbitrary namespaces, we
don't need namespace URIs and can instead use more compact symbols.
I suggest representing a MathML element by prefixing the name with "m
" like this: <m annotation-xml>. SVG element would be prefixed with "s
": <s foreignContent>.
I suggest prefixing XLink attributes with "xlink ", XML attributes
with "xml " and xmlns attributes prefixed with "xmlns ".
I suggest using thus prefixed name (i.e. e.g. "xlink href") as the
attribute order sort key.
Space as the delimiter can't collide with any character that can be
tokenized as part of a name.
Opinions?
--
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
More information about the Implementors
mailing list