W3C home > Mailing lists > Public > public-html@w3.org > May 2009

Re: MathML in HTML: syntax for hypertext links

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 1 May 2009 23:27:11 +0000 (UTC)
To: David Carlisle <davidc@nag.co.uk>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0905012322540.18851@hixie.dreamhostps.com>
On Fri, 3 Apr 2009, David Carlisle wrote:
> MathML (1 and 2) has deferred to xlink for linking. The schema allowed 
> xlink, as a foreign namespaced attribute, on any element, and so to make 
> a link in MathML you could go
> <mi xlink:type="simple" xlink:href="http:.....">text</mi>
> In addition MathML has a "catch all" element, <maction>, for supporting 
> dynamic behaviour (in a way that in MathML 1 and 2 was intentionally 
> loosely defined in the spec, to allow for a certain amount of 
> implementer innovation). In particular in IE/MathPlayer you can go
> <maction type="link" dsi:href="....">
>   arbitrary mathml content
> </action>
> The Math WG is considering adding "native" support for linking in 
> MathML3. It has become painfully obvious that relying on an external 
> specification for linking is not ideal (Firefox 3 pulled support for 
> xlink, thus removing link support from all existing XHTML+MathML pages). 

My recommendation would be to not reference XLink normatively (the spec 
doesn't really define any implementation conformance criteria anyway) but 
to instead simply have xlink:href="" in MathML always mean a link.

That way the language is simplified (no need for xlink:type="", no 
confusion as to the meaning of the other XLink attributes, etc), while 
remaining backwards-compatible with previous implementations and without 
introducing yet more confusion into the issue.

> Also relying on (necessarily :-prefixed) xlink attributes for linking 
> will presumably cause problems for html5 integration.

XLink is supported by the HTML5 parser spec now, so this isn't a concern.

> Currently we are considering two possibilities.
> 1) Allow href everywhere on all elements where it makes sense.
>    (The exact list would need to be determined exactly and listed in the
>    MathML3 spec.) This would allow
>    <mn href="..">1</mn> 
>    as well as
>    <mrow href="..."><mi>a</mi><mo>+</mi><mi>b</mi></mrow>

I would encourage this approach except with the attribute named xlink:href 
(that is, "href" in the XLink namespace), so that there's no redundancy. 
Historically it has proved problematic when there are two attributes that 
mean the same thing, with different UAs getting different behaviour, 
serialisers getting confused, authors including both "just in case", the 
two attributes getting out of sync, etc.

> 2) Formalising the link behavior of maction. So a link would be made
>    with <maction type="link"> and the above two links would be coded as
>    <maction type="link" href=".."><mn>1</mn></maction>
>    <maction type="link" href="..."><mrow><mi>a</mi><mo>+</mi><mi>b</mi></mrow></maction>
>    This is a perhaps smaller change to MathML, just adding the href
>    attribute to maction, but leads to considerably more verbose markup,
>    as demonstrated.

This doesn't seem better.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 1 May 2009 23:34:59 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:45 UTC