>> <div itemscope
>>     itemtype='http://en.wikipedia.org/wiki/Template:Sometemplate'
>>     id='uid-1' >
>>     <h2>A static header from the template</h2>
>>     <!-- The template argument 'name', expanded in the template -->
>>     <p itemprop='name' content='The wikitext name'>The rendered name</p>
>>     <meta itemprop='firstname' content='The wikitext firstname'>
>> </div>
> 
> The <p> item looks wrong, in microdata it wouldn't have the content
> attribute. 

Yeah, you are right. The content attribute is specific to the meta element.

> Its value instead would be 'The rendered name'. Extracting
> the wikitext from there instead of a copy of the inner wikitext
> shouldn't be a problem, though. As far as it doesn't contain unbalanced
> syntax... (but that's a point where it seems safe to break compatibility).

..or additional template expansions, as we don't intend to provide
information about all recursively expanded templates.

> 
> I think it would look more like:
> <div itemscope
> itemtype='http://en.wikipedia.org/wiki/Template:Sometemplate'>
> <h1 itemprop="name">John Doe</h1>
> <p>Name: <span itemprop="name">John Doe</span></p>
> <p>Age: <span itemprop="age">21</span></p>
> </div>

Another possibility would be to use meta tags, or something like this
example from the microdata spec:
<data itemprop="product-id" value="9678AOU879">The Instigator 2000</data>

> And indeed it would look very cool to in-place edit the age, or name.
> But remember that it should be changing both locations!

The template arguments are fortunately in the containing page, so we
don't have to edit the template. But I am not sure if that is what you
had in mind.

> However, it doesn't seem so easy for other items:
> [[Image:Photo of {{{name}}}.jpg|120px]]
> 
> {{#ifexist: {{{name}}} family| [[{{{name}}} family]] }}
> 
> {{#if: {{{wife|}}} | Married with [[{{{wife}}}]] | Single }}
> 
> 
> As soon as it hits unrepresentable syntax, I think it should disable
> visual modification of that template. It's better to force editing of
> parameters than have the user that added the middle name, make the photo
> disappear after saving (but showed when he clicked save).

So far we have only considered editing of arguments actually stored in
the including page, but not templates. Even arguments would initially
only be inline-editable if they are expanded directly rather than passed
on to other templates. For now, passed-on arguments would be stored (as
wikitext or tokens) in meta elements, and would be editable only using a
widget. It should be possible to improve on that later.

In general, arguments (or template / image names etc) containing
advanced things like additional templates are likely needed in an
unexpanded form in addition to the expansion, which is what I was trying
to demonstrate with the content attribute.

We also don't plan to support drilling down more than a single expansion
layer for now. The rendered content of the template will be fully
expanded to provide the visual layout, but will not contain information
about lower templates or their arguments for editing purposes.

Gabriel


_______________________________________________
Wikitext-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitext-l

Reply via email to