This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The spec should make clear that it is a non-goal to create an inert mechanism for XML documents, and that the behavior of parsing template children by the XML parser is exactly as if the template element had been created via createElement and children appended to it (i.e. nothing special).
I'm actually not sure it makes sense to mention XML or not. Thoughts?
If <template> is going to be treated as just another element in the XHTML syntax, it *would* probably be a good idea to state that directly in <http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#definitions>; rather than relying on the reader getting that out of: "The template contents must be declared using the HTML syntax in an HTML document." Incidentally, why is that a non-goal? (Is there an ML thread about it?)
@Samuel, in XHTML, the template element will behave the same placed in the DOM, however, the difference is that XML parser allows for no element-specific parsing behavior, thus the XML parser is incapable of directing tokens to the |content| of the template. Thus, the following: <template><div></div></template> when served in XHTML will produce a template with a div firstChild, where as HTML will produce a template with no children and a |content| DocumentFragment with a div as its firstChild.
The spec is clear that the parser changes apply only to HTML. Upon reflection, it seems obvious that the XML parser isn't changed because it is never mentioned.