|
From: Dan M. <d-...@uc...> - 2001-05-25 18:07:07
|
On Thu, 24 May 2001, Mary Dwyer wrote: > A few issues to note: > 1. only dealing with indexterms from the original document that include an "id" > or "zone" attribute (in order to provide anchors back to the original document) There are two general approaches to how we solve this problem which come to my mind: The first is using XPointers. I don't understand how one proceeds from having an XPointer to the right location to actually having XSLT produce the HTML output of the right page and anchor it to the right location. If we can do this without much trouble, then this may be a good solution. Does anybody understand how this works once we have the XPointer? The other is to create a black box id generator which you feed your docs through. For the sake of discussion, I will call it "sk_idattgen" and it will ship as part of ScrollKeeper. It is an executable that you input your SGML or XML doc and it outputs the same docs but it inserts id's anywhere they are missing in a deterministic and reproducable way. It would be simple to do - it could just number all the id's and check to make sure none of the numbers collide with pre-existing id's, for example. ScrollKeeper would run sk_idattgen on any SGML or XML docs it works with before it does any other processing. Any help browser which wants to work properly with ScrollKeeper will have to run sk_idattgen on any doc it works with before it does other processing. (Note this solves the problem not only for indexing, but also for the TOC and potentially other problems that will surely pop up in the future.) I like the later solution because it is so simple to implement and to use, and should be very robust. The main downside to it is the time penalty of having to parse the file an extra time. I don't think it should be noticable on the help browser side. For ScrollKeeper itself, if we really care about performance we can just create a function which does the sk_idattgen work which we call inside the other SK functions so we don't parse the document twice. This will help in cases where we are processing dozens of files and care about performance. Dan |