-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supported type should include MathML types #141
Comments
cc @bkardell for input... wondering what browsers do with the media types? |
I just checked copy FireFox and Chrome (with experimental MathML turned on) with and neither put out any of those on the clipboard in Windows. |
@marcoscaceres - Do you mean "at all" or specifically on this question? |
Yeah, "at all" (with respect to the media type)... and if browsers do something when performing a clipboard operation with MathML data, then what do they do? ... thanks to @NSoiffer, we know at least on Windows nothing happens #141 (comment) |
If I set the content-type in the response to these, it changes the parsing behavior in FF from HTML (creating the host doc, etc), in WebKit/Chromium (Linux) it causes the document to be downloaded instead of displayed. I think some of this is underspecified and not all of these observations should necessarily be the case, but some it'll also change the application of some things, I guess. In FF, if set:
|
@marcoscaceres : On macOS (and on windows I think), browsers that are invoked with the clipboard operation When you have MathML in a web-page and try to copy it, you obtain HTML with, sometimes the MathML in it. |
@bkardell : Re: your comment: for me this is a different story that is not bound to clipboard-apis. I would move this to an issue in our MathML spec. |
So on macOS and other Apple platforms, there is system declared UTI for MathML or SVG. As a result, this isn't really possible in a way that's interoperable across different applications: https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259 We could declare it as a generic XML content but I don't think that'd help the situation. |
@rniwa : I don't get the point of being impossible. Why would this prevent the clipboard-APIs implementations to copy the appropriate type as expressed in a way that is specific to the platform? |
MIME type is defined. UTI in AppKit / UIKit is a slightly different concept, and that's what applications on Apple platforms would use to identify the type of a content. MIME types don't matter much on Apple platforms since that's not the primary mechanism by which the content type is identified by applications.
That's right although I would not rule out the possibility that Apple may define the UTI type for MathML in the future.
Well, because if different applications don't agree which UTI to use to identify MathML, then it's not possible for different applications to recognize the content as such. Say, WebKit / Safari uses
While Windows SDK also has a small set of the standard clipboard format types defined, format types are often defined using MIME type strings themselves so it would not be entirely incompatible to use GTK+ also uses MIME type to define GdkContentProvider for example so having MIME type defined works there too. |
Thank you @rniwa for the extra links. I don't see a disagreement except for "it will not work". We had already spotted at the time that media-types are not exactly the same as UTIs. That is why the MathML specification includes UTI specifications:
That is also why I sometimes recommend media-type declarations to include UTIs and Windows Clipboard flavour names when I see them passing by on the media-types mailing-list. I would like to note that this issue is about "supported typed" and includes UTIs and Clipboard flavour names. paul |
Presumably you're referring to the names of MathML encodings. I wasn't aware that this section existed but I don't think this recommendation is sound. |
I'm afraid that the fact that the public subtree of UTIs is from Apple was not known when we did this (probably in 2009). The same holds for other types actually. The wikipedia page about UTIs indicates that the public sub-tree is managed by Apple. But that page started in 2010. I do not remember the UTI documentation stating that exclusivity. Another aspect which I don't remember reading is that UTIs would be close to reversed domain names. What can we do from now?
Thanks in advance. PS: On the MicroSoft side, we had in the Math Working Group a member of MicroSoft which assured that names are free to create by apps. An example of situation where a standard such as MathML is useful to propose converging names. |
Since I'm an engineer in the WebKit team at Apple, I can bring up this up with the relevant folks. I'm just pointing out that getting the spec changed isn't enough to make it work on Apple platforms. For now, it might be advisable to say that UA MAY support MathML instead of MUST or SHOULD. |
Allow me to indicate that MathML is by far not the only content-type which has allowed itself a public UTI. SVG and TAR are also there and not specified by Apple. Wikipedia's links to UTI shows a big list. Maybe you could ask relevant persons what has been the process and what is the current process? If a process existed to (ask to) register the MathML UTI, we would have used it when MathML3 was written. |
While it is true that the OS allows custom formats to be defined by the app, it is not, however, guaranteed to be supported by other apps. The apps have to add explicit support for these types which makes me wonder if Pickling API would be useful here so we don't have to define MathML types in the platform standard clipboard formats which is standardized by the OS. @BoCupp-Microsoft @annevk @whsieh @mbrodesser FYI. |
Super interesting the Pickling API. Where do comments go for this? |
@polx You can open issues in this repo for Pickling API. |
Hello @rniwa , is there a way to resolve the debate about It seems to me that either Apple establishes a process (just as there was one for the four-letter codes) or tacitly accepts older UTI-indications within specifications and applications (probably what's currently happening but the issue is broader than MathML) or declares explicitly a problem with such UTIs. Thanks in advance. |
Hello @rniwa , any chance that someone of Apple shows up in the MathML working group's meeting (Wednesday 17:00-18:30) at TPAC? |
(to discuss it the debate about the UTI's naming) |
This issues proposes that the MathML media-types also be included as mandatory media-types for paste and copy events:
application/mathml+xml
application/mathml-presentation+xml
application/mathml-content+xml
Indeed the use case includes mathematical information as one of the targets. But as of today, only
application/xml
would be allowed while this type is much too generic. A few applications exposed the platform specific "clipboard flavors" which are also specified in the media-types declarations.The text was updated successfully, but these errors were encountered: