We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This one was always OK:
scala> <t a="1" b="2"/> val res0: scala.xml.Elem = <t a="1" b="2"/>
This one was fixed in scala-xml 2.x (scala/scala-xml#172), the attributes are reversed when using 1.x:
scala> scala.xml.XML.loadString("""<t a="1" b="2"/>""") val res1: scala.xml.Elem = <t a="1" b="2"/>
The fix also applies here:
scala> scala.xml.XML.loadString("""<t xmlns="xmlns-url" xmlns:xsd="xmlns-xsd-url"/>""") val res0: scala.xml.Elem = <t xmlns="xmlns-url" xmlns:xsd="xmlns-xsd-url"/>
But for literals, namespace attributes are handled by the compiler and they are (and always were) reversed:
scala> <t xmlns="xmlns-url" xmlns:xsd="xmlns-xsd-url"/> [[syntax trees at end of parser]] // <console> ... var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope; $tmpscope = new _root_.scala.xml.NamespaceBinding(null, "xmlns-url", $tmpscope); $tmpscope = new _root_.scala.xml.NamespaceBinding("xsd", "xmlns-xsd-url", $tmpscope); { val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope; new _root_.scala.xml.Elem(null, "t", _root_.scala.xml.Null, $scope, true) } ... val res0: scala.xml.Elem = <t xmlns:xsd="xmlns-xsd-url" xmlns="xmlns-url"/> scala> res0.scope val res1: scala.xml.NamespaceBinding = xmlns:xsd="xmlns-xsd-url" xmlns="xmlns-url" scala> res0.scope.parent val res2: scala.xml.NamespaceBinding = xmlns="xmlns-url"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This one was always OK:
This one was fixed in scala-xml 2.x (scala/scala-xml#172), the attributes are reversed when using 1.x:
The fix also applies here:
But for literals, namespace attributes are handled by the compiler and they are (and always were) reversed:
The text was updated successfully, but these errors were encountered: