Thank you for the research and work concerning this issue. To achieve our goals, we can make multiple bookmarks in Word for the same range, if we want to reference to it multiple times. I have tested this and this works well. The see-reference instead of the single primary reference, for the second indexterm referring to the same range, is actually not really an improvement for us. If Subject B gets a see-reference to Subject A, that means the user will have to look up all the page numbers pertaining to Subject A, and it is possible that we mean only to reference Subject B to the range (that is the same for Subject A and B). Would it be better to change this feature again to the way it was in w2x v1.7?
Kind regards, Louise Prompers -----Oorspronkelijk bericht----- Van: Hussein Shafie [mailto:[email protected]] Verzonden: donderdag 19 september 2019 20:02 Aan: Louise Prompers CC: [email protected] Onderwerp: Re: [W2X] Index range used more than once [FOLLOW-UP] On 09/18/2019 12:22 PM, Louise Prompers wrote: > > > I am working on a book with an index. I made the index in Word, using > the function to mark index entries and referring index words to a > range (a range of text that was marked with a bookmark in Word). > > > > The ranges in Word convert beautifully to ranges in DocBook-xml, using W2X. > > But I now see that, when two index entries should reference to same > range, this is being ignored for the second index word. A range can > only be used once. > > > > The error message is: > > 'Index entry 'subject B': Is range 'subject_A_and_B' already > referenced in another index entry? Ignoring it.' > > > > Please find the attached test documents. > > > > What I would expect, is that multiple index terms can reference to the > same range. > > In the test example, I expect 'subject B' also to reference to RANGE1 > (as is already the case for 'subject A'), in the generated DocBook-xml. Implementing exactly what you want would require a lot of work for a relatively rare use case. --> Why is it difficult? An MS-Word index term referencing a range (e.g. field XE "subject A" \r "subject_A_and_B") is NOT converted to a DocBook index term referencing this range. It is the MS-Word range itself, which when first referenced by an MS-Word index term, is converted to TWO DocBook index terms (<indexterm class="startofrange" xml:id="__RANGE1__"> and <indexterm class="endofrange" startref="__RANGE1__">). This strategy works well for the first MS-Word index term referencing a range but cannot work for subsequent MS-Word index terms referencing the same range (e.g. field XE "subject B" \r "subject_A_and_B"). In a nutshell, what you want is quite difficult to implement because an MS-Word index term referencing a range is very different in its nature from a DocBook index term referencing a range. --> We have implemented in w2x v1.8 something which does not correspond to your RFE, but which is an improvement over what we did in w2x v1.7. Subsequent MS-Word index terms referencing the same range are now converted to: <indexterm>...<see>TERM USED BY FIRST OCCURRENCE</see></indexterm> For example, in the case of attached "Index range test.docx", field XE "subject B" \r "subject_A_and_B" is converted to: <indexterm><primary>subject B</primary><see>subject A</see></indexterm> See attached "Index range test.xml". -- XMLmind Word To XML Support List [email protected] https://www.xmlmind.com/mailman/listinfo/w2x-support
