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

Package.from_dict(obj.to_dict()).to_xml() messes up vocab types #33

Open
slbayer opened this issue Jun 19, 2014 · 2 comments
Open

Package.from_dict(obj.to_dict()).to_xml() messes up vocab types #33

slbayer opened this issue Jun 19, 2014 · 2 comments

Comments

@slbayer
Copy link

slbayer commented Jun 19, 2014

To recreate, do this:

import maec
obj = maec.parse_xml_instance("maec_4.1_examples/package_manual_analysis_example.xml")["api"]
print maec.package.package.Package.from_dict(obj.to_dict()).to_xml().encode('utf8')

(the final encode() is because I'm printing to an ASCII terminal; it isn't going to affect the problem).

In the output, search for BAD_XSI_TYPE, which occurs all over the place.

@ikiril01
Copy link
Member

Thanks for the bug report. This stems from an issue with the use of the is_plain() method in the VocabString python-cybox class. I've added a tracker entry there to evaluate it: CybOXProject/python-cybox#174

@slbayer
Copy link
Author

slbayer commented Jun 24, 2014

Turns out that this issue:

#36

is actually another instance of this one, because I didn't realize that what I was looking at in this other issue was the output of to_xml() produced with the pattern noted here. So in addition to BAD_XSI_TYPE, I see cyboxVocabs:ActionObjectAssociationTypeVocab-1.0 instead of maecVocabs:ActionObjectAssociationTypeVocab-1.0. Sorry for the confusion.

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

2 participants