-
Notifications
You must be signed in to change notification settings - Fork 52
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
Allow the creation of namespaces higher in the DOM tree #11
Comments
The described solution (1) would be tricky to implement, but possible from within the XmlBuilder during the building of the tree. Unfortunately I am quite busy right now, so I don't have the time to look into it. However, free to submit a pull-request. Alternatively (and if you don't want to modify the library) you could write a visitor over the built XML tree that transforms it into an optimised tree. Implementation wise I think this solution would even be simpler, albeit less efficient as the tree needs to be re-traversed and copied. |
I will try to give it a look this week, time isn't my best friend either. |
I got both 1 and 2 implemented. However, I want to know how you want users to opt-in or opt-out for the enhancements. I'll make a PR and ask you there. |
This is fixed with aebf5bd. |
Consider the following example. When a property value is null, the
xsi:nil="true"
attribute is added and thus thexsi
namespace should be defined. However, the<Property>
elements are built inside theXrdProperty
class so that it has no access to the<XRD>
element. The result is that thexsi
namespace is added twice. Preferably, thexsi
namespace is only defined in the<XRD>
element, not in<Link>
elements.There are several possible solutions, listed in order of preference:
The text was updated successfully, but these errors were encountered: