From e5ae9a3ec8f0c73d97b26c20a0308146233be1ea Mon Sep 17 00:00:00 2001 From: buraq Date: Mon, 17 Nov 2003 13:08:08 +0000 Subject: def attributes was inserted multiple times --- .../tools/dtd2scala/template/ObjectTemplate.scala.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml b/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml index 52a6ce567c..2be3636760 100644 --- a/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml +++ b/sources/scala/tools/dtd2scala/template/ObjectTemplate.scala.xml @@ -5,7 +5,7 @@ '> '> '> - '> + '> '> '> ]> @@ -22,7 +22,7 @@ import scala.collection.mutable.HashMap ;
/** the following elements are bound * &elementName; : &elementContentModel; { - &attributeName; + &attributeName;&space; } **/ @@ -35,19 +35,20 @@ import scala.collection.mutable.HashMap ;
def constr_&ccElementName;( ch:childrenT, attrs:attribMapT ) = - new &ccElementName;(ch:_*) { + new &ccElementName;(ch:_*) {
+ override def attributes : Map[String,String] = attrs;
- override def attributes = attrs; - override val &ccAttributeName; = attrs.get(&qAttributeName;); + override val &cAttributeName; = attrs.get(&qAttributeName;);
- }; + };
case class &ccElementName;( ch:Node* ) extends scala.xml.Node {
def label = &qElementName;;
def children = ch;
- def attributes : Map[String,String] = null; /*o'ridden at parse time */
- val attribHashCode: int = 0 ; /* overridden at parse time */
+ /* these methods are overridden at parse time */
+ def attributes : Map[String,String] = new HashMap[String,String]();
+ val attribHashCode: int = 0 ;
- val &ccAttributeName; : scala.Option[String] = scala.None; + val &cAttributeName; : scala.Option[String] = scala.None; /* overridden at parse time */
} -- cgit v1.2.3