From b68be7fedf11a6408776e482097a7cb2af7f98a0 Mon Sep 17 00:00:00 2001 From: buraq Date: Thu, 27 Nov 2003 13:11:21 +0000 Subject: changes in xml node hierarchy --- .../scala/tools/dtd2scala/template/ObjectTemplate.scala.xml | 10 +++++++--- sources/scala/xml/nobinding/Element.scala | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sources') 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 ;
def constr_&ccElementName;( ch:childrenT, attrs:attribMapT ) = new &ccElementName;(ch:_*) {
- override def attributes : Map[String,String] = attrs;
+ def attributes : Map[String,String] = attrs;
override val &cAttributeName; = attrs.get(&qAttributeName;);
- val attribHashCode: int = attrs.hashCode() ;
+ val attribHashCode: int = attrs.toList.hashCode() ;
};
- case class &ccElementName;( ch:Node* ) extends scala.xml.AttributedNode {
+ def &ccElementName;( ch:Node* ) = new &ccElementName;(ch:_*){
+ def attributes = scala.collection.immutable.ListMap.Empty[String,String];
+ val attribHashCode = 0; + }; + abstract case class &ccElementName;( ch:Node* ) extends scala.xml.AttributedNode {
def label = &qElementName;;
def children = ch;
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; -- cgit v1.2.3