summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-08-17 16:24:37 +0000
committerburaq <buraq@epfl.ch>2004-08-17 16:24:37 +0000
commit33d3b46b98c166979760360800bdb673a26f297d (patch)
tree9b9eaa50fdc82f3c469d2c88120f8b7be565ce9d /sources
parent8912797e9b6b5e0347ec10f8bd34b5d6cba51c0d (diff)
downloadscala-33d3b46b98c166979760360800bdb673a26f297d.tar.gz
scala-33d3b46b98c166979760360800bdb673a26f297d.tar.bz2
scala-33d3b46b98c166979760360800bdb673a26f297d.zip
handler for xsd
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/xml/parsing/XSDHandler.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/sources/scala/xml/parsing/XSDHandler.scala b/sources/scala/xml/parsing/XSDHandler.scala
new file mode 100644
index 0000000000..5fceae89f0
--- /dev/null
+++ b/sources/scala/xml/parsing/XSDHandler.scala
@@ -0,0 +1,21 @@
+package scala.xml.parsing;
+
+import scala.collection.Map ;
+import scala.collection.{ immutable, mutable };
+
+/** This handler is adapted to the foul handling of namespaces used in
+ * W3C XML Schema, notably, that the prefixes of namespace declarations
+ * in the root element are referenced from attribute values.
+ */
+class XSDHandler extends ConstructingHandler {
+
+ /** namespace prefix map of the root element */
+ var prefixes: immutable.Map[String,String] = null;
+
+ override def internal_startPrefixMapping:Unit = {
+ if( prefixes == null )
+ prefixes = new immutable.TreeMap.Empty[String,String] incl tmpPrefix;
+ super.internal_startPrefixMapping
+ }
+
+}