While exploring lots of tricks to store and retrieve data/metadata into the simpler way, I found thar this html structure:

<span class="metadata" title="name">content</span>

where css states that

.metadata {display:none;}

is an excellent, invisible data container, accessible both to a js into a local page and by a bot parsing html of the page from an ?action=render call. Such a html tag can be produced by a very simple template with two parameters, and calling such a template could be done with something like

{{Metadata|name|content}}

so allowing metadata retrieval from wiki code too.

I think that such a simple structure extremely promising.

Alex