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

xsi:nil="true" nodes not nil when additional attributes present #63

Open
petejohanson opened this issue Aug 12, 2014 · 2 comments
Open

Comments

@petejohanson
Copy link

I service I am interacting with returns nil elements along with the xsi type information, like so:

<node xsi:type="datetime" xsi:nil="true" />

Unfortunately, Nori currently converts this to:

{:'@xsi:type' => 'datetime' }

Instead of just nil

IMHO, this isn't the expected behaviour, since we can infer the type information from the WSDL, and don't need this lingering quasi-nil hash value around just for the type information.

Thoughts? I'm not sure if all attributes should be zapped when xsi:nil is encountered, or just xsi/xmln prefixed ones.

@petejohanson
Copy link
Author

FYI: I'm happy to submit a PR for this, but wanted some feedback on how to handle extra attributes other than xsi:type attributes before doing so.

@tjarratt
Copy link
Contributor

Thanks for opening this issue @petejohanson. I believe it's safe to assume that the value is actually nil so long as xsi:nil is present in the element, regardless of type information.

The best I could find was some w3 docs indicating that other attributes can be present, but no value.

http://www.w3.org/TR/xmlschema-0/#Nils

If you're interested in submitting a pull request for this, I'd be more than happy to answer any questions you might have!

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

No branches or pull requests

2 participants