diff options
author | Burak Emir <emir@epfl.ch> | 2006-03-25 12:17:25 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-03-25 12:17:25 +0000 |
commit | f15cab9b7fe396481bb5d1cfc51445a537d3c1c2 (patch) | |
tree | 72cb3d812df0b6a724a6b039d1bef9253d008eb1 /src/library | |
parent | c7e98a8e003ee900db191112efd7bc81363c9ad3 (diff) | |
download | scala-f15cab9b7fe396481bb5d1cfc51445a537d3c1c2.tar.gz scala-f15cab9b7fe396481bb5d1cfc51445a537d3c1c2.tar.bz2 scala-f15cab9b7fe396481bb5d1cfc51445a537d3c1c2.zip |
added binding for xml prefix
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/xml/TopScope.scala | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/library/scala/xml/TopScope.scala b/src/library/scala/xml/TopScope.scala index abeaab3235..b3dcb3ab1d 100644 --- a/src/library/scala/xml/TopScope.scala +++ b/src/library/scala/xml/TopScope.scala @@ -11,15 +11,23 @@ package scala.xml; - +/** 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 contains(pre:String) = false; - */ - override def getURI(_prefix: String) = null; + override def getURI(_prefix: String) = + if(_prefix == "xml") + return "http://www.w3.org/XML/1998/namespace"; + else + return null; override def getPrefix(_uri: String) = null; + if(_uri == "http://www.w3.org/XML/1998/namespace") + return "xml"; + else + return null; override def toString() = ""; |