evt-project/evt-viewer

Quotation handling

Opened this issue · 0 comments

Request by: Marjorie Burghart
Reference: 2017-11-03 mail to evt.developers

In my edition the quotations (quote) are wrapped in a cit, together with the indication of their source given by the editor (bibl). By default, the quote itself is recognized as a quote alright, but the content of bibl is displayed in the critical text just after the quote, while it should display as a sort of note, or maybe in the div that opens when you click on the quote, together with the text of the quote.

@ChiaraMartignano:

The problem you encountered depends on the internal mechanisms of the XML parsers I wrote. Basically, the parser depends on the configuration variable quoteDef, that by default is set to the TEI element.

    Line 144 of your config.json file: "quoteDef": "quote"

When the parser finds the <quote> element, it then looks for a bibliographic reference element inside of it, in order not to risk to associate the <quote> element to a bibliographic element that is not actually linked to it. I don't know if I made myself clear enough, anyway there are three ways to fix this problem:

  • deleting the <cit> element and moving the <bibl> inside of <quote>: a little less elegant, but it will work the way you expected to;
  • adding inside the <quote> element a pointer to the the <bibl> element or a @source attribute on the <quote> element: again not so elegant because it would seem redundant, but it would work;
  • changing the configuration variable quoteDef to <cit>: with this last solution one would risk to leave out all the other <quote> elements.

For the moment quoteDef doesn't accept more than one value like analogueDef does. So it is a bit strict. But I'm planning to change quoteDef soon, so that it will be able to accept more TEI elements definitions.