You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both XMLNamespace and XMLRoot can define a namespace and prefix, but it is unclear what takes precedence. They even can conflict when they both point to the same prefix.
It would be better to replace the XmlRoot::prefix with XmlRoot::withPrefix (or usePrefix):
Both XMLNamespace and XMLRoot can define a namespace and prefix, but it is unclear what takes precedence. They even can conflict when they both point to the same prefix.
It would be better to replace the XmlRoot::prefix with XmlRoot::withPrefix (or usePrefix):
This way the prefix can only be set by the XmlNamespace.
Steps required to reproduce the problem
Expected Result
Both point to the same namespace so XmlNamespace takes precedence. (consistent with XmlRoot without prefix)
Actual Result
XmlRoot prefix is used and there is an useless namespace definition.
Second example
Expected Result
An exception about the conflicting namespaces, or a generated prefix for the prefix that is the second one pointing to the same prefix:
Actual Result
Apparently the XmlNamespace takes precedence now.
This is not valid due to the overriding prefix. (Foo uses the wrong namespace)
The text was updated successfully, but these errors were encountered: