[sword-devel] How to handle on xml file per book in Osis ?

Greg Hellings greg.hellings at gmail.com
Mon Jan 18 14:43:53 EST 2021


I will guarantee you that XML include mechanisms will not work. In an
effort to reduce external dependencies, SWORD does not make use of a
standard XML library and, therefore, won't offer functionality like
includes.

However, osis2mod does offer the "-a" flag, which it says will "augment
module if exists (default is to create new)". And that exists specifically
to support the workflow you mention. If you want to have a separate XML
file for each book of the Bible, then you can just run "osis2mod" with the
-a flag for each subsequent file and it will add entries to the module
files. So a simple script like

for src in *.xml; do
  osis2mod -a "${src}" <other osis2mod args>
done

Will recreate your module each time. Of course, you'll want to delete the
existing files before you run this, or you'll end up with all sorts of
weirdness from running through the same XML files multiple times.

--Greg

On Sun, Jan 17, 2021 at 4:35 AM David Haslam <dfhdfh at protonmail.com> wrote:

> Hi Pierre,
>
> This is a very good idea but it would require considerable effort to
> incorporate into the release process script by the modules team.
>
> First though, can osis2mod handle a file that uses this method? If not,
> what would it take to implement it in the ModTools & SWORD ?
>
> Discuss details.
>
> Aside: I’ve seen at least one example of an XML file set that uses this
> method.
>
> Une version TEI XML de la traduction française de la Vulgate (Bible
> latine) par l'Abbé Glaire (†1879)
> https://github.com/MarjorieBurghart/VulgateGlaire
>
> I once converted her TEI files to a single OSIS file and built a module.
> Never got round to a formal submission to CrossWire.
>
> Best regards
>
> David
>
> Sent from ProtonMail Mobile
>
>
> On Sun, Jan 17, 2021 at 10:14, pierre amadio <amadio.pierre at gmail.com>
> wrote:
>
> Hi there !
>
> I am having a look at the Osis format and find it inconvenient to deal
> with the whole scripture in a single large xml document.
>
> I would like to be able to have all books in a separate xml file and a
> single container xml file referring to each book to be included in the
> final bible.
>
> I am not sure what is the best way to do that so that it is easy to
> deal with osis2mod: XML entities, XInclude, something else ?
>
> Any tips or suggestions welcome.
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20210118/681b2602/attachment.html>


More information about the sword-devel mailing list