Recent studies by Håkon Wium Lie
<http://www.princexml.com/howcome/2009/wikipedia/> clearly show that
XHTML markup generated by widespread templates such as {{coord}} is
overcomplexified. This is mostly what we are able to fix, but
sometimes we aren’t due to the limitations we have created for
ourselves (Håkon simply pointed it out as he couldn’t know the reasons
behind it; this is why having a fresh look is useful). Perhaps the
most serious limitation is:

We don’t allow attributes for wikilinks.

This limitations results in several disadvantages, for example:
* Each time someone wants to style a link, they have to create a
<span> or something else somewhere inside or outside the link text. In
most cases, this is against the semantics and clarity.
* We can’t give ids to links so that we can use them in CSS and JS.
* Implementations of certain microformats (such as XFN, “url” property
in hCard/hCalendar, etc) inside templates is impossible.

I propose to extend wikilinks syntax by making links being parsed the
same way as we parse file-links.

That is, [[Special:Userlogout|log
out|id=logoutlink|style=color:red|title=This will log you out]] will
be a wikilink with style, title and id attributes. The current syntax
is a subset of my proposal, so nothing should break.

As the syntax for external links leaves us no opportunity to clearly
extend it in the same spirit, I currently think of merging it with
external links’ syntax, leaving the current single-brackets for
backward compatibility. Besides these advantages, it will make our
syntax even friendlier (have you seen newbies trying to insert http://
into the double brackets?), and it will make us implicitly prohibit
Protocol://-like titles (they all are erroneous creations by newbies
anyway).

— Kalan

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to