content:attr(id) rule in docbook.css

Having trouble installing Oxygen? Got a bug to report? Post it all here.
dcramer
Posts: 161
Joined: Sat Aug 28, 2010 1:23 am

content:attr(id) rule in docbook.css

Post by dcramer »

I notice that the rule for the <co/> element in docbook.css is to show the value of the id attribute before the element, yet I don't see the id displayed. However, for other elements, the same function "attr()" does work. I've tried changing the rule for co:before to "content:attr(xml|id);" but that doesn't help.

Code: Select all

co:before{
content:attr(id);
}
Any idea what's up?

Thanks,
David
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: content:attr(id) rule in docbook.css

Post by Radu »

Hi David,

By default the "xml" prefix is reserved and thus the Oxygen Author should match it by default, without specifying the namespace.
So this construct:
content:attr(xml|id);
is correct but it does not yet work in Oxygen.
We will fix this problem and probably also include the fix in an Oxygen 12.1 maintainance build kit.
The RSS will be updated when this happens:
http://www.oxygenxml.com/rssBuildID.xml

The workaround:
1) In the CSS declare the binding for the "xml" prefix like:

Code: Select all

@namespace xml url('http://www.w3.org/XML/1998/namespace');

co:before{
content:attr(xml|id);
}
2) In the XML file declare on the root element the binding for the "xml" prefix: xmlns:xml="http://www.w3.org/XML/1998/namespace"

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dcramer
Posts: 161
Joined: Sat Aug 28, 2010 1:23 am

Re: content:attr(id) rule in docbook.css

Post by dcramer »

Thanks Radu. I'll keep an eye on the rss feed.

David
Post Reply