Subject: [Uri-review] Registration request for math: URI scheme

From: Gerardo Capiel <[email-masked]>
Date: Sun, 27 Apr 2014 06:35:29 +0000

Hi,

I'm requesting a provisional 'math' URI scheme name. The 'math' URI scheme and protocol handler can be used by Web browsers and other applications to transport mathematical expressions to other applications, such as Assistive Technologies or graphing calculators.  Below is the provisional URI Scheme Registration Template:

   URI scheme name
      math - The math: URI scheme can be used by Web browsers and other applications to transport mathematical expressions to other applications, such as Assistive Technologies or graphing calculators.

   Status
      Provisional
x
   URI scheme syntax
      Applications launched via the math protocol take as a parameter either a URL to a resource containing a mathematical expression in MathML or other formats or the actual math expression in uncompressed or compressed form. For example:
      math://mathmlcloud.org/m/uniqueexpressionid
      math:<math><mi>x</mi><mo>+</mo><mn>2</mn></math>
      math:<math-compressed>someexpressionincompressedformat</math-compressed>

   URI scheme semantics
      TBD

   Encoding considerations
      TBD

   Applications/protocols that use this URI scheme name
      Applications should register the math: protocol handler with this scheme.

   Interoperability considerations
      TBD

   Security considerations
      None known.

   Contact
      Gerardo Capiel, [email-masked]<mailto:[email-masked]>

   Author/Change controller
      Gerardo Capiel, [email-masked]<mailto:[email-masked]>

   References
      [1] http://www.w3.org/community/groups/proposed/#mathprotocol
      [2] https://wiki.benetech.org/display/MATH/Protocol+Handlers+for+External+Applications+to+Process+MathML

Gerardo Capiel
VP of Engineering
benetech

---

From: Ted Hardie <[email-masked]>
Date: Mon, 28 Apr 2014 08:23:42 -0700

This template does not seem complete to me, and the string "math" is
sufficiently general that I have some concerns.  I note, for example, that
the document says that the scheme takes as an argument

*​
*Applications launched via the math protocol take as a parameter
either a URL to a resource containing a mathematical expression in
MathML or other formats or the actual math expression in uncompressed
or compressed form. For example

​What it means by "a URL to a resource" isn't clear (would this be in
the math URL or a different URL scheme?), and there seems to be no bound
on the actual format.  math:twoplustwoplusfourdividedbyseven appears to
permitted as would be pretty much anything else.  That's worryingly under-
specified.

Ted​

On Sat, Apr 26, 2014 at 11:35 PM, Gerardo Capiel <[email-masked]>wrote:

> *   URI scheme name
> *      math - The math: URI scheme can be used by Web browsers and other applications to transport mathematical expressions to other applications, such as Assistive Technologies or graphing calculators.
> *   Status
> *      Provisional
> x
> *   URI scheme syntax​​
> *      Applications launched via the math protocol take as a parameter either a URL to a resource containing a mathematical expression in MathML or other formats or the actual math expression in uncompressed or compressed form. For example:
> *   URI scheme semantics
> *      TBD
>       *   Encoding considerations
> *      TBD
>       *   Applications/protocols that use this URI scheme name
> *      Applications should register the math: protocol handler with this scheme.
>       *   Interoperability considerations
> *      TBD
>       *   Security considerations
> *      None known.
>       *   Contact
> *      Gerardo Capiel, [email-masked]
>       *   Author/Change controller
> *      Gerardo Capiel, [email-masked]
>       *   References
> *      [1] http://www.w3.org/community/groups/proposed/#mathprotocol
> _______________________________________________
> Uri-review mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/uri-review
>
>

---

From: Gerardo Capiel <[email-masked]>
Date: Mon, 28 Apr 2014 15:52:05 +0000

Ted,

Thank you for following up.  Comments below:

On Apr 28, 2014, at 8:23 AM, Ted Hardie <[email-masked]<mailto:[email-masked]>>
 wrote:

This template does not seem complete to me, and the string "math" is sufficiently general that I have some concerns.  I note, for example, that
the document says that the scheme takes as an argument

​

Applications launched via the math protocol take as a parameter
either a URL to a resource containing a mathematical expression in
MathML or other formats or the actual math expression in uncompressed
or compressed form. For example

I'm open to alternatives for the protocol name other than "math", such as "mathproc".  Ideas are welcome.  The URL is to a web page [1] containing MathML markup, which will be processed by the application handling the protocol, which is launched from the browser (similar to mailto).  Alternatively the protocol handler can accept the actual math expression (not a pointer to it) in MathML format or a compressed MathML format due to the verbosity of MathML and the 2K character limitation for URLs.  We need to still specify the accepted compression techniques.

[1] Example URLs:
http://www.albany.edu/~hammond/gellmu/dmml.xml
https://developer.mozilla.org/en-US/docs/Web/MathML/Examples/MathML_Pythagorean_Theorem

Ted​

On Sat, Apr 26, 2014 at 11:35 PM, Gerardo Capiel <[email-masked]<mailto:[email-masked]>> wrote:

Hi,

   URI scheme name

   Status
      Provisional
x
   URI scheme syntax
​​

   URI scheme semantics
      TBD

   Encoding considerations
      TBD

   Security considerations
      None known.

   Contact

   Author/Change controller

   References

Gerardo Capiel
VP of Engineering
benetech

