Re: structure of extracted index page



Sorry if I am missing something, but the example given here doesn't
seem to be legal docbook: AFAIK, there is no such tag as <indexdoc> in
DocBook, and <indexentry> *must* contain <primaryie>, and there is no
such attribute as "linkid". Thus, the correct markup would be

<index> 
<indexentry> 
 <primaryie> Apple</primaryie>
 <secondaryie>Big </secondaryie>
</indexentry>
etc. I am not sure what to do with the linking id. 

Of course, this xml document is only intended as a temporary one to be
used by help system internally, so in theory we can introduce our own
tags - but I'd rather try avoiding this. For example, this would mean
we can't use usual (Norman Walsh's) stylesheets for xml->html
translation, and would also cause many new problems. 


More seriously, I'd consider it important that: 

 a. generated index contains <indexdiv> (which separate entries
 starting with diffrent letters), if it is not too much of a problem 

 b. it correctly puts together multiple occurences of a word: if the
 document contains 

   <indexterm id="idx-a1">
     <primary>Apple</primary><secondary>Big </secondary>
   </indexterm>

  and 

   <indexterm id="idx-a5">
     <primary>Apple</primary><secondary>Small </secondary>
   </indexterm>

  then the produced index contains 

  <indexentry> 
   <primaryie> Apple</primaryie>
    <secondaryie>Big </secondaryie>
    <secondaryie>Small </secondaryie>
  </indexentry>
 rather than  two separate entries "Apple, Big" and "Apple, Small"

 c. it correctly sorts words alphabetically, even for alphabets other
 than Latin, using "lang" attribute of the document - e.g., if the
 document is written in Greek as indicated by lang="gr" attribute,
 then  index should be sorted accroding to Greek alphabet. 

 Is this all feasible?

Sasha




On Wed, Apr 25, 2001 at 10:29:52AM +0100, Mary Dwyer wrote:
> hi
> 
> I'd appreciate some feedback/suggestions on the structure of the index 
> scrollkeeper will create from a document.
> 
> To aid explanation, consider a document including the following index markups:
> 
> <indexterm id="idx-a1">
>   <primary>Apple</primary><secondary>Big </secondary><tertiary>Green</tertiary>
> </indexterm>
> 
> <indexterm zone="a1"><primary>Orange</primary><secondary>Medium></secondary>
> </indexterm>
> 
> <indexterm id="idx-a2" class=startofrange>
>   <primary>Banana</primary><secondary>Small</secondary>
> </indexterm>
> <indexterm startref="idx-a2" class=endofrange>
> 
> 
> 
> 
> The Example below is an excerpt from the extracted index .
>  
> 1. The tags <indexdoc> </indexdoc> indicate beginning and end of document
> 2. The index entry is indicated by the tags <indexentry linkid="id"> 
> </indexentry>
> 
> I do not know how to handle See and See Also references (as they are not 
> associatied with an id) - any suggestions?
> 
> 
> Example:
> 
> <indexdoc>
>    <indexentry linkid="idx-a1">Apple, Big, Green
>    </indexentry>
>    <indexentry linkid="idx-a2">Banana, Small
>    </indexentry>
>    <indexentry linkid="a1">Orange, Medium
>    </indexentry
>       
>    etc. .......
>    
> </indexdoc>   
> 
> 
> 
> TIA
> Mary




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