Skip to content

sortFields

nvolk edited this page May 21, 2024 · 1 revision

sortFields.js

Originally fully in from marc-record.js. Non-NatLibFi specific sorting rules are still there (though used by this validator.) This validator/fixer handles various sorting cases:

  1. Sort by tag (numerically). Also Aleph's non-numeric tags as well (semantically, not alphabetically)
  2. Sort alphabetically (applies only to LOW and SID fields)
  3. Sort by index term (applies to certain 6XX fields). Certain indicator and $2 values precede other values (NatLibFi preference order)
  4. Sort by relator term. People with certain relator terms are more important than others.
  5. Sort by subfield $6 occurrence number
  6. Prefer $9 FENNI (Finnish lexicon hack)
  7. Sort by $8 link and sequence number (Field with $8 1.1\x preceds field with $8 1.2\x and field with $8 2.1\x etc)