-
Notifications
You must be signed in to change notification settings - Fork 92
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
NamespaceBinding.buildString inproper handling of TopScope #45
Comments
The other option is adding This is a strange bug. It is only complicated by the
This bug has nothing to do with the |
* src/test/scala/scala/xml/XMLTest.scala (namespacesWithNestedXmls): Modified test case by Muntis Grūbe. * src/main/scala/scala/xml/NamespaceBinding.scala (doBuildString): Add TopScope as a value to avoid building the namespace attribute string.
* src/test/scala/scala/xml/XMLTest.scala (namespacesWithNestedXmls): Modified test case by Muntis Grūbe. * src/main/scala/scala/xml/NamespaceBinding.scala (doBuildString): Add TopScope as a value to avoid building the namespace attribute string.
Thanks Aaron. Closing this one. |
Starting with saca 2.11 NamespaceBinding.buildString uses private metohod doBuildString for namespace part generation. problem is that this method is not overrided in TopScope sub class. This generates unnecessary artifacts in form of empty (xmlns="") when constructing xml:
Results in:
In this example problem can be fixed by setting pscope=TopScope for PrettyPrinter, but it does not help if xml is build from multiple parts.
Results in:
Sugested solution:
Or just change visibility of doBuildString and override it properly in TopScope like it's done with buildString methods
The text was updated successfully, but these errors were encountered: