nicholsn/ni-dm — pull request #2 by cmaumet (2014-05-20 09:22:06+00:00)
Title: Fix validation (work-around)

This pull request include updates to make `spm_results.provn` valid according to the [Prov Validator](https://provenance.ecs.soton.ac.uk/validator/view/validator.html) following the introduction of a parent bundle in #56:
1. Fix typos;
2. Repeat namespace definitions inside bundle (as in [this example](https://github.com/lucmoreau/ProvToolbox/blob/master/prov-n/src/test/resources/prov/bundles1.provn));
3. Introduce dummy attributes of each namespace in the parent as a work-around to pass validation.

Here is a minimal example that describes the issue:
1. [This document](https://github.com/lucmoreau/ProvToolbox/blob/master/prov-n/src/test/resources/prov/bundles1.provn) passes the validation.
2. The following document (available [here](https://provenance.ecs.soton.ac.uk/store/documents/2343/)), in which I remove references to the `ex` namespace outside the bundles, does not pass the validation.

document
prefix ex
prefix alice
prefix bob

entity(bob:bundle1, [prov:type='prov:Bundle'])
wasGeneratedBy(bob:bundle1, -, 2012-05-24T10:30:00)
agent(ex:Bob)
wasAttributedTo(bob:bundle1, ex:Bob)

entity(alice:bundle2, [ prov:type='prov:Bundle' ])
wasGeneratedBy(alice:bundle2, -, 2012-05-25T11:15:00)
agent(ex:Alice)
wasAttributedTo(alice:bundle2, ex:Alice)

bundle bob:bundle1
prefix bob
prefix ex
entity(ex:report1, [ prov:type="report", ex:version=1 ])
wasGeneratedBy(ex:report1, -, 2012-05-24T10:00:01)
endBundle

bundle alice:bundle2
prefix alice
prefix ex

entity(ex:report1)
entity(ex:report2, [ prov:type="report", ex:version=2 ])
wasGeneratedBy(ex:report2, -, 2012-05-25T11:00:01)
wasDerivedFrom(ex:report2, ex:report1)
endBundle
endDocument

3. Adding the `ex` namespace outside of the bundles does not solve the issue (cf. [this document](https://provenance.ecs.soton.ac.uk/store/documents/2344/) which does not pass validation).

@nicholsn, @satra, do you think this behaviour is as expected? If not, could we send feedback to the ProvValidator developers?