Page 1 of 1

OMERO.editor: print and export?

PostPosted: Mon Sep 26, 2011 3:51 pm
by Dario.Bottinelli
Hi,
I started using OMERO.editor to write protocols. It is possible to print protocols or to export them in text editor format?
Sorry but I did not find anything about that in the software, tutorials and FAQs.
Thank you very much.

Dario

Re: OMERO.editor: print and export?

PostPosted: Wed Sep 28, 2011 8:45 am
by wmoore
Hi Dario,

This is possible to print, but you have to follow one or more steps, depending on what Browser you use.
- Save the editor file locally (E.g. on your Desktop)
- Open this file in your browser.

This will be all you need to do if your browser displays the file OK. You can expand/collapse any field hierarchies you have, show/hide data tables & descriptions and toggle the name of each parameter (just try clicking the various 'links'). I'll attach a screen-shot.

The browser uses a remote style-sheet to transform the editor file xml into html for display in the browser. The reason that this doesn't work in some browsers is that their security settings don't allow this.
- Safari works OK
- Firefox and Chrome don't work.

The solutions are to use a different Browser (E.g. Safari) or...

If you download the style-sheet at http://cvs.openmicroscopy.org.uk/snapsh ... r2html.xsl
and put it where you save your Editor files (E.g your Desktop).

Now you need to edit the OMERO.editor configuration file, so that the files that are exported know where to find the style sheet:
Look in your OMERO.clients folder (where Insight and Editor are), look in the 'config' folder for 'editor.xml'. If you edit this XML, changing the line

Code: Select all
<!-- The location of the style-sheet, for viewing files in a browser.-->
<entry name="/xml/editor.xsl">http://cvs.openmicroscopy.org.uk/snapshots/omero/editor/xsl/cpeEditor2html.xsl
</entry>


like this:

Code: Select all
<!-- The location of the style-sheet, for viewing files in a browser.-->
     <entry name="/xml/editor.xsl">cpeEditor2html.xsl</entry>


Save this file.
Now, whenever you export an Editor file (and put it in the same place as the cpeEditor2html.xsl style sheet) it should display OK in any browser!

Hope that works OK for you.
I'll maybe add these notes to the documentation.

Cheers,

Will.

Re: OMERO.editor: print and export?

PostPosted: Mon Oct 03, 2011 12:04 pm
by Dario.Bottinelli
Hi Will,

Thank you, it works very well.

I have another question for you: we plan to use a wiki to organize our work, we would like to attach the protocol files to wiki pages. It is possible to open the cpe.xml files with the browser directly without downloading them? I think it would be very useful for people who are interested in having a look to the protocols without editing them.

Thank you in advance.

Best regards.

Dario

Re: OMERO.editor: print and export?

PostPosted: Thu Oct 06, 2011 3:31 pm
by wmoore
Hi Dario,

If you look at this page, and click on any of the links, you should see the files displayed directly in the browser.
http://cvs.openmicroscopy.org.uk/snapsh ... index.html

This is actually the same page that provides the on-line example files in the Editor. If you go to "Open File from Web", you will see the link under "Browse these Protocols" which opens the page above in your browser.

All you have to do if you want to host your own protocols is make them available on the web and make sure that they point to the style-sheet that is also hosted by you (to avoid the security problem I mentioned above). I believe if you edit the location as below to "cpeEditor2html.xsl" and put this style sheet in the same directory as the Editor files then this should work. They will still be requesting javacript, images and css from http://cvs.openmicroscopy.org.uk/snapsh ... ditor/xsl/ but this is OK as long as you are happy to reply on our hosting.

You can also edit existing Editor files directly to point to the style-sheet. This is the second line of the file:
Code: Select all
<?xml-stylesheet href="http://cvs.openmicroscopy.org.uk/snapshots/omero/editor/xsl/cpeEditor2html.xsl" type="text/xsl"?>


Hope this works for you.

You can also make these online files available directly in the Editor (instead of using the demo files provided), as described here: http://trac.openmicroscopy.org/ome/wiki ... lsTutorial

Cheers,

Will.