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

MathML in HTML: syntax for hypertext links

From: David Carlisle <davidc@nag.co.uk>
Date: Fri, 3 Apr 2009 00:20:44 +0100
Message-Id: <200904022320.n32NKibN030158@edinburgh.nag.co.uk>
To: public-html@w3.org

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 xlimk: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

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).
Also relying on (necessarily :-prefixed) xlink attributes for linking
will presumably cause problems for html5 integration.

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>

   This use of href as a common attribute making any element a hypertext
   link would be compatible with xhtml2 which allows href on any xhtml
   element [1] but as far as I can see, html5 draft has chosen not to
   follow this route and is proposing to stay with the html4 <a href
   syntax [2].

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.

Clearly the final decision about MathML design rests with the Math WG,
but (X)HTML(5) integration is a very important goal for us, so we would
be interested to know from the HTML WG, and in particular any browser
vendors considering mathml-in-html support, whether there are advantages
or disadvantages to either of these design choices, or if there are
other options that we could consider.

David Carlisle
for the Math WG

[1]   http://www.w3.org/TR/xhtml2/mod-hyperAttributes.html#adef_hyperAttributes_href
[2]   http://www.whatwg.org/specs/web-apps/current-work/#hyperlink

The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
Received on Thursday, 2 April 2009 23:21:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:25:29 UTC