-
-
Notifications
You must be signed in to change notification settings - Fork 898
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
Inconsistent behavior between parsing and adding namespaces #943
Comments
…parklemotion#940. This allows for namespace prfixes to the redeclared at an element level, allows for default namespaces to be redeclared at an element level and fixes issues related to adding namepsaces delcarations on the document for use in xpath calls
…parklemotion#940. This allows for namespace prfixes to the redeclared at an element level, allows for default namespaces to be redeclared at an element level and fixes issues related to adding namepsaces delcarations on the document for use in xpath calls
…parklemotion#940. This allows for namespace prfixes to the redeclared at an element level, allows for default namespaces to be redeclared at an element level and fixes issues related to adding namepsaces delcarations on the document for use in xpath calls
Will take a look. |
This has been fixed by the commit 742751a |
Will this fix be included in release 1.6.2? The issue is mentioned as fixed in the changelog for 1.6.2, but the fix was pushed 3 days ago, while the rc1 has been released 11 days ago. Will it make rc2 (will there even be an rc2?) and the upcoming release or could it be that it won't be included? I ask this because it would help me get rid of quite a workaround I had in place to deal with it :). |
It should be included in release 1.6.2. As the changelog says "1.6.2 / unreleased", it's not yet released. Since the fix is in master, version 1.6.2 should have this fix. |
There is an inconsistency between what can be parsed as a namespace from a and what can be added via add_namespace.
This also appears as if this is more systemic to the fact that you cannot add a namespace to an element if the prefix you are trying to use already exists in the ancestry of the node you are trying to add it to.
While if it is parsed from a string/file/ect... this is not a problem. Either reusing the prefix with a new uri:
or by simply adding the same namespace mapping:
Somewhat related to this is creating documents with builder where it will allow for reusing the prefix with a different uri but not if it is the same as a parents namespace.
I discovered this while trying to fix some issues related to namespace and namespace caching in the Java implementation. Why cant namespaces be added if the prefix already exists in the hierarchy? It isn't a problem on parsing and redefining prefixes is perfectly legal in xml.
The text was updated successfully, but these errors were encountered: