I'd like to add that writing a CSS for your set of used DocBook elements may not prove to be as hard as writing the CSS for the near 400 elements DocBook has, which was what XXE developers have done with the CSS included in XXE.
So, don't feel discouraged, and feel free to write your own CSS taking into account only the elements you use on your documents (I'm sure they are way less than 400, maybe not more than 30 or 50). Some elements may need special handling depending on context, like <para> (for example, rendered different if it's part of a list, or a note). Good luck ! On 8/3/07, Hussein Shafie <hussein at xmlmind.com> wrote: > Mike Maxwell wrote: > > I know it's possible (and easy!) to convert a DocBook file to XHTML > > using the Professional version of XXE. However, my (mis?)understanding > > was that I should also be able to attach a CSS to a DocBook file (via > > the <?xml-stylesheet ... ?> processing command) and display it directly > > in an internet browser. (And I was thinking that the syntax used for > > CSS extensions, as described in chapters 3 and 4 of the CSS Support > > Guide, would be ignored by the browser.) > > > > However, I can't make this work, at least not with the css's supplied > > with XXE. That is, I used the following line (here wrapped): > > > > <?xml-stylesheet type="text/xsl" href="file:/C:/Program > > Files/XMLmind_XML_Editor/addon/config/docbook/css/docbook.css"?> > > > > But both FireFox and Internet Explorer choke on the '/*...*/' style > > comments in XMLmind_XML_Editor/addon/config/docbook/css/docbook.css. > > No, this cannot be true. > > http://www.w3.org/TR/REC-CSS2/syndata.html#comments > --- > Comments begin with the characters "/*" and end with the characters > "*/". They may occur anywhere between tokens, and their contents have no > influence on the rendering. Comments may not be nested. > --- > > However, FireFox and Internet Explorer almost certainly choke on dozen > other rules and properties contained in docbook.css. > > > > > > I'm guessing my understanding was simply wrong, that the CSS's which > > ship with XXE are tailored to be used only by XXE. > > Yes, that's true for the DocBook CSS style sheets. However we didn't > repeat that mistake for DITA. > > In the DITA CSS style sheets, everything which is specific to XXE is > enclosed in "@media XMLmind-XML-Editor {}" blocks. See > http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/gencontentext.html > > After doing this, we tested the DITA CSS style sheets with IE, Mozilla, > Opera. In all cases, the result was *pathetic*. (Web browsers are > excellent at supporting most CSS features but are very bad at supporting > other, rarely used on the Web but critical for XXE, features.) > > > > > > If that is true, are > > there other CSS's which allow raw DocBook files to be viewed in more or > > less their formatted form in Internet browsers? (I realize that last > > question is outside the scope of this mailing list...) > > Just note that writing an acceptable CSS for DocBook took us more than > 10 days of work, 10 hours a day. DocBook has more than 400 elements, and > many of them are obscure (e.g. the "msg*" elements -- > http://www.docbook.org/tdg/en/html/msg.html). > > > > -- > XMLmind XML Editor Support List > xmleditor-support at xmlmind.com > http://www.xmlmind.com/mailman/listinfo/xmleditor-support > -- Fabi?n Mandelbaum IS Engineer

