Apache OpenOffice (AOO) Bugzilla – Issue 51180
DocBook <title> -> <para>
Last modified: 2013-02-07 21:55:24 UTC
Create the following test_dbk.xml (sorry, the bug reporting page has no upload ability): <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> <article lang="en-US"> <articleinfo> <title>Testing Docbook Import</title> <subtitle>OpenOffice Testing</subtitle> <edition/> </articleinfo> <sect1> <title>Introduction</title> <para>The import fails to give the right styles to the right paragraphs. Noteably the first paragraph in this document should be in the style: Document Title.</para> </sect1> </article> Import into OpenOffice (as a docbook file) While the DocBook filter is far from ideal, the first paragraph is specified as having a style-name of Document Title. All paragraphs seem to import as default, regardless of what style-name they are given.
Created attachment 27458 [details] .xml file as included in bug description
Reassigned to ES.
->JSI: Docbook issue. Please have a look.
changing comp.
change subcat
Yes, also using the template in $Officepath/share/xslt/docbook/... generates only <article lang="en-US"> <para>Testing Docbook Import</para> </article> instead of <title>Testing Docbook Import</title> <subtitle> isn't supported from the SAMPLE filter: http://xml.openoffice.org/xmerge/docbook/DocBookTags.html
It's an regression to OOo 1.1.4+
.
I think this is missing the point of the bug report. The bug is that the first paragraph of the generated document does not have the right paragraphy style. The generated .sxw XML specifies the first paragraph's style to be Document Title, but all the paragraph styles appear as default. It is not a docbook.xsl issue, but an OpenOffice xml import issue. To give further evidence of this, enclosed is a .zip file containing a MyDocbook.jar filter set (notice that the output OO->XML filter does not and is not designed to work since it is a copy of the sxw docbook based one) and the same sample test_dbk.xml. To show the problem, complete the following: 1. Install the mydocbook.jar xml filter package 2. type soffice test_dbk.xml - notice that the mydocbook xml filter is not registered (another bug, probably requiring its own bug report) 3. choose docbook, just to get the thing to open 4. Tools/XML Filter Settings 5. Choose MyDocbook 6. Press Text XSLTs... 7. select Import/Display Source 8. Import/Browse to test_dbk.xml 9. Select the displayed text 10. Open a text editor somewhere and paste into a new file 11. Save new file as content.xml 12. unzip the referenced .ott template into a temporary directory 13. copy the saved content.xml over the content.xml in the temporary directory 14. edit META-INF/manifest.xml and remove -template from the vnd.oasis.opendocument.text-template attribute value 15. zip up the temporary directory as test_dbk.odt 16. open test_dbk.odt in soffice 17. Notice that the document opens fine (I hope ;)) This shows that the XSL is generating correct XML for import into OpenOffice and therefore that the issue is not with the import filter but with the OpenOffice importing of the XML.
Created attachment 27468 [details] test XML document and filter package
yours
Won't be able to fix this for OOo 2.0.2, retarget to OOo 2.0.3
Worksforme in SO8 PP2 [and m161 (LATEX filter)] Obviously the issue in the XML import has been fixed...
reopen to reassign
Please verify that this already works with the Office patch of CWS latex (or earlier pp2)
SUS->OC: Please close issue, when if you can agree on WORKSFORME
Does not work, first paragraph is still not a title =reopen
reassigned to development
Correct, there was a missunderstanding on my side about the issue... The issue lies in the import docbook filter, as althoug the paragraph styles are provided in the body, no style with the name, i.e. "Document Title" exist in the style section to be referenced to. <text:p text:style-name="Document Title">Testing Docbook Import</text:p> Therefore the 'default' style is being used, as workaround for this issue. But what style is desired as "Document Title" and "Document SubTitle"? Going to take a look into some docbook pages, but any help is welcome..
Due to other interruptive tasks, I have to postpone this task to the follow up release (pp4). Going to fix it with the other docbook issues I have inherited.
Unfortunately I have to postpone this issue due to other higher prioritized tasks... Changing target to OOo 2.x
see also Issue 27424 and Issue 34944, Issue 51296, Issue 53239
set target 3.x
lowering Prio to 5