summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2003-11-27 13:11:21 +0000
committerburaq <buraq@epfl.ch>2003-11-27 13:11:21 +0000
commitb68be7fedf11a6408776e482097a7cb2af7f98a0 (patch)
tree8fa25d4a3f825ada665fe2e6b8839d689cdcf53f /sources
parent2b7eaff322e36d6434f406c8a24696d9e819fbf6 (diff)
downloadscala-b68be7fedf11a6408776e482097a7cb2af7f98a0.tar.gz
scala-b68be7fedf11a6408776e482097a7cb2af7f98a0.tar.bz2
scala-b68be7fedf11a6408776e482097a7cb2af7f98a0.zip
changes in xml node hierarchy
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml10
-rw-r--r--sources/scala/xml/nobinding/Element.scala2
2 files changed, 8 insertions, 4 deletions
diff --git a/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml b/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml
index f676893dc6..7de018711c 100644
--- a/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml
+++ b/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml
@@ -36,13 +36,17 @@ import scala.collection.mutable.HashMap ;<br/>
<elementBinding>
def constr_&ccElementName;( ch:childrenT, attrs:attribMapT ) =
new &ccElementName;(ch:_*) { <inc/><br/>
- override def attributes : Map[String,String] = attrs; <br/>
+ def attributes : Map[String,String] = attrs; <br/>
<attributeAssign>
override val &cAttributeName; = attrs.get(&qAttributeName;); <br/>
- val attribHashCode: int = attrs.hashCode() ;<br/>
</attributeAssign>
+ val attribHashCode: int = attrs.toList.hashCode() ;<br/>
};<dec/><br/>
- case class &ccElementName;( ch:Node* ) extends scala.xml.AttributedNode {<inc/><br/>
+ def &ccElementName;( ch:Node* ) = new &ccElementName;(ch:_*){<inc/><br/>
+ def attributes = scala.collection.immutable.ListMap.Empty[String,String];<br/>
+ val attribHashCode = 0;
+ };
+ abstract case class &ccElementName;( ch:Node* ) extends scala.xml.AttributedNode {<inc/><br/>
def label = &qElementName;; <br/>
def children = ch;<br/>
<attributeBinding>
diff --git a/sources/scala/xml/nobinding/Element.scala b/sources/scala/xml/nobinding/Element.scala
index 71915f334c..f5e010fbc8 100644
--- a/sources/scala/xml/nobinding/Element.scala
+++ b/sources/scala/xml/nobinding/Element.scala
@@ -5,7 +5,7 @@ import scala.collection.immutable.ListMap ;
/** an XML node. use this when data binding is not desired.
**/
-case class Element( symbol: Symbol, ch: List[Node] ) extends AttributedNode {
+class Element( symbol: Symbol, ch: Seq[Node] ) extends AttributedNode {
def label = symbol.name;
def children = ch;