Fredrik
Fredrik

Reputation: 10656

Set a content-typ in eclipse infocenter for *.xsd files?

We have a java server running an eclipse infocenter. The setup is standard; pretty much according to the help. One of our plugin helps have links to a XSD file and we want to be able to display that. The problem is that the XSD schema is shown as text/plain instead of text/xml.

How can we set the content type of the filetypes?

Edit: The infocenter requires the plugins:

org.apache.lucene
org.eclipse.core.runtime
org.eclipse.help
org.eclipse.help.appserver
org.eclipse.help.base
org.eclipse.help.webapp
org.eclipse.osgi
org.eclipse.tomcat
org.eclipse.update.configurator

So I'm guessing the server is a tomcat

Upvotes: 0

Views: 123

Answers (2)

Fredrik
Fredrik

Reputation: 10656

So the answer to this problem is that there is a file in the Jetty server that determines how to handle different filetype. For *.xsd it is defaulted to text/plain.

The solution was to decompile org.mortbay.jetty*.jar, change the file mime.properties by adding xsd = application/xml at the end. And then recompiling it again.

Piece of cake. Only took two years to find out :)

Upvotes: 1

Fabian Steeg
Fabian Steeg

Reputation: 45744

Though I'm not exactly sure about your setup, adding a dependency on org.eclipse.wst.xsd.ui would add the XSD editor to an Eclipse application in general.

Upvotes: 0

Related Questions