Tutorials:SWORD 101

From CrossWire Bible Society
Jump to: navigation, search

EXAMPLE TEXT PROCESSING FLOW

____________________

*Publisher's Document*
/ Chaos and Unrest /
____________________

        |
    osis2mod
        v
____________________

*SWORD Storage*
/ Unrest /
Markup normalized
Document partitioned into user-referencable, tasty bite-sized chunks
____________________

        |
option filters
        v
____________________

*Stage 1 Processed*
/ Some Rest /
Entity focused classes each have processed their 'concept': notes, lemma, crossref, etc.
Interesting attributes registered to EntryAttributes map
Some editorial decisions made, like removing inlining of notes, pre-verse headers
Features turned on or off based on user preference
____________________

        |
render filters
        V
____________________

*HTML output*
/ Peace and Tranquility /
Markup converted to HTML
Where inlining was removed, the residual marker tags now have direct pointers 
back to their EntryAttributes section enabling the frontend to do what they'd 
like on events like hover-over
____________________


  • NB: There are additional stages of processing: encoding stage, decipher stage, strip/normalize for search stage, etc., but this is a 100 level course.