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

Namespace confusion #65

Closed
milgner opened this issue Dec 4, 2015 · 3 comments · Fixed by #87
Closed

Namespace confusion #65

milgner opened this issue Dec 4, 2015 · 3 comments · Fixed by #87
Labels

Comments

@milgner
Copy link

milgner commented Dec 4, 2015

Given a nested structure with multiple namespaces (nsa and nsb) like this:

<nsa:Outer>
  <nsa:Nested>
    <nsa:Inner>
      <nsb:attribute>value</nsb:attribute>

Outer is parsed correctly and Nested is put in, too. But while the element for Inner belongs to Namespace A, it's class/type is defined in Namespace B. This yields nil when trying to parse.

I wonder how I should specify namespaces on classes and elements here?

@milgner
Copy link
Author

milgner commented Dec 4, 2015

It looks like here the namespace of the target object should be used, not of the current context.

@milgner
Copy link
Author

milgner commented Dec 4, 2015

Find a preliminary fix in my fork. I'll think it through some more and add some specs before creating a PR.

https://github.com/milgner/happymapper

@mvz
Copy link
Owner

mvz commented Dec 31, 2017

I think the attribute name 'attribute' is probably a problem.

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

Successfully merging a pull request may close this issue.

2 participants