Skip to content

from_xml().to_xml() does not preserve some of the type information #36

Closed

Description

@slbayer

To recreate:

print maec.parse_xml_instance(...some file...)["api"].to_xml()

If the file contains actions, for instance, and the xsi:type of the AssociationType is

maecVocabs:ActionObjectAssociationTypeVocab-1.0

in the file, it'll be

cyboxVocabs:ActionObjectAssociationTypeVocab-1.0

in the output XML. As far as I can tell from reading the schemas (and heaven knows I'm not very good at that), this shouldn't even validate, because the MAEC type isn't a subtype of the Cybox type.

Activity

  1. ikiril01 commented on Jun 24, 2014

    @ikiril01
    Member

    I couldn't seem to recreate this issue - can you state which particular file you used as input? I tried:

    print maec.parse_xml_instance("package_action_equivalency_example.xml")["api"].to_xml()

    and all of the xsi:types seemed to be preserved correctly, e.g.:

    <cybox:Association_Type xsi:type="maecVocabs:ActionObjectAssociationTypeVocab-1.0">o utput</cybox:Association_Type>

  2. slbayer commented on Jun 24, 2014

    @slbayer
    Author

    Fails for me on that file. Maybe there's something going on in cybox and my cybox isn't updated. Stay tuned.

  3. slbayer commented on Jun 24, 2014

    @slbayer
    Author

    I'm now up-to-date in cybox and maec, and I'm still seeing the error.

  4. slbayer commented on Jun 24, 2014

    @slbayer
    Author

    Eh. It's something I'm doing. Not sure what yet, but it's my mistake. Sorry about that. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions