[sword-devel] Validating ThML and OSIS modules

Chris Little chrislit at crosswire.org
Tue Jan 6 03:10:16 MST 2009

So write it and submit a patch.

[Some basic requirements: Don't add library dependencies to Sword 
itself, make the validator toggleable at runtime, and ensure that the 
validation library is in C/C++ and can compile under Win32 and with GCC.]


Jonathan Morgan wrote:
> I feel that, rather than useless debates about whether certain
> people's modules are valid ThML or whether valid OSIS has been
> submitted to CrossWire or not, we should augment osis2mod, imp2mod and
> friends to use a validating XML parser.  That way we could be quite
> sure that anything that has been created is valid.
> I'm sure this has been discussed and rejected in past conversations.
>>From memory, the arguments were along the lines of: Everyone should be
> validating before creating a module, so it will take extra time
> validating when creating a module.
> To be blunt, this argument doesn't make a lot of sense to me.  If you
> really care about validity in your modules, the only logical thing to
> do about it is to prevent invalid modules from being created (or at
> least make it a bit harder - I can create modules directly from C++ or
> Python, and they would not be so validated).  It also saves the extra
> validation step if it is done as part of the process (which also saves
> finding an extra validating tool, ...).
> It can be clearly seen that invalid modules do get created by certain
> parties, and that invalid OSIS documents do get sent to crosswire.
> This being acknowledged, surely preventing that is a good thing?  (I
> do assume that anyone sending an OSIS document will have run osis2mod
> on it and checked the module - if they haven't, then they are
> obviously in need of correction).
> There has also been discussion of a magic OSIS uploader tool that will
> do all the work for you, including validation.  This does not exist,
> and still will.  Making osis2mod and friends do the validation
> themselves will probably be easier to change, and it will ensure that
> all modules are properly validated, not just Crosswire modules.
> Jon
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list