summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-11-25 20:43:41 +0000
committerBurak Emir <emir@epfl.ch>2007-11-25 20:43:41 +0000
commit2ee9e59b353536a601cdf71ea14223ee3fff471b (patch)
tree0bb35a167c2a2f57805f393ab4ad90d410c96098 /src/library
parent79842acc1a93bbdc023b046401ef3786b39ef817 (diff)
downloadscala-2ee9e59b353536a601cdf71ea14223ee3fff471b.tar.gz
scala-2ee9e59b353536a601cdf71ea14223ee3fff471b.tar.bz2
scala-2ee9e59b353536a601cdf71ea14223ee3fff471b.zip
fixed namespace printing bug - props to DPP who...
fixed namespace printing bug - props to DPP who found and reported it.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/xml/Utility.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/library/scala/xml/Utility.scala b/src/library/scala/xml/Utility.scala
index 3f3ac9d6e8..b44614fbf9 100644
--- a/src/library/scala/xml/Utility.scala
+++ b/src/library/scala/xml/Utility.scala
@@ -202,7 +202,7 @@ object Utility extends AnyRef with parsing.TokenTests {
if (x.attributes ne null) x.attributes.toString(sb)
x.scope.toString(sb, pscope)
sb.append('>')
- sequenceToXML(x.child, pscope, sb, stripComment)
+ sequenceToXML(x.child, x.scope, sb, stripComment)
sb.append("</")
x.nameToString(sb)
sb.append('>')
@@ -217,22 +217,22 @@ object Utility extends AnyRef with parsing.TokenTests {
*/
def sequenceToXML(children: Seq[Node], pscope: NamespaceBinding,
sb: StringBuilder, stripComment: Boolean) {
- if (children.isEmpty)
+ if (children.isEmpty) {
return
- else if (children forall {
+ } else if (children forall {
case y: Atom[_] => !y.isInstanceOf[Text]
case _ => false
}) { // add space
val it = children.elements
val f = it.next
- toXML(f, f.scope, sb, stripComment)
+ toXML(f, pscope, sb, stripComment)
while (it.hasNext) {
val x = it.next
sb.append(' ')
- toXML(x, x.scope, sb, stripComment)
+ toXML(x, pscope, sb, stripComment)
}
} else {
- for (c <- children) toXML(c, c.scope, sb, stripComment)
+ for (c <- children) toXML(c, pscope, sb, stripComment)
}
}