Issue 110762 - Merged table cells not supported by docbook import/export
Summary: Merged table cells not supported by docbook import/export
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: OOo 3.2
Hardware: PC Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo, oooqa
: 110847 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-04-10 13:30 UTC by malat
Modified: 2013-08-07 14:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Table Test (19.11 KB, application/vnd.oasis.opendocument.text)
2010-04-10 13:31 UTC, malat
no flags Details
Bogus Export to docbook (8.19 KB, text/plain)
2010-04-10 13:32 UTC, malat
no flags Details
Proposed Fixed Docbook Export (8.23 KB, text/plain)
2010-04-13 14:25 UTC, malat
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description malat 2010-04-10 13:30:51 UTC
Hi. I cannot export a table in odt format to docbook.

Attaching the odt file.
Comment 1 malat 2010-04-10 13:31:40 UTC
Created attachment 68850 [details]
Table Test
Comment 2 malat 2010-04-10 13:32:08 UTC
Created attachment 68851 [details]
Bogus Export to docbook
Comment 3 eric.savary 2010-04-10 13:49:48 UTC
Please detail:
- your system
- your OOo version
- what you understand with "doesn't work", "bogus", "cannot export"
Comment 4 malat 2010-04-10 14:10:32 UTC
Sorry for my initial post, it was indeed lacking informations. 

I am working on a debian/stable (5.0.4) system. Using openoffice 3.2:

$ apt-cache policy openoffice.org
openoffice.org:
  Installed: 1:3.2.0-4~bpo50+1
  Candidate: 1:3.2.0-4~bpo50+1

The docbook file after export does contains most information, however one can
notice that the third row does not display properly. It contains:

         <row>
            <entry>
               <para>Clinical Trial Subject</para>
            </entry>
            <entry>
               <para>C.7.1.3</para>
            </entry>
            <entry>
               <para>U</para>
            </entry>
         </row>


while it should be more like:

         <row>
            <entry>
               <para/>
            </entry>
            <entry>
               <para>Clinical Trial Subject</para>
            </entry>
            <entry>
               <para>C.7.1.3</para>
            </entry>
            <entry>
               <para>U</para>
            </entry>
         </row>


I am not a docbook expert, so there might be other tricks for a row to contains
only 3 entry elements, but the table layout should describe this layout.

Hoping to be clear this time.

Thanks !
Comment 5 eric.savary 2010-04-10 14:16:57 UTC
@SUS: I couldn't find a spec for our docbook export.
Please evaluate if bug or unsupported feature.
Comment 6 malat 2010-04-13 14:25:31 UTC
Created attachment 68901 [details]
Proposed Fixed Docbook Export
Comment 7 malat 2010-04-13 14:26:41 UTC
Looking into docbook details. It appears the proper fix for this is:

         <row>
            <entry morerows="1">
               <para>Patient</para>
            </entry>
            <entry>
               <para>Patient </para>
            </entry>
            <entry>
               <para>C.7.1.1</para>
            </entry>
            <entry>
               <para>M</para>
            </entry>
         </row>

Ref:
http://www.docbook.org/tdg/en/html/entry.html
Comment 8 malat 2010-04-13 14:54:39 UTC
Here is the local patch I am using:


$ cat /usr/lib/openoffice/basis3.1/share/xslt/docbook/sofftodocbookheadings.xsl
...
	<xsl:template match="table:table-cell">
		<xsl:element name="entry">
			<xsl:if test="@table:number-rows-spanned >'1'">
				<xsl:attribute name="morerows">
					<xsl:value-of select="number(@table:number-rows-spanned)-1"/>
				</xsl:attribute>
			</xsl:if>
Comment 9 eric.savary 2010-04-13 23:50:48 UTC
*** Issue 110847 has been marked as a duplicate of this issue. ***
Comment 10 malat 2010-04-14 08:38:19 UTC
Since issue 110847 has been marked as duplicate, the title should be changed from:

Merged table cells not supported by docbook export

into

Merged table cells not supported by docbook import/export