Browser preview

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jabberwocky
Posts: 3
Joined: Fri Sep 01, 2006 8:18 pm

Browser preview

Post by jabberwocky »

I'm a newbie to OxygenXML. OK, so I've written my XML document, have my CSS completed, and now want to take a peek at the output in the web browser. Any easy way?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

If you attach the CSS stylesheet with an xml-stylesheet processing instruction inserted directly in the XML document outside the root element of the document you have to use a Web browser. Usually the view displayed in the browser is similar to the <oXygen/>'s syntax colored editor.

If you insert the CSS in the (X)HTML result of an XSLT transformation you can see a preview of your (X)HTML transformation result by enabling Show As XHTML in the Output tab of the transformation scenario edit dialog. When you run the transformation scenario the XHTML preview of the result is displayed automatically at the bottom of the <oXygen/> window. As you can see in the screenshot the Show As XHTML option cannot be enabled at the same time with Open in browser as the Open in browser option opens the (X)HTML result directly in the browser configured in Options -> Preferences -> Global -> Default Internet browser or in the default Web browser set on your computer if there is no browser configured in Options.

Regards,
Sorin
KateBowers
Posts: 1
Joined: Fri Dec 23, 2011 12:12 am

Re: Browser preview

Post by KateBowers »

I have the CSS instruction at the front of my document, but I cannot figure out how to preview this in a browser. I could not even find where to change the default browser.

When I click on the "Open in system application" button it shows a preview, but the CSS styles I'm seeing in the Oxygen XML editor do not appear in the preview. For example, I don't see white space, I get the bolds but not the headers, etc.

I thought in v. 12 of Oxygen that there was a simple "preview in browser" button, but I can't find one in v. 13.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Browser preview

Post by sorin_ristache »

Hi Kate,

Oxygen does not influence the web browser and the way it represents the XML file when the file is opened for preview. Both Oxygen and the web browser apply the CSS instruction xml-stylesheet which provides the path of the CSS file. If it is the same version of the CSS stylesheet when you view the XML document both in Oxygen Author and in the web browser (that is, the CSS file was not modified or overwritten by other application between opening the XML file in Oxygen and in the web browser) but the browser view is still different please check that the CSS stylesheet does not contain an Oxygen extension function. The web browser will stumble on the Oxygen extension from the CSS and probably stop rendering the XML document.

Can you post here two small sample files (XML + CSS) or send the files using the problem report page so that we can reproduce the problem?


Thank you,
Sorin
Post Reply