Menu

#314 Create att.sortable class for @sortKey

AMBER
closed-accepted
5
2011-11-06
2011-08-18
No

This supercedes tickets 2984463 and 3309636; those tickets are closed, but much of the relevant discussion is on them.

The proposal is to create a class called att.sortable, which would provide @sortKey for elements which appear in groups or lists, but for which it is often difficult to derive a working sort key mechanically. Elements in this class would be:

item, bibl, biblStruct, biblFull, person personGrp, place, org, msDesc, idno, witness, relation, relationGrp, event, nym;

list, listBibl, listWit, listOrg, listEvent, listPerson, listPlace, listNym

The second set are included because they can be nested inside themselves.

Council has discussed this and is generally favourable.

The Council has discussed this

Discussion

  • Martin Holmes

    Martin Holmes - 2011-08-18

    Forgot to include <term>, which already has @sortKey on it.

     
  • Lou Burnard

    Lou Burnard - 2011-08-18
    • milestone: 871208 --> AMBER
     
  • Lou Burnard

    Lou Burnard - 2011-08-18

    According to one reading of some of the comments on 2984463 the value of sortKey should be an Xpath indicating some element or substring therof which is to be used as the sort key. In which case it might be better renamed as sortBy

     
  • Kevin Hawkins

    Kevin Hawkins - 2011-08-20

    This ticket ends with "The Council has discussed this" but doesn't say any more. Just want to check that important information wasn't accidentally omitted ...

     
  • Martin Holmes

    Martin Holmes - 2011-08-30
    • assigned_to: nobody --> martindholmes
     
  • Martin Holmes

    Martin Holmes - 2011-08-30

    @Kevin: that was just a copy/paste error on my part.
    @Lou: I think we explicitly discussed the use of XPath, and it's beside the point: @sortKey is for when you have to manually supply a text key for sorting, because there's no way (or it's dauntingly difficult and processor-intensive) to derive one from XPath manipulation of content. @sortKey is just text.

    I've assigned this to myself, and I'll go ahead with it unless there are any objections in the next week or two.

     
  • Martin Holmes

    Martin Holmes - 2011-11-04

    This is what I intend to do to complete this ticket:

    1. Create att.sortable.xml, defining:

    <classSpec xmlns="http://www.tei-c.org/ns/1.0" module="tei" type="atts" ident="att.sortable">
    [...]
    </classSpec>

    Note that I'm placing this in the tei module, because its usage is so wide.
    I propose to take the attribute definition and examples from term.xml, which
    has a local attribute @sortKey, including some additional information from
    att.entryLike, which also defines @sortKey. The objective is to unify all
    @sortKey attributes.

    2. Remove @sortKey from att.entryLike, which removes the attribute from entry, entryFree, and superEntry.

    3. Make entry, entryFree, and superEntry members of att.sortable, to replace @sortKey on those elements.

    4. Remove the local @sortKey from term.xml, and make it a member of att.sortable.

    5. Add the following elements to att.sortable:

    item, bibl, biblStruct, biblFull, person personGrp, place, org, msDesc, idno, witness, relation, relationGrp, event, nym;

    list, listBibl, listWit, listOrg, listEvent, listPerson, listPlace, listNym

    (The second set are included because they can be nested inside themselves.)

    This should have the effect of unifying the two existing @sortKey attributes (for term and the entry family) and replacing them with a single attribute class to which all listed elements above area also added, providing a single @sortKey in the tei module.

     
  • Martin Holmes

    Martin Holmes - 2011-11-06

    Closing this ticket as it is now implemented. This is what I did:

    1. Created att.sortable.xml, defining:

    <classSpec xmlns="http://www.tei-c.org/ns/1.0" module="tei" type="atts"
    ident="att.sortable">
    [...]
    </classSpec>

    I've placed this in the tei module, because its usage is so
    wide. I took the attribute definition and examples from
    term.xml, which had a local attribute @sortKey, and included some
    additional remarks from att.entryLike, which also used to define @sortKey.

    2. Removed @sortKey from att.entryLike, which removed the attribute from
    entry, entryFree, and superEntry.

    3. Made entry, entryFree, and superEntry members of att.sortable, to
    replace @sortKey on those elements.

    4. Removed the local @sortKey from term.xml, and made it a member of
    att.sortable.

    5. Made the following elements members of att.sortable:

    bibl, biblStruct, biblFull, msDesc; (Members of model.biblLike)

    person, personGrp, org; (Members of model.personLike)

    list, listBibl, listWit, listOrg, listEvent, listPerson,
    listPlace, listNym (Members of model.listLike)

    listChange;
    (Excluded listRef, because it cannot nest -- why?)

    item, place,
    idno, witness, relation, relationGrp, event, nym;

    6. Added my new att.sortable.xml to the entities in
    guidelines-xx-.xml.

    7. Added a reference to the entity in Guidelines/en/ST-infrastructure.xml. (No need to add it to the French counterpart because it's just a symlink to the English one.)

    8. In DI-PrintDictionaries.xml, replaced obsolete reference to att.entryLike/@sortKey with att.sortable/@sortKey.

     
  • Martin Holmes

    Martin Holmes - 2011-11-06
    • status: open --> closed-accepted