← Prev in month
← Prev in thread
Newbie trying to make htmlhelp.dsl modifications
Hello,
I'm working on a project where we use docbook to generate the user
documentation. The html-output is used for the online help system which
is displayed using Qt Assistant - a program very similar to mswindows
help. This program needs a "profile" - an xml file that specifies the
structure of the document and the keywords. I found a stylesheet called
htmlhelp.dsl, which generates such files for mswindows help system and
modified it to generate a Qt assistant profile for me, and it almost
works. I have one minor problem, which is that the links I generate in
the profile for indexterm's are (slightly) wrong! I really have no idea
how to fix this problem, since I don't really understand how the
stylesheet works, my modifications are merely done using mental pattern
matching :-)
(mode qtassistantkeywords
;; this mode is really just a hack to get at the root element
(root (process-children))
(default
(if (node-list=? (current-node) (sgml-root-element))
(process-node-list (select-elements
(descendants (current-node))
(normalize "indexterm")))
(empty-sosofo)))
(element indexterm
(make sequence
(make formatting-instruction data: "\less-than-sign;keyword")
(make formatting-instruction data: (string-append " ref=\"" (href-to
(current-node)) "\""))
(make formatting-instruction data: "\greater-than-sign;")
(process-children)
(make formatting-instruction data:
"\less-than-sign;/keyword\greater-than-sign; ")))
(element primary
(htmlhelpindexterm))
)
An example of the problem I get is that for a particular section in the
html generated from a docbook section with an indexterm I might have an
anchor labeled AEN95, but the link I generate in the profile uses the
anchor #AEN97.
Furthermore if give a section og chapter an id, that id will be used as
the name in the html, but my generated index still uses the
AEN[XX]-thingy.
I've attached the stylesheet and the desired output format is documented
here, if you are interested:
http://doc.trolltech.com/3.3/assistant-6.html
Your help is appreciated.
br,
Thomas Sondergaard
← Prev in month
← Prev in thread