_______________________________________________
Uri-review mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/uri-review

---

From: Ted Hardie <[email-masked]>
Date: Mon, 28 Apr 2014 09:41:53 -0700

​Some questions and comments in-line.

​
On Mon, Apr 28, 2014 at 8:52 AM, Gerardo Capiel <[email-masked]>wrote:

>   On Apr 28, 2014, at 8:23 AM, Ted Hardie <[email-masked]>
>    wrote:
>
>  I'm open to alternatives for the protocol name other than "math", such as
> "mathproc".  Ideas are welcome.
>

​The examples appear to be all MathML; is there a desire to include other
types of input?

In general, I think you might find it easier to construct a more restricted
URI handler, then build on that.  Even limited to MathML, this has two very
different semantics, depending on whether the expression is inline or not.

 The URL is to a web page [1] containing MathML markup, which will be
> processed by the application handling the protocol, which is launched from
> the browser (similar to mailto).
>

​I looked at the example pages.  In each of them, the MathML​ markup is
embedded within a larger page.    Do you have a way of ensuring that the
reference is to the correct part of the page?  As an example, how would you
handle an external reference to a page that contained multiple MathML
expressions?

>  Alternatively the protocol handler can accept the actual math expression
> (not a pointer to it) in MathML format or a compressed MathML format due to
> the verbosity of MathML and the 2K character limitation for URLs.  We need
> to still specify the accepted compression techniques.
>
>
For the actual math expression, could you use a data URI and the
appropriate MIME type?

regards,

Ted Hardie​

---

From: Gerardo Capiel <[email-masked]>
Date: Tue, 29 Apr 2014 04:20:44 +0000

Responses in-line:

On Apr 28, 2014, at 9:41 AM, Ted Hardie <[email-masked]<mailto:[email-masked]>>
 wrote:

​
On Mon, Apr 28, 2014 at 8:52 AM, Gerardo Capiel <[email-masked]<mailto:[email-masked]>> wrote:
Ted,

​

I'm open to alternatives for the protocol name other than "math", such as "mathproc".  Ideas are welcome.

​The examples appear to be all MathML; is there a desire to include other types of input?

Given that MathML is the recommended markup for math, we should probably stick to that.

In general, I think you might find it easier to construct a more restricted URI handler, then build on that.  Even limited to MathML, this has two very different semantics, depending on whether the expression is inline or not.

 The URL is to a web page [1] containing MathML markup, which will be processed by the application handling the protocol, which is launched from the browser (similar to mailto).

​I looked at the example pages.  In each of them, the MathML​ markup is embedded within a larger page.    Do you have a way of ensuring that the reference is to the correct part of the page?  As an example, how would you handle an external reference to a page that contained multiple MathML expressions?

We can use anchor tags (e.g., #formula1) to focus on a particular math expression on a page.  I also think it's ok to expect applications to support multiple expressions on one page.  IDREFs might be another way, but I've never seen those used within a URL.

 Alternatively the protocol handler can accept the actual math expression (not a pointer to it) in MathML format or a compressed MathML format due to the verbosity of MathML and the 2K character limitation for URLs.  We need to still specify the accepted compression techniques.

For the actual math expression, could you use a data URI and the appropriate MIME type?

Upon further thought the idea of using a data: URI for inlined math expressions seems like a good approach, particularly since it eliminates multiple URI schemes for the mathproc: protocol handler.  Are there any real world examples of standalone applications that are launched from the Web browser via the data:application/xxx URI scheme?

regards,

Ted Hardie​

[1] Example URLs:

Ted​

Hi,

   URI scheme name

   Status
      Provisional
x
   URI scheme syntax
​​

   URI scheme semantics
      TBD

   Encoding considerations
      TBD

   Security considerations
      None known.

   Contact

   Author/Change controller

   References

Gerardo Capiel
VP of Engineering
benetech

---

From: Gerardo Capiel <[email-masked]>
Date: Tue, 29 Apr 2014 17:55:35 +0000

Ted,

Let me add that I experimented with the data: URI scheme with an anchor tag.  In both Chrome and Safari on OS X a file was downloaded and in Firefox it simply displayed the XML.  In none of the cases it launched an application, which is probably a good thing from a security standpoint, since there was no prompt whether I was ok with downloading the file.  Custom protocol handlers seem to always provide the users with some warning.  Also, a file being downloaded for every equation does not seem like a viable approach.

Perhaps, we should not use the data: scheme and have two new schemes for inline or offline uses:

math-data:application/mathml+xml,<math><mi>x</mi><mo>+</mo><mn>2</mn></math>
math-http://mathmlcloud.org/m/formulaid

I'm not sure if we need the "application/" piece on the first example.

To deal with the verbosity of MathML and the URL length limitation, we could define a new format or type called mathml+compressed.

Thoughts?

Gerardo

On Apr 28, 2014, at 9:20 PM, Gerardo Capiel <[email-masked]<mailto:[email-masked]>>
 wrote:

Responses in-line:

​

​

regards,

Ted Hardie​

[1] Example URLs:

Ted​

Hi,

   URI scheme name

   Status
      Provisional
x
   URI scheme syntax
​​

   URI scheme semantics
      TBD

   Encoding considerations
      TBD

   Security considerations
      None known.

   Contact

   Author/Change controller

   References

Gerardo Capiel
VP of Engineering
benetech