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
Going on exploring the same idea, here an update. I posted it into en.source scriptorium, but I think better to post it here too a copy of my contribution.
Template-generated Dublin Core metadata
We are going on testng (both into it.source and vec.source) a very simple syntax to inject well-formed Dublin core metadata into html of our ns0 pages. The trick is, to add inside our versions of header templates somethink like this:
vec.source version: <pre><span class="metadata">dc:title{{{titolo|}}}</dc:title></span> <span class="metadata">dc:creator opt:role="aut"{{{autor|Anonimo}}}</dc:creator></span> (..other..) </pre>
it.source version: <pre><span class="metadata">dc:title{{{Titolo|}}}</dc:title></span> <span class="metadata">dc:creator opt:role="aut"{{{{{#ifeq:{{lc:{{{Progetto|}}}}}|diritto|Organismo emittente|Nome e cognome dell'autore}}|Anonimo}}}</dc:creator></span></pre>
As you guess, data are managed in different ways and formats from header templates of vec.source and it.source, but they produce an identical Dublin Core code.
Obviously there's a span.metadata {display:none} directive into both Common.css files, so that such data are completely hidden; nevertheless they can be easily found and used parsing the html of the page by a js script or a bot script. This means, that good, well-formatted Dublin core metadata can be added into any ns0 wikisource page of any language, without any user work, without any extension, with a extremely low server load (almost nothing!), producing a shared, identical set of metadata from any wikisource project perfectly machine-usable; i.e. what's needed as a basic step to build good epub version of source works, but many other applications can be thought
Alex brollo
wikisource-l@lists.wikimedia.org