Getting a mapping between id's and output files

Tom Moore <[email protected]> Tue, 15 Nov 2022 18:49:28 -0500
Newsgroups gmane.text.docbook.apps
Message-ID <CANwy9RQEyZv9JEogOZu5YNpO-e=LorrptTk_TZK_5=WoZOTPew@mail.gmail.com>
--00000000000063f59505ed8b02d1
Content-Type: text/plain; charset="UTF-8"

Hi all

I have a desktop app and I have written documentation for this app in
DocBook.  I am producing webhelp and posting these html pages online.  From
within my application I would like to be able to open pages from the online
webhelp in a local browser.  All of this works nicely so far.

The problem is knowing which page to open for a given topic.  To solve this
problem I would like to produce a file that contains the mappings between
all of the id attributes that are declared in my document and the name of
the chunked html output file that contains the id.  Ideally the mapping
would be to the chunk plus anchor if the element containing the id is not
the outermost section, chapter, appendix, etc of the chunk.  Then from
within my app I can look up the mapping for a given id, and request the
browser to open the desired page.

I expect that this is something that can be done using xslt technology, but
I do not know where to begin.  I am at the skill level where I have made a
few small customizations in a project that used xslt, but I don't really
know how to go about opening a file and writing output, where to find the
id value, where to find the chunk name, etc.   In other words a beginner
looking at the start of a steep learning curve.

Can someone point me in the right direction for this task?  I notice that
the javahelp output creates a mapping file that is almost right, except
that it does not use the chunk names derived from the <?dbhtml
filename=""?> processing instructions, which I am using in order to get
links that don't shift around as I add chapters and sections.  Is the
javahelp tool a good starting point or would it be better to start from
scratch?  Is there a book that you would recommend that is good to learn
from?

Thanks,

Tom

--00000000000063f59505ed8b02d1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi all</div><div><br></div><div>I have a desktop app =
and I have written documentation for this app in DocBook.=C2=A0 I am produc=
ing webhelp and posting these html pages online.=C2=A0 From within my appli=
cation I would like to be able to open pages from the online webhelp in a l=
ocal browser.=C2=A0 All of this works nicely so far.</div><div><br></div><d=
iv>The problem is knowing which page to open for a given topic.=C2=A0 To so=
lve this problem I would like to produce a file that contains the mappings =
between all of the id attributes that are declared in my document and the n=
ame of the chunked html output file that contains the id.=C2=A0 Ideally the=
 mapping would be to the chunk plus anchor if the element containing the id=
 is not the outermost section, chapter, appendix, etc of the chunk.=C2=A0 T=
hen from within my app I can look up the mapping for a given id, and reques=
t the browser to open the desired page.<br></div><div><br></div><div>I expe=
ct that this is something that can be done using xslt technology, but I do =
not know where to begin.=C2=A0 I am at the skill level where I have made a =
few small customizations in a project that used xslt, but I don&#39;t reall=
y know how to go about opening a file and writing output, where to find the=
 id value, where to find the chunk name, etc.=C2=A0=C2=A0 In other words a =
beginner looking at the start of a steep learning curve.<br></div><div><br>=
</div><div>Can someone point me in the right direction for this task?=C2=A0=
 I notice that the javahelp output creates a mapping file that is almost ri=
ght, except that it does not use the chunk names derived from the &lt;?dbht=
ml filename=3D&quot;&quot;?&gt; processing instructions, which I am using i=
n order to get links that don&#39;t shift around as I add chapters and sect=
ions.=C2=A0 Is the javahelp tool a good starting point or would it be bette=
r to start from scratch?=C2=A0 Is there a book that you would recommend tha=
t is good to learn from?<br></div><div><br></div><div>Thanks,</div><div><br=
></div><div>Tom<br></div></div>

--00000000000063f59505ed8b02d1--