Issue 18569 - add translation of <text:bookmark> to docbook <anchor>
Summary: add translation of <text:bookmark> to docbook <anchor>
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Code
Component: external filters (show other issues)
Version: OOo 1.1 RC3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.4
Assignee: jogi
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-23 14:27 UTC by con.hennessy
Modified: 2009-07-20 14:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description con.hennessy 2003-08-23 14:27:00 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>
Comment 1 h.ilter 2003-08-25 12:26:33 UTC
Reassigned to JSI
Comment 2 jogi 2003-08-25 14:08:31 UTC
JSI->James: Enhancing/Get better quality of the DocBook filter makes
sense.
Comment 3 jogi 2003-08-25 14:09:44 UTC
Set the sub component correctly.
Comment 4 jogi 2003-08-25 14:16:24 UTC
Re-Assigning to Lars.
Comment 5 lo 2003-09-01 13:52:45 UTC
ok
Comment 6 lo 2004-07-29 17:00:53 UTC
this is actually an enhancement
Comment 7 lo 2004-07-30 14:11:36 UTC
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
Comment 8 lo 2005-12-13 13:38:42 UTC
xml filter for you
Comment 9 ralfhauser 2007-05-20 12:02:40 UTC
see also Issue 27424
Comment 10 svante.schubert 2007-06-20 12:14:38 UTC
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.
Comment 11 svante.schubert 2007-06-20 19:08:22 UTC
Take test document from issue i30494
Comment 12 svante.schubert 2007-06-20 21:46:58 UTC
changed target
Comment 13 svante.schubert 2007-07-20 13:32:09 UTC
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.



Comment 14 svante.schubert 2007-08-07 08:26:27 UTC
Postponed to next release as there were too many CWS/issues waiting for the OOo
2.3 release to be integrated. 
Comment 15 jack.warchold 2007-08-30 15:06:46 UTC
seen good in cws xsltfilter08

set to verified
Comment 16 thorsten.ziehm 2009-07-20 14:40:39 UTC
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