[whatwg] Including

Mark Nottingham mnot at mnot.net
Mon Nov 12 22:41:42 PST 2012


Hi WHATWG,

I've maintained a little library for a while that does inclusion:
  https://github.com/mnot/hinclude
  http://mnot.github.com/hinclude/

It's used in a few different places, and is now part of Symfony <http://symfony.com>, apparently. 

Besides the obvious issue of "should HTML5 have an inclusion tag?", something else has come up.

Right now, hinclude uses an XML namespace (hx:) to introduce a new tag. This was pretty widely tested to be interoperable way back, but AIUI that option is going away (whatever that means) in HTML5.

It's been suggested <https://github.com/mnot/hinclude/issues/13> that a data-* attribute on div could be used here, but reading the description there, I'm not so sure:

"[T]hese attributes are intended for use by the site's own scripts, and are not a generic extension mechanism for publicly-usable metadata."

<http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#embedding-custom-non-visible-data-with-the-data-*-attributes>

hinclude is intended to be visible to software beyond the site's own scripts. So, what's the appropriate thing to do here? Keep on using hx:include (after all, it works)? use data-include or similar? Or?

Thanks,



--
Mark Nottingham   http://www.mnot.net/





More information about the whatwg mailing list