Page 1 of 1
Visualizing your document
Posted: Wed Jun 01, 2005 2:39 pm
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
Posted: Thu Jun 02, 2005 6:50 pm
by sorin_ristache
Hello,
We added the request on our todo list and we will think how this will be implemented.
Best regards,
Sorin
Posted: Fri Jun 03, 2005 11:23 am
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
Posted: Fri Jun 03, 2005 3:29 pm
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
Posted: Mon Jun 06, 2005 11:42 am
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
Posted: Thu Jun 23, 2005 12:51 pm
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.
Posted: Wed Jun 29, 2005 11:32 pm
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.
Posted: Mon Jul 04, 2005 1:37 pm
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.
Posted: Tue Jul 05, 2005 9:25 am
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