Uploaded image for project: 'Module Tools'
  1. Module Tools
  2. MODTOOLS-14

osis2mod does not exclude text in the OSIS header

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: osis2mod
    • Labels:
      None
    • Environment:

      Windows 7 x64.

      Description

      http://crosswire.org/wiki/Osis2mod#Exclusions states,
      "Only content starting the first <div> to the last </div> is retained. All other is excluded. From a practical perspective, this excludes the OSIS header information."

      osis2mod.exe $Rev: 2562 $ does not adhere to this rule!

      If you have a fully fledged OSIS header, (such as the one that I have attached), the module displays the text from the header at the start of the module. I'll paste this in the first comment (FIO).

      I have discussed this with DM Smith, and he agrees that this is a software bug.
      He wonders if this was accidentally introduced when trying to parse the header to suggest conf info.

      David

        Attachments

          Activity

          Hide
          dfh David Haslam added a comment -

          Xiphos displayed stuff from the example OSIS header as follows:
          (the asterisks are where bold was used for title elements)

          Merged separate OSIS XML files into a single file using a bespoke
          TextPipe Standard filter, with changes made to meet the requirements
          for osis2mod. Developed by David Haslam, CrossWire Bible Society.
          2006-07-29
          Converted from TEX into OSIS by bibleTec2osis.pl
          Lai (Hakha) Version
          Myanmar Bible Software Bible Bible.cnh.Hakha.2005 cnh Copyright 2005
          Myanmar Bible Society Bible Bible Bible Bible Genesis

          NB. The title Genesis is part of the module proper.

          Show
          dfh David Haslam added a comment - Xiphos displayed stuff from the example OSIS header as follows: (the asterisks are where bold was used for title elements) Merged separate OSIS XML files into a single file using a bespoke TextPipe Standard filter, with changes made to meet the requirements for osis2mod. Developed by David Haslam, CrossWire Bible Society. 2006-07-29 Converted from TEX into OSIS by bibleTec2osis.pl Lai (Hakha) Version Myanmar Bible Software Bible Bible.cnh.Hakha.2005 cnh Copyright 2005 Myanmar Bible Society Bible Bible Bible Bible Genesis NB. The title Genesis is part of the module proper.
          Hide
          dfh David Haslam added a comment -

          Aside:

          In my OSIS header example, there are two revisionDesc elements, each with a date.
          The first date was not displayed for no obvious reason. Maybe this is just an "off-by-one" error.

          I mention this only as an aside, as the quirky behaviour would be irrelevant if the header was properly excluded.

          David

          Show
          dfh David Haslam added a comment - Aside: In my OSIS header example, there are two revisionDesc elements, each with a date. The first date was not displayed for no obvious reason. Maybe this is just an "off-by-one" error. I mention this only as an aside, as the quirky behaviour would be irrelevant if the header was properly excluded. David
          Hide
          dfh David Haslam added a comment -

          Module makers beginning from USFM source text would not have encountered this s/w bug.

          usfm2osis.pl outputs only a rudimentary header, just sufficient to validate the XML file to the OSIS schema.

          e.g.

          <header>
          <work osisWork="belarusian"/>
          </header>

          Show
          dfh David Haslam added a comment - Module makers beginning from USFM source text would not have encountered this s/w bug. usfm2osis.pl outputs only a rudimentary header, just sufficient to validate the XML file to the OSIS schema. e.g. <header> <work osisWork="belarusian"/> </header>
          Hide
          dfh David Haslam added a comment -

          The reason that text within an OSIS header should be excluded is obvious! Most of the text is "meta data".
          The appropriate place for such meta data is in the conf file.

          Apart from that, what was included in my example also looks very messy.

          Show
          dfh David Haslam added a comment - The reason that text within an OSIS header should be excluded is obvious! Most of the text is "meta data". The appropriate place for such meta data is in the conf file. Apart from that, what was included in my example also looks very messy.
          Hide
          dmsmith DM Smith added a comment -

          Fixed a long time ago. Here is part of the output with -d 512:
          DEBUG(FOUND): Found first div and pitching prior material: <xml encoding="UTF-8" version="1.0"><osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.2.1.1.xsd"> <osisText osisIDWork="thisWork" osisRefWork="defaultReferenceScheme" xml:lang="en"> <header> <revisionDesc><date>2011-11-11</date> <div sID="gen1" type="x-p"/> Merged separate OSIS XML files into a single file using a bespoke TextPipe Standard filter, with changes made to meet the requirements for osis2mod. Developed by David Haslam, CrossWire Bible Society. <div eID="gen1" type="x-p"/> </revisionDesc> <revisionDesc><date>2006-07-29</date> <div sID="gen2" type="x-p"/>Converted from TEX into OSIS by bibleTec2osis.pl <div eID="gen2" type="x-p"/> </revisionDesc> <work osisWork="thisWork"> <title>Lai (Hakha) Version</title> <creator role="encoder">Myanmar Bible Software</creator> <type type="OSIS">Bible</type> <identifier type="OSIS">Bible.cnh.Hakha.2005</identifier> <language type="SIL">cnh</language> <rights type="x-copyright">Copyright 2005 Myanmar Bible Society</rights> <scope>Bible</scope> <refSystem>Bible</refSystem> </work> <work osisWork="bible"> <type type="OSIS">Bible</type> <refSystem>Bible</refSystem> </work> </header>

          Show
          dmsmith DM Smith added a comment - Fixed a long time ago. Here is part of the output with -d 512: DEBUG(FOUND): Found first div and pitching prior material: <xml encoding="UTF-8" version="1.0"><osis xmlns="http://www.bibletechnologies.net/2003/OSIS/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bibletechnologies.net/2003/OSIS/namespace http://www.bibletechnologies.net/osisCore.2.1.1.xsd "> <osisText osisIDWork="thisWork" osisRefWork="defaultReferenceScheme" xml:lang="en"> <header> <revisionDesc><date>2011-11-11</date> <div sID="gen1" type="x-p"/> Merged separate OSIS XML files into a single file using a bespoke TextPipe Standard filter, with changes made to meet the requirements for osis2mod. Developed by David Haslam, CrossWire Bible Society. <div eID="gen1" type="x-p"/> </revisionDesc> <revisionDesc><date>2006-07-29</date> <div sID="gen2" type="x-p"/>Converted from TEX into OSIS by bibleTec2osis.pl <div eID="gen2" type="x-p"/> </revisionDesc> <work osisWork="thisWork"> <title>Lai (Hakha) Version</title> <creator role="encoder">Myanmar Bible Software</creator> <type type="OSIS">Bible</type> <identifier type="OSIS">Bible.cnh.Hakha.2005</identifier> <language type="SIL">cnh</language> <rights type="x-copyright">Copyright 2005 Myanmar Bible Society</rights> <scope>Bible</scope> <refSystem>Bible</refSystem> </work> <work osisWork="bible"> <type type="OSIS">Bible</type> <refSystem>Bible</refSystem> </work> </header>

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              dfh David Haslam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: