CSS not applied and validtor issue on default docbook.css

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jlat
Posts: 1
Joined: Wed Sep 08, 2010 11:17 am

CSS not applied and validtor issue on default docbook.css

Post by jlat »

HI

I am new to docbook and am using a trial version of Oxygen Author on Mac OS 10.4.11. I am also not very familiar with xsl or css. I hope this is the right forum for this query.

When I look at the docbook 5.0 sample.xml in the Author Editor I can see that there are 2 stylesheets available, the default and a hide cols option. Currently, if I try and do a Docbook HTML transformation, the resultant HTML seems to have none of the stylesheet formatting applied. The same output is generated for both the default and hide colspec stylesheets. When I edit the docbook.css file and change the font-family to sans-serif for section titles, I can see the change in the Editor window, but these changes are not applied to the generated html, although when I perform the transformation, it reports that the transformation is successful.

Also, when I open the default docbooks.css in the editor, I see that there are a number of validator errors, some of which I have pasted below along with the offending sections of the css.

Do the css options configured for the doctype that can be selected in the editor when in Author mode, only apply to the Author window? Are they not related to the html transformation? Is there some preprocessing done on the css stylesheets which would explain the strange validator errors when you view the stylesheet in the editor?

Does the html transformation simply apply the xsl stylesheets to the docbook xml? I can't see any css references in the generated html.

I look forward to any insights into this.

Kind regards
Jacqui

seealso {
 display: morph;
 font-size: small;
}
E [W3C CSS Validator] Context : indexterm, primary, secondary, tertiary, see, seealso in property : display
 morph is not a display value : morph

/*
 * Support for displaying unparsed entityref images.
*/
graphic[entityref],
inlinegraphic[entityref],
imagedata[entityref]{
 content: url(unparsed-entity-uri(attr(entityref))); 
}

E [W3C CSS Validator] Context : graphic[contentwidth], inlinegraphic[contentwidth], imagedata[contentwidth] in property : width
 attr(contentwidth,length) is not a width value : attr(contentwidth,length)
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: CSS not applied and validtor issue on default docbook.css

Post by adrian »

Hello,

The CSSs you see in the CSS combo only apply to the Author view of the document, they do not affect the result of the XSLT transformation.
Also, the two CSSs seen in the combo are actually docbook.css and hideColspec.css from [oxygen-installation-folder]\frameworks\docbook\css.
So what you are modifying there only affects what you see in the Author mode.

These CSSs may have errors when validated with the CSS 2.1 validator because they contain some changes/additions specific to Oxygen. These CSSs are applied to the original DocBook document and they cannot be transformed to be applied to the HTML output, though that would be an interesting feature.

If you want to customize the HTML output you have to know a bit of XSLT and make changes to [oxygen-installation-folder]/frameworks/docbook/xsl/html/docbook_custom.xsl. This is the stylesheet that is used during the default transformation to HTML.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply