On 10/03/2011 14:58, Dennis Neumann wrote: > Hi guys, > I have a workflow that has HTML text as output from a beanshell. There > is an embedded link inside. Now I have two issues with this: > > 1. > I would like Taverna (2.2) to recognize that it is HTML and set the > Output Value Type to Text/Html automatically. I already tried to > generate correct HTML and XHTML, eg like so: > > output = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 > Transitional//EN\" > \"http://www.w3.org/TR/html4/loose.dtd\"><html><head></head><body><a > href=\"https://myserver.org\">mylink</a></body></html>" > > but it is always shown as Text. Can Taverna do this?
Taverna is using the library eu.medsea.mimeutil for recognising/guessing the MIME type of the result. It seems to recognize as HTML only documents like "<html><head>...</html>", which is not doing the job for you. I will add an issue in our bug tracking system to look into better recognizing text as HTML. > 2. > The link is already clickable and the page is opened in my browser. It > works for links starting with "http://", but if I have a link with > https://, then http:// is automatically added, so I end up with > http://https://myserver.org. > I am aware of the Browser Plugin, but it would be cool to just click on > the link in Taverna. It would. The code that implements HTML rendering uses Java's standard JEditorPane with HTMLEditorKit and that seems to be adding http:// in front of the https:// URLs, which is not good. We have decided to replace this HTML render with a browser in the next release, as we did not find decent libraries with LGPL-compatible licence to do it for us and plus Web browsers are already doing such a good job. If you have a good library to recommend - we would be happy to have a look at it. It will have to be LGPL-compatible to be able to include it in Taverna. Regards, Alex ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ taverna-hackers mailing list [email protected] Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/about/contact-us/ Developers Guide: http://www.taverna.org.uk/developers/
