Syntext Forums - Serna Enterprise XML Editor, Serna Free XML Editor
(#1 (permalink))
Old
Junior Member
 
Posts: 26
Join Date: Jul 2009
Default Ditamap in Resolved mode - which topicref is current? - 09-15-2009, 03:39 PM

I'm using Serna 4.2 Open Source, and for a ditamap document there is an XSLT parameter set "Show Resolved". How can I get a current position in the map document (which topicref is selected) from a Python plugin? The simple "getSrcPos" method returns a position inside included topic.
Reply With Quote
(#2 (permalink))
Old
apg apg is offline
Administrator
 
Posts: 53
Join Date: Mar 2009
Default 09-17-2009, 02:34 PM

Note that editing DITA maps in expanded view is considered experimental. It can be turned off by removing 'read-write' option from xse:document-mode attribute in map2fo.xsl.

However, if you want to play with this, it is possible to determine your position by traversing the FO tree: use getFoPos(), then for each parent node, use getOrigin() to get origin of this FO node in the source tree. At some point it will point to the topicref element.
Reply With Quote
(#3 (permalink))
Old
Junior Member
 
Posts: 26
Join Date: Jul 2009
Default current topicref - 09-17-2009, 03:27 PM

Thanks, I'll play with this - the feature is VERY useful, I'm glad that it was added in the new version of the editor
Reply With Quote
(#4 (permalink))
Old
apg apg is offline
Administrator
 
Posts: 53
Join Date: Mar 2009
Default 09-18-2009, 04:13 PM

Just keep in mind that this thing is not tested, and things like auto-save may not work with this correctly.
Reply With Quote
Reply

Bookmarks

Tags
cursor position, ditamap, sapi, topicref

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.1
vBulletin Skin developed by: vBStyles.com