On Tue, 2011-03-15 at 21:06 +0100, Hay (Husky) wrote:
3) 'Data blocks' in a script element, as described in the spec. You
can, for example, use a script element with an 'application/xml' or
'application/json' type, which will not be processed by a browser, and
use Javascript to do the parsing.
Is X3DOM an example of solution to what you are trying to do? They embed
hierarchical data directly in HTML docs through namespaces and have
JavaScript use that data
http://www.x3dom.org/
I believe Angular does this as well.
http://angularjs.org/
On 3/15/11, Hay (Husky) hus...@gmail.com wrote:
Hi everyone,
what would be the 'preferred' way to embed custom hierarchical data in
a HTML document?
You should also consider passing the data along with the script and HTML,
rather than embedding it in the markup. This may save you from
Thanks for the suggestion Bjartur, but unfortunately that's not an
option in the usecase. Data is parsed using Freemarker (a template
language) and can't be included using a script src= tag.
-- Hay
On Tue, Mar 15, 2011 at 10:15 PM, Bjartur Thorlacius
svartma...@gmail.com wrote:
On 3/15/11, Hay
On Tue, Mar 15, 2011 at 4:06 PM, Hay (Husky) hus...@gmail.com wrote:
1) Microdata. This could work, but only if the data should be
displayed as well. If the data should be processed (and for example,
be shown in another part of the page) this doesn't work really well.
You could the hide the