Apache OpenOffice (AOO) Bugzilla – Issue 18569
add translation of <text:bookmark> to docbook <anchor>
Last modified: 2009-07-20 14:40:39 UTC
The following patch adds the translation of text:bookmark to anchor. This is used in the FAQ for the support.openoffice.org project. =================================================================== RCS file: /cvs/support/www/faq/sofftodocbookheadings.xsl,v retrieving revision 1.1 diff -u -3 -p -r1.1 sofftodocbookheadings.xsl --- sofftodocbookheadings.xsl 23 Aug 2003 12:04:41 -0000 1.1 +++ sofftodocbookheadings.xsl 23 Aug 2003 13:22:52 -0000 @@ -858,5 +858,12 @@ </xsl:choose> </xsl:template> +<xsl:template match="text:bookmark"> + <xsl:element name="anchor"> + <xsl:attribute name="id"> + <xsl:value-of select="@text:name"/> + </xsl:attribute> + </xsl:element> +</xsl:template> </xsl:stylesheet>
Reassigned to JSI
JSI->James: Enhancing/Get better quality of the DocBook filter makes sense.
Set the sub component correctly.
Re-Assigning to Lars.
ok
this is actually an enhancement
I'll need to set this to later for now. When we start a new XSLT cws we can take it back for 2.0
xml filter for you
see also Issue 27424
As I have worked on the DocBook export anyway, I took this patch with me. Validated the output, that anchor can be written beyond para element. Problematic would be the bookmark-start and bookmark-end feature as it does not align necessarily to XML hierarchy. The start could be in one paragraph some graphic in between and the end in a second paragraph. To get close I added bookmark-start aside of text:bookmark.
Take test document from issue i30494
changed target
Works with patch of XSLTFILTER08 There might be complication (invalid output), when the ID of the text:bookmarks does not start with a character (e.g. <anchor id="10-4.24">), which is necessary for an anchor ID being an NCName (see http://www.w3.org/TR/REC-xml-names/#NT-NCName). Added a workaround for the most common case (starting with a number), by adding a '_' as a prefix to remain validness. [Validated with JEdit] Furthermore make the roundtrip possible by adding a similar path to the import filter as well.
Postponed to next release as there were too many CWS/issues waiting for the OOo 2.3 release to be integrated.
seen good in cws xsltfilter08 set to verified
This issue is closed automatically and wasn't rechecked in a current version of OOo. This fixed issue should be integrated in OOo since more than half a year. If you think this issue isn't fixed in a current version (OOo 3.1), please reopen it and change the field 'Target Milestone' accordingly. If you want to download a current version of OOo => http://download.openoffice.org/index.html If you want to know more about the handling of fixed/verified issues => http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues