| Summary: | Help content containing MathML is not rendered correctly in Infocenter | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | David Rawlins <rawlins> |
| Component: | User Assistance | Assignee: | Chris Goldthorpe <cgold> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cgold |
| Version: | 4.0 | ||
| Target Milestone: | 3.7 M6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Attachments: | |||
|
Description
David Rawlins
Can you attach an example of a page which has problems displaying? Created attachment 172355 [details]
Test file for MathML output
This is a small sample MathML file created by Firemath in Firefox. It should display the equation: x^2 = sqrt(y), with x in bold.
I've added a small sample MathML file. It should display correctly if opened in Firefox. I tried your example and as was able to reproduce tbe behavior you described. The first thing I noticed was that the content type of the page returned from the server is "text/html". Setting the content type to "application/xhtml+xml" only seems to make the situation worse, I see this error message displayed in the content frame with a yellow background: Error loading stylesheet: A network error occured loading an XSLT stylesheet:http://127.0.0.1:3433/help/topic/b317215/html/pmathml.xsl - http://127.0.0.1:3433 is the host/port on which I have help running. This is the same error message I see if I try to open the Test file for MathML output attachment from Bugzilla using Firefox. If I could solve the second problem I could look into how to set the content type to "application/xhtml+xml" when the content is xhtml. Created attachment 172430 [details]
Test file for MathML output
My apologies - I realized that the previous file was pointing to a local style sheet. Try this one.
Thanks,
Dave
Targeting Eclipse 3.7. The solution will be to allow the mime type to be "application/xhtml+xml" if the client is Firefox. Currently there is code in the help server which prevents "application/xhtml+xml" from being returned as the content type because when IE sees that content type it asks if you want to download the file rather than displaying it. I have not yet tested other browsers to see how they handle this mime type, probably the safest thing to do is to leave the current behavior unchanged for all browsers other than Firefox and maybe also Opera - both have native support for MathML. Internet Explorer will also work by installing MathPlayer from http://www.dessci.com/en/products/mathplayer/ Dave I was able to get IE to display the Math extensions however the problem I still need to solve is how to get the content type correct for all users. If IE with no extensions sees a content type of "application/xhtml+xml" it will not display the page because it does not recognize the content type. For this reason the help server sets the content type to "text/html" in place of "application/xhtml+xml". On the other hand the equations will not display correctly in IE even if it contains the addin to handle Mathml if the content type is set to "text/html". I'm not sure how to handle setting the content type correctly for IE. For Opera and Firefox it's fairly easy to get the Math to show correctly. For our application we warn IE users to install MathPlayer before opening the InfoCenter. Is it possible to edit Eclipse 3.5 to allow the mime type to be "application/xhtml+xml"? If so, could you give me instructions? Thanks, Dave Created attachment 173157 [details]
Patch to always allow application/xhtml+xml
This patch will allow the content type "application/xhtml+xml" to be returned
for all browsers. It is not recommended for IE users who do not have extensions
to handle xml.
I tried applying the patch to org.eclipse.help.webapp_3.4.1.v20091009_35x.jar in Eclipse 3.5.2, build 20100218-1602, but when I replace the above plugin with the rebuilt one I get the following error when launching Help:
HTTP ERROR 404
Problem accessing /help/index.jsp. Reason:
ProxyServlet: /help/index.jsp
Powered by Jetty://
I notice that when comparing the new jar file with the old one, the new jar file does not include the directory /org/eclipse/help/internal/webapp/jsp. There is also a warning in the file plugin.xml that the file schema/contentFilter.exsd does not exist.
If you are missing /org/eclipse/help/internal/webapp/jsp that would explain the error message. Did you create the bundle using export/Deployable plugins and fragments? Yes, I used export/Deployable plugins and fragments. The good news is that the org.eclipse.help.webapp plugin with the patch works if I click the link Overview>Testing>"Launch an Eclipse application". I'm wondering if the extension point warning is causing the jsp directory not to be included. Here is the line in plugin.xml that is giving the warning: "schema/contentFilter.exsd" does not reference a schema file: <extension-point id="contentFilter" name="%content_filter_extension_name" schema="schema/contentFilter.exsd"/> The missing extension point schema file is due to Bug 318072. This would not affect the ability of the webapp to start, it would just make it harder to use the extension point because the plug-in manifest editor would not know the structure of the extension point. I'm thinking that the reason why you don't have /org/eclipse/help/internal/webapp/jsp is because that directory contains the precompiled jsps. Usually the webapp will start regardless of whether or not thes precompiled jsps exist because they will be compiled on demand, however that requires the jsp compiler, jasper to be in your application, which I'm guessing is not true. Try running the ant script buildJSPs.xml -that will compile the jsps and may just solve your problem. I don't have the ant script buildJSPs.xml in my eclipse distribution (should I?), but can can download it from http://dev.eclipse.org/viewsvn/index.cgi/org.eclipse.help.webapp/buildJSPs.xml. Is that what I want? I ran the ant script above, but I'm still getting the same error. I also tried adding the jsp directory from the original plugin jar file to the new one, but that didn't work either. I can't figure out what's happening then. It sounds as though you are missing the compiled jsp class files. Can you read any other files from the help system, such as html files? The error in comment 11 occurs when I click on Help>Help Contents, so no, I can't read html files from the help system. Here are the steps I took to produce the plugin. Let me know if there is anything I am missing.
1.Start with Eclipse 3.5 build id 20100218-1602
2.Import > Plug-ins and Fragments
a.Import From: The active target platform
b.Import As: Projects with source folders
c.Selection: org.eclipse.help.webapp
3.Apply patch to src/org/eclipse/help/internal/webapp/servlet/EclipseConnector.java
4.Project > Build Project
5.Copy buildJSPs.xml to project folder
6.Run builJSPs.xml as Ant Build
7.Export > Deployable plug-ins and fragments
a.Select: org.eclipse.help.webapp (I renamed the version to 3.4.1.v20100727)
8.Move eclipse/plugins/org.eclipse.help.webapp_3.4.1.v20091009_35x.jar to eclipse/temp
9.Copy org.eclipse.help.webapp_3.4.1.v20100727.jar to eclipse/plugins
10.Restart eclipse
If you don't see anything I am doing wrong, is it possible for you to upload your new version of org.eclipse.help.webapp?
Thanks,
Dave
I can't immediately see anything wrong with your steps. Unfortunately I don't have a lot of time to look into this today as I have another fire to fight. I'm guessing that one of the following is happening: a) The help server is not starting b) The help server is starting but is not locating any resources c) The help server has started and can display some things but not others. My guess is (c) If you can debug and put a breakpoints in JettyHelpServer.start() and JettyHelpServer.checkBundle() you can determine whether the help system was able to start up and if so what port was assigned. If the help system started and got a port number you can then try to open a url such as http://localhost:<port>/help/about.html . If that opens the help system has started and the problem is somewhere in the jsp processing. When I go to Help > About Eclipse > Installations Details > Plugins, org.eclipse.help.webapp_3.4.1.v20100727.jar is not being loaded. Is the plugin not being loaded an issue that can be resolved, or should I look into another system for my help documentation needs? The plug-in not being loaded is the problem and is definitely solvable. Copying a new plug-in to the plugins directory using the same name as the one it is replacing should work, however there is an easier way to replace one plug-in. File/Export/Deployable Plugins and Fragments will take you to a dialog where you have the option to install into host repository, which will replace the plug-in and do the necessary bookkeeping to let the Eclipse runtime know to use this new plug-in. Thanks! Copying the plugin with the same name did the trick! Created attachment 189041 [details]
Patch which allows application/xhtml+xml for all Mozilla based browsers
I have committed the patch which allows the application/xhtml+xml mime type for all Mozilla based browsers. I had considered adding a customization preference to control this behavior but I think that most users will find it easier to use a different browser rather than editing plugin_customization.ini. |