Re: [Scrollkeeper-devel] structure of extracted index page



On Thu, 26 Apr 2001, Daniel Veillard wrote:

> On Wed, Apr 25, 2001 at 10:44:30PM -0500, Dan Mueth wrote:
> > The other possibility is that instead of trying to refer to an anchor in
> > the generated HTML, we try to refer to the position in the XML document.  
> > I really don't know how this would work exactly, since I am not very
> > familiar with libxml, but it may be possible.  (DV?)
> 
>   I'm afraid I didn't follow the discussion here (sorry !), the best
> way to get a technical  answer from me is to give me a practical example
> (what's your input, how it's processed, what's the result, why it fails),
> and then I can use what I know both from the specs and the code to get
> this answer precisely and quickly,

Ok.  Let me give this a shot...

<disclaimer>
The DTD represented in this email is fictional and any similarity
with a real DTD is purely coincidental.
</disclaimer>

<sect1>
  <para>
    This is a sentence.
  </para>
  <indexterm>
    <primary>
      Sentences
    </primary>
  </indexterm>
  <para>
    This is another sentence.
  </para>
</sect1>

When this is converted to HTML, we will get an index at the end of the
document which has a link from an item called "Sentences" to the location
of the indexterm element above: between the two paragraphs.  Populating
our document with indexterms yields a helpful index at the end of the
document :)

We would like ScrollKeeper to keep an XML data file describing the
index.  It should list all of the index terms and where they link into the
document.

The thing I am not sure about is how we "anchor" the links into the
document.  If the indexterm had a unique id attribute, we could use
that.  But our DTD does not require the id attribute be used.

Is there a nice way we could have an XML representation of the index which
somehow specifies the anchors for the index term links so that a browser
(such as the help browser in Nautilus) can link from index terms to
locations in the XML document?

I hope this was clearer.

Dan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]