Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

View XML or Docbook files

2 views
Skip to first unread message

Nick Coleman

unread,
Apr 17, 2004, 10:34:06 PM4/17/04
to
How do I get xml files (mainly docbook ones in /usr/share/doc) to
display 'correctly' in Opera? At the moment, it displays as one long
sentence, without line breaks or spacing.


--
Nick
Mandrake 9.2
KDE 3.1.3

Rijk van Geijtenbeek

unread,
Apr 19, 2004, 9:22:38 AM4/19/04
to
On Sun, 18 Apr 2004 12:34:06 +1000, Nick Coleman
<spambucketPoke...@iinet.net.au> wrote:

> How do I get xml files (mainly docbook ones in /usr/share/doc) to
> display 'correctly' in Opera? At the moment, it displays as one long
> sentence, without line breaks or spacing.

Plain XML without styling information has no 'correct' display, apart from
rendering all the content inline. If the styling is not defined, the other
option is to simply show the XML tree structure, like Firefox and MSIE do.

If the vocabulary is known, you could apply a user stylesheet to style the
contents. I found such a stylesheet with a little Googling [1], and
adapted it a little to make it suitable as a user stylesheet.

* Download the file docbook.css from
<URL:http://people.opera.com/rijk/opera/css/docbook.css>
* Edit the Local CSS files. Under Linux, this is a separate ini file IIRC.
Add an antry that points to the file 'docbook.css' that you just stored in
a suitable place, and use an appropriate Title value.
* After a restart, you should now have an extra option in the User styles
dropdown.

[1] http://www.badgers-in-foil.co.uk/projects/docbook-css/

You might ask 'why doesn't Opera do this by default', but that would only
be workable for file formats that can easily be identified and have
well-defined rendering expectations.

--
The Web is a procrastination apparatus: | Rijk van Geijtenbeek
It can absorb as much time as | Documentation & QA
is required to ensure that you | Opera Software ASA
won't get any real work done. - J.Nielsen | mailto:ri...@opera.com N

Nick Coleman

unread,
Apr 19, 2004, 8:02:27 PM4/19/04
to
Rijk van Geijtenbeek wrote:


> Plain XML without styling information has no 'correct' display, apart
> from rendering all the content inline. If the styling is not defined,
> the other option is to simply show the XML tree structure, like
> Firefox and MSIE do.
>
> If the vocabulary is known, you could apply a user stylesheet to style
> the contents. I found such a stylesheet with a little Googling [1],
> and adapted it a little to make it suitable as a user stylesheet.
>
> * Download the file docbook.css from
> <URL:http://people.opera.com/rijk/opera/css/docbook.css>
> * Edit the Local CSS files. Under Linux, this is a separate ini file
> IIRC. Add an antry that points to the file 'docbook.css' that you just
> stored in a suitable place, and use an appropriate Title value.
> * After a restart, you should now have an extra option in the User
> styles dropdown.
>
> [1] http://www.badgers-in-foil.co.uk/projects/docbook-css/
>
> You might ask 'why doesn't Opera do this by default', but that would
> only be workable for file formats that can easily be identified and
> have well-defined rendering expectations.
>

Thank you very much -- that works great. I did google for it, but I
guess you are a better googler than me ;).

0 new messages