At this moment VisualEditor depends on rel attribute to identify type of the link. Not having rel attribute wouldn't make things easier in VisualEditor when converting from internal to external (or other way round) since it requires replacing internal type of the annotation anyways.
I don't like that consumer of HTMLDOM would have to know certain rules (starts with http or Special:BookSources) in order to recognize type of the element. Inez On Wed, Jan 8, 2014 at 12:37 PM, Gabriel Wicke <[email protected]> wrote: > Hi, > > I'd like to ask you for your input on a change to the DOM spec [1] we > are considering. The idea is to simplify links by removing the explicit > mw:WikiLink or mw:ExtLink typeof attributes: > > <a rel="mw:WikiLink" href="./Main_Page">Main Page</a> > <a rel="mw:ExtLink" href="http://example.com">http://example.com</a> > > would become just > > <a href="Main_Page">Main Page</a> > <a href="http://example.com">http://example.com</a> > > Reasons for this change are: > > - The external vs. internal link distinction is pretty simple to do > with a prefix match on the href. > > - When editing, an internal link can turn into an external one and > vice-versa. Editors should not have to deal with updating the typeof > to reflect the information already available in the href attribute. > > - The page source will be slightly cleaner and smaller. > > Potential disadvantages we see are > > - For ISBN links [2], we will continue to link to Special:BookSources, > which looks internal. Matching on that to identify ISBN links should > however not be harder than it is right now. > > Are you currently relying on these typeofs? Do you see other issues with > this proposed change? > > Thanks for your input, > > Gabriel > > > [1]: https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Wiki_links > > _______________________________________________ > Wikitext-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitext-l >
_______________________________________________ Wikitext-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitext-l
