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

Namespaces in attribute values #86

Open
finlay opened this issue May 5, 2016 · 3 comments
Open

Namespaces in attribute values #86

finlay opened this issue May 5, 2016 · 3 comments

Comments

@finlay
Copy link

finlay commented May 5, 2016

Hi

I am having trouble with a XML that has namespaced values. For example:

<Object xmlns:q1="example.org.nz" xsi:type="q1:ObjectType" Other="attributes" are="here" />

I would like to compare the value of the "type" attribute for equality with
"{example.org.nz}ObjectType", but can't do that. The "q1" is just noise.

See this MSDN documentation for where these things come from.

In the meantime I am going to ignore the prefix's in the values, but it is not ideal.

F

@snoyberg
Copy link
Owner

Sounds like #38. Have you seen psRetainNamespaces?

@finlay
Copy link
Author

finlay commented May 10, 2016

Yes, it is very similar to the psRetainNamespaces setting. That handles the name space on the attribute name, but not the attribute value.

In the example above, we have xsi:type="q1:ObjectType". The xsi type is handled properly now, and usefully. But the value q1:ObjectType could have the namespace stripped off it, and the q1 namespace added to the namespaces in the name of the attribute.
I like the fact that attribute values are currently Text, so probably don't want to change that.

Would you be interested in a patch ?

Fin

@snoyberg
Copy link
Owner

Sure, I'd accept a patch to add a new option for resolving namespace values.

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