trungdong/prov — pull request #43 by cmaumet (2014-05-28 11:43:36+00:00)
Title: Write out boolean type in PROV-N

Hello,

This is a proposal to explicitly include a `%%xsd:boolean` typing whenever a boolean value is written as part of a PROV-N serialisation.

This example script:

from prov.model import ProvBundle, Namespace, ProvDocument

ex = Namespace('ex', 'http://example.org/')
provDocument = ProvDocument()
provDocument.add_namespace(ex)
provDocument.entity('ex:e1', (('ex:bool', True)))
print provDocument.get_provn(4)

Would then return:

document
prefix ex

entity(ex:e1, [ex:bool="True" %% xsd:boolean])
endDocument

instead of (current version):

document
prefix ex

entity(ex:e1, [ex:bool=True])
endDocument

The current PROV-N serialisation does not seem correct (as from [PROV-N literal](http://www.w3.org/TR/2013/REC-prov-n-20130430/#prod-literal), a value without type is a string, an integer or a qualified name). Or, am I missing something? I would be glad to get your input.