Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML deserialization with prov as default namespace #155

Open
mf-16 opened this issue Dec 30, 2023 · 0 comments
Open

XML deserialization with prov as default namespace #155

mf-16 opened this issue Dec 30, 2023 · 0 comments

Comments

@mf-16
Copy link

mf-16 commented Dec 30, 2023

Hello @krischer, I have been told that you are the author of the XML conversion module.
I have encountered an issue when deserializing this document:

<document xmlns="http://www.w3.org/ns/prov#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ex="https://example.org/">
  
    
      <entity prov:id="ex:e">
        <value xsi:type="xsd:int">1</value>
      </entity>
    
  
</document>

After deserializing, we get a document that looks like this in PROVN.

entity(ex:e, [None:value=1])

When we try to serialize this document back to XML we get this exception:
ValueError: Invalid tag name 'None:value'

I suppose that there is a mistake somewhere in handling XML qname and mapping it to QualifiedName in method
xml_qname_to_QualifiedName(element, qname_str) during the deserialization.

This issue poses a problem with interoperability between this library and ProvToolbox in Java since the document shown above is serialized in ProvToolbox using version 2.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant