Visualizing your document

Are you missing a feature? Request its implementation here.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Visualizing your document

Post by Zby »

I'd love it if Oxygen had a feature to visualize the edited document. I mean, when I work with DocBook documents, I often have to show my peers how the output will roughly look like. I can't do this with Oxygen. So I switch to XMLMind XML Editor, load the document and voila! I can even customize the appearance of the DocBook document in XXE by editing its CSS files.

But this is very annoying I have to use two different tools. (Of course, I can always transform the input to PDF, but this can take much more time and I don't need the accurate look of the output.)

So, it would be nice to have a button that would apply a customizable stylesheet to the input and switch to the WYSIWYG view of the edited document. And if from this view I could click on the text to get back to the source editor, it would be great. I think it is feasible, XXE guys did it. Just think in terms of usability.

I don't want a WYSIWYG editor. I have tried Vex and XXE and found them very difficult in use because it is hard to determine the position of the cursor while editing.

-Zby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

We added the request on our todo list and we will think how this will be implemented.

Best regards,
Sorin
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Well, this doesn't seem to be extremely difficult. Oversimplifying, all you need is to incorporate a bit customized web browser module that supports CSS and simplified, very fast transformation from DocBook to HTML. You don't have to be 100% accurate with this transformation, especially when it comes to rendering the title pages and other layout-related elements (headers, footers, footnotes).

rgds,

-Zby
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Is enough if you add the following processig instruction in your XML document

Code: Select all

<?xml-stylesheet href="docbook.css" type="text/css"?>
and load the document in a browser ? You can write a file docbook.css that formats the document elements similar with a DocBook HTML transformation and see the result in a normal web browser.

Best regards,
Sorin
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Well, I don't think so.
A web browser fails on resolving entities, at least Firefox/Win. MSIE doesn't even give any output.
Any browser probably will also not be able to render the document quite correctly, since CSS stylesheets are not the same as XSL stylesheets.

However, I'd appreciate if readers of the forum have any suggestions.

Tks,
-Zby
smaug42
Posts: 44
Joined: Tue May 25, 2004 2:27 pm

Post by smaug42 »

Maybe I'm missing the point of this thread... but what I have is an XSL defined (that maps my Docbook and custom tags to HTML tags). When I need to show the output of some page to someone I just click the transform button in the Oxygen buttonbar and do a (Xalan) transform from XML to HTML (my custom transform is called Preview). The results pop up in the default browser. Works fine.. it's nice and fast... seems to do exactly what you're asking for.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

smaug, as a workaround, one can use <xml-stylesheet> and browse the source docbook file in a web browser. But this solution has some drawbacks, for example entites are not resolved, also XInclude doesn't work.

You say your transformation is fast. It all depends on the power of your PC and size of the source file. I think the fastest transformation is that done by the web browser. I have checked this myself.

However, I need more than just displaying the source. I need a smooth transition from the source file editor and the rendered output and back. And again, the fastest solution is the workaround with <xml-stylesheet>. You display the file and then, if you want to edit, just switch back to the editor, and then refresh the page in the web browser. But you have to use two applications instead of one, Oxygen.
Zby
Posts: 36
Joined: Tue Apr 05, 2005 10:52 am

Post by Zby »

Just a hint for developers who's going to implement (if so) this feature. This visualization should support inclusions via entities and XInclude. Styling the XML with CSS in a web browser doesn't resolve entities nor XIncludes.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hi Zby,

Thank you for your suggestions. We are planning to add visualisation support for documents styled with CSS in a future version.

Thank you,
Sorin
Post Reply