B.S.Navin wrote:
> I am using XXE Standard Edition for editing some docbook documents. I
> had a revision history in the docbook document (shown below):
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";>
> <article>
>   <articleinfo>
>     <title>Test Doc</title>
> 
>     <revhistory>
>       <revision>
>               <revnumber>0.1</revnumber>
>               <date>11 April, 2005</date>
>               <authorinitials>XYZ</authorinitials>
>               <revremark>Initial Draft</revremark>
>       </revision>
>       <revision>
>               <revnumber>0.2</revnumber>
>               <date>12 April, 2005</date>
>               <authorinitials>XYZ</authorinitials>
>               <revremark>After review comments</revremark>
>       </revision>
>     </revhistory>
>   </articleinfo>
>   
>   <section>
>     <title></title>
>     <para></para>
>   </section>
> </article>
> 
> I wanted the revision history displayed as a table in the XXE view. So
> I created the following CSS:
> 
> @import url(xxe-config:docbook/css/docbook.css);
> 
> revhistory:before {
>       content: "Revision History";
> }
> 
> revhistory {
>       display: table;
>     border-style: solid;
>     border-width: 1;
>     margin: 1.33ex 0;
> }
> 
> revision:before { 
>       display: inline;
>       content: "";
> }
> 
> revision {
>     display: table-row; 
> }
> 
> revnumber, revision date, revision authorinitials, revremark, revdescription {
>     display: table-cell;
>     border-style: solid;
>     border-width: 1;
>       font-weight: normal;
>     padding: 2; 
> }
> 
> revnumber:after, revision date:after, revision authorinitials:after {
>     content: "";
> }
> 
> The table gets created, but each of the children of the "revision" tag
> is displayed in a new row, although I have given the display type for
> the children as "table-cell".
> 
> Any ideas as to why this is happening & how I can solve this?

The problem comes from this CSS rule (found in 
<XXE_install_dir>/config/docbook/css/docbook2.imp) which applies to the 
revhistory found in your example (rev.docb).

---
articleinfo > * {
     display: block;
     text-align: left; /* Reset paragraph styles */
     font: normal normal 1em sans-serif;
     color: black;
     margin-left: 18ex;
     margin-right: 0;
     margin-top: 1.33ex;
     margin-bottom: 1.33ex;
}
---

There is probably a bug in the CSS engine because, in XXE, this rule 
seems to have a specificity (or a rank?) higher than the one of:

---
revhistory {
     display: table;
     ...
}
---

The workaround is to artificially increase the specifity of your rule:

---
articleinfo > revhistory {
     display: table;
     ...
}
---

See attached files for a working example. Rev.css (displayed in rev.gif) 
contains an interesting variation on what you did.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rev.docb
Type: text/xml
Size: 803 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050412/e4a7de56/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rev.css
Type: text/css
Size: 1586 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050412/e4a7de56/attachment.css
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rev.gif
Type: image/gif
Size: 7830 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050412/e4a7de56/attachment.gif
 

Reply via email to