summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/list/library.lst1
-rw-r--r--sources/scala/xml/EntityRef.scala34
-rw-r--r--sources/scala/xml/Text.scala5
3 files changed, 37 insertions, 3 deletions
diff --git a/config/list/library.lst b/config/list/library.lst
index a354cd9567..aecb911127 100644
--- a/config/list/library.lst
+++ b/config/list/library.lst
@@ -139,6 +139,7 @@ testing/UnitTest.scala
xml/BindingFactoryAdapter.scala
xml/Elem.scala
+xml/EntityRef.scala
xml/FactoryAdapter.scala
xml/Node.scala
xml/NodeSeq.scala
diff --git a/sources/scala/xml/EntityRef.scala b/sources/scala/xml/EntityRef.scala
new file mode 100644
index 0000000000..8a0cc85cd3
--- /dev/null
+++ b/sources/scala/xml/EntityRef.scala
@@ -0,0 +1,34 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2003-2004, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+** $Id$
+\* */
+
+package scala.xml;
+
+/** an XML node for text (PCDATA). Used in both non-bound and bound XML
+ * representations
+ * @author Burak Emir
+ * @param text the text contained in this node
+**/
+
+case class EntityRef( entityName:String ) extends Node {
+ /** the constant "#ENTITY"
+ */
+ def label = "#ENTITY";
+
+ /** always empty */
+ final def attribute = Nil;
+
+ /** always empty */
+ final def child = Nil;
+
+ override def hashCode() = entityName.hashCode();
+
+ /** returns text, with some characters escaped according to XML spec */
+ override def toString() = "&"+entityName+";";
+
+}
diff --git a/sources/scala/xml/Text.scala b/sources/scala/xml/Text.scala
index 1c5ab0ddb2..4c9ecebfe6 100644
--- a/sources/scala/xml/Text.scala
+++ b/sources/scala/xml/Text.scala
@@ -9,9 +9,8 @@
package scala.xml;
-import scala.collection.Map ;
-
-/** an XML node for text (PCDATA). Used in both non-bound and bound XML representations
+/** an XML node for text (PCDATA). Used in both non-bound and bound XML
+ * representations
* @author Burak Emir
* @param text the text contained in this node
**/