summaryrefslogtreecommitdiff
path: root/src/dotnet-library/scala/xml/TopScope.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotnet-library/scala/xml/TopScope.scala')
-rw-r--r--src/dotnet-library/scala/xml/TopScope.scala38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/dotnet-library/scala/xml/TopScope.scala b/src/dotnet-library/scala/xml/TopScope.scala
new file mode 100644
index 0000000000..e42cdf736d
--- /dev/null
+++ b/src/dotnet-library/scala/xml/TopScope.scala
@@ -0,0 +1,38 @@
+/* __ *\
+** ________ ___ / / ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | **
+** /____/\___/_/ |_/____/_/ | | **
+** |/ **
+\* */
+
+// $Id$
+package scala.xml;
+
+import compat.StringBuilder
+
+/** top level namespace scope. only contains the predefined binding
+ * for the "xml" prefix which is bound to
+ * "http://www.w3.org/XML/1998/namespace"
+ */
+case object TopScope extends NamespaceBinding(null, null, null) {
+
+ override def getURI(prefix1: String): String =
+ if(prefix1 == "xml" /*XML.xml*/)
+ "http://www.w3.org/XML/1998/namespace"
+ else
+ null;
+
+ override def getPrefix(uri1: String): String =
+ if(uri1 == "http://www.w3.org/XML/1998/namespace" /*XML.namespace*/)
+ "xml" //XML.xml
+ else
+ null;
+
+ override def toString() = "";
+
+ override def toString(stop: NamespaceBinding) = "";
+
+ override def toString(sb: StringBuilder, ignore: NamespaceBinding) = {};
+
+}