Page 1 of 1
Author complains if processing instructions are displayed an
Posted: Wed Jan 26, 2011 10:24 pm
by dcramer
Hi there,
Using DocBook 5.x, if I change the css so that processing instructions are displayed:
Code: Select all
oxy|processing-instruction {
display:inline !important;
}
And I have a document in which processing instructions occur as children of <table> elements, then Oxygen complains:
Code: Select all
SystemID: /home/dcramer/workhead-gitsvn/nac/branches/7.1/en_US/naug/naug.xml
Severity: warning
Description: [Author layout]:Cannot create a table. A table element cannot contain children other than elements and comments.
It would be better to treat processing instructions like comments. In this case, I need to put a <?keep-together?> PI as a child of certain tables.
For now, I've added a second rule just for tables:
Code: Select all
table>oxy|processing-instruction {
display:none !important;
}
But I'd prefer to display those PIs too.
Thanks,
David
Re: Author complains if processing instructions are displayed an
Posted: Thu Jan 27, 2011 1:03 pm
by Radu
Hi David,
Author imposes a strict layout on tables in order to display them.
Indeed comments are ignored and tables can be constructed even if they have comments between rows but those comments will not be visible in the Author page.
Can you show me a small Docbook 5 sample in order to see where exactly the processing instruction occurs?
Regards,
Radu
Re: Author complains if processing instructions are displayed an
Posted: Thu Jan 27, 2011 3:19 pm
by dcramer
Sure, here's an example:
Code: Select all
<table frame="all" pgwide="1" xml:id="bgbcechd">
<info>
<title>Detected problems summary</title></info>
<?bjfo keep-together?>
<tgroup cols="14">
...
I use that PI if I have a short table and I don't want ever to be split across pages.
David
Re: Author complains if processing instructions are displayed an
Posted: Thu Jan 27, 2011 3:20 pm
by dcramer
Btw., in the case of my example, Author displays the PI just fine, but complains about it.
David
Re: Author complains if processing instructions are displayed an
Posted: Thu Jan 27, 2011 4:52 pm
by Radu
Thanks for the additional details.
Indeed it seems that the warning in this case should not be issued.
We'll look into it.
Regards,
Radu
Re: Author complains if processing instructions are displayed an
Posted: Mon Jan 31, 2011 1:15 pm
by Radu
Hi David,
As a workaround in the docbook.css you can set:
as most Docbook cals tables are actually block elements which contain the real table
tgroup inside them.
A fix for this warning will probably be available in Oxygen 12.2.
Regards,
Radu
Re: Author complains if processing instructions are displayed an
Posted: Mon Jan 31, 2011 11:27 pm
by dcramer
That workaround does the trick.
Thanks,
David
Re: Author complains if processing instructions are displayed an
Posted: Tue May 03, 2011 5:14 pm
by dcramer
Hi there,
This workaround no longer works for 12.2 beta. When I display PIs in tables, the tables are no longer formatted correctly (both CALS and HTML tables).
Below are a couple of sample tables with PIs:
Code: Select all
<table
frame="all">
<title>Sample table cals</title>
<tgroup cols="2">
<?rax-fo keep-together?>
<colspec colname="c1" colnum="1" colwidth="1.0*"/>
<colspec colname="c2" colnum="2" colwidth="1.0*"/>
<thead>
<row>
<entry>adfdsf<?dbfo orientation="-90"?>
<?dbfo rotated-width=".95in"?></entry>
<entry/>
</row>
</thead>
<tbody>
<row>
<entry/>
<entry/>
</row>
<row>
<entry/>
<entry/>
</row>
<row>
<entry/>
<entry/>
</row>
</tbody>
</tgroup>
</table>
<table frame="box">
<?rax-fo keep-together?>
<caption>Sample table</caption>
<col width="1.0*"/>
<col width="24.01*"/>
<thead>
<tr>
<?dbfo orientation="-90"?>
<?dbfo rotated-width=".95in"?>
<th>
<para>A very long label</para>
</th>
<th>Another row</th>
</tr>
</thead>
<tbody>
<tr>
<td>Yes<?dbfo orientation="-90"?>
<?dbfo rotated-width=".95in"?></td>
<td>Foo</td>
</tr>
<tr>
<td>No</td>
<td>Bar</td>
</tr>
<tr>
<td>Yes</td>
<td>Wooga</td>
</tr>
</tbody>
</table>
Thanks,
David
Re: Author complains if processing instructions are displayed an
Posted: Wed May 04, 2011 12:03 pm
by Radu
Hi David,
Things should work in the final Oxygen 12.2 even without making the CSS change (I tested my current development snapshot with your sample). The 12.2 beta kit you have which is quite old probably does not contain the changes.
But if you have made the CSS modifications to the docbook.css from the Oxygen 12.2 beta frameworks things should have worked out nonetheless. So strange.
Regards,
Radu
Re: Author complains if processing instructions are displayed an
Posted: Wed May 04, 2011 5:48 pm
by dcramer
Indeed, I had not yet merged in the changed from the new framework.
To do a better test, I've disabled my framework and am using the stock DocBook framework. The About box says "<oXygen/> XML Author 12.2, build 2011032312" (Running on Ubuntu 11.04).
With CALS tables, everything is fine. However, with HTML tables, the behavior is as before: Adding a PI as a child of table or in a cell causes Author to complain and not format the table as a table.
If I add a PI as a child of table, it says:
SystemID: /home/dcramer/Documents/rax/rackspace-cloud-template/src/docbkx/example.xml
Severity: warning
Description: [Author layout]:Cannot create a table. A table element cannot contain children other than elements and comments.
If I add a PI in a th, it says:
SystemID: /home/dcramer/Documents/rax/rackspace-cloud-template/src/docbkx/example.xml
Severity: warning
Description: [Author layout]:Cannot create a table. A table row group cannot be created from element 'thead'.
Thanks,
David
Re: Author complains if processing instructions are displayed an
Posted: Thu May 05, 2011 2:17 pm
by Radu
Hi David,
I re-read the entire post again.
I have forgotten in my previous post that you have processing instructions showing in the Author page.
So the fix indeed was just for the case in which a PI appears in a CALS table (which is not actually the table as it has a <tgroup> as the real table).
I see two more cases in your sample:
1) In an HTML table a PI appears before the actual table content (somewhere near the colspans). I think we can also fix this case, I added an improvement request for it.
2) In a table row you have PIs like:
Code: Select all
<tr>
<?dbfo orientation="-90"?>
<?dbfo rotated-width=".95in"?>
<th>
.......
I don't think we can fix this one without ignoring the processing instructions completely when building the table because the PIs appear directly inside a table row and you also want to view them for editing, but showing them would mean breaking the table structure.
So I think we can fix number (1), but probably in Oxygen 13 as we are getting ready to release 12.2.
Regards,
Radu
Re: Author complains if processing instructions are displayed an
Posted: Thu May 05, 2011 2:59 pm
by dcramer
Oops. For #2, my example was bad. I meant to put those PIs inside the th (or in a td), so you don't have to worry about PIs in a tr.
Thanks,
David
Re: Author complains if processing instructions are displayed an
Posted: Thu May 05, 2011 3:01 pm
by Radu
Great
.
Visible processing-instructions/comments or other elements between cells or rows break the layout and thus will not be supported in future versions.
Re: Author complains if processing instructions are displayed an
Posted: Tue Aug 09, 2011 12:50 pm
by Radu
Hi,
The first case of table + PIs will no longer break the table layout in Oxygen 13 (which will be available in a couple of weeks).
Regards,
Radu