diff options
author | Burak Emir <emir@epfl.ch> | 2006-05-09 14:16:14 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-05-09 14:16:14 +0000 |
commit | 3379165fc10883211f6de9ed6ea89b5424c4bf86 (patch) | |
tree | 776d2febeec3c3c408fed9dc37daec2ca486e41e /src/library | |
parent | f20335d1907a7c71f37f627753ffdf9200240e04 (diff) | |
download | scala-3379165fc10883211f6de9ed6ea89b5424c4bf86.tar.gz scala-3379165fc10883211f6de9ed6ea89b5424c4bf86.tar.bz2 scala-3379165fc10883211f6de9ed6ea89b5424c4bf86.zip |
removed xsd stuff
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/xml/xsd/ContentModel.scala | 51 | ||||
-rw-r--r-- | src/library/scala/xml/xsd/Decl.scala | 28 | ||||
-rw-r--r-- | src/library/scala/xml/xsd/XsTypeSymbol.scala | 40 |
3 files changed, 0 insertions, 119 deletions
diff --git a/src/library/scala/xml/xsd/ContentModel.scala b/src/library/scala/xml/xsd/ContentModel.scala deleted file mode 100644 index 6e699b4bbc..0000000000 --- a/src/library/scala/xml/xsd/ContentModel.scala +++ /dev/null @@ -1,51 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.xml.xsd; - - -import scala.util.regexp.WordExp; -import scala.util.automata._; - -object ContentModel extends WordExp { - - type _labelT = ElemRef; - type _regexpT = RegExp; - - object Translator extends WordBerrySethi { - override val lang: ContentModel.this.type = ContentModel.this; - import lang._ ; - } - - case class ElemRef(name: String) extends Label { - override def toString() = name; - } - - def fromSchema(nodes:Seq[Node]): List[RegExp] = - nodes.foldLeft (Nil:List[RegExp]) { (list, n:Node) => fromSchema(n)::list }.reverse; - - def fromSchema(node:Node): RegExp = node.label match { - case "sequence" => Sequ(fromSchema(node.child):_*); - case "choice" => Alt(fromSchema(node.child):_*); - case "group" => Sequ(fromSchema(node.child):_*); - case "element" => - val name = node.attribute("name").toString(); - Letter(ElemRef(name)); // ouch, anonymous? references? - } -} - -sealed abstract class ContentModel ; - -case class ELEMENTS(r:ContentModel.RegExp) extends ContentModel ; - -case class MIXED(r:ContentModel.RegExp) extends ContentModel ; - -case object SimpleContent extends ContentModel ; diff --git a/src/library/scala/xml/xsd/Decl.scala b/src/library/scala/xml/xsd/Decl.scala deleted file mode 100644 index 9d182c2534..0000000000 --- a/src/library/scala/xml/xsd/Decl.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2006, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.xml.xsd; - - -abstract class Decl; - -/** name - label of the element - * typeName - reference to a (possibly generated) type name - */ -case class ElemDecl(name: String, tpe: TypeSymbol) extends Decl; - -abstract class TypeDecl ; - -case class ComplexTypeDecl(name: String, derivedFrom: DerivSym, contentModel: ContentModel) extends TypeDecl; - -case class SimpleTypeDecl(name: String) extends TypeDecl;; - -abstract class xsdBuiltin(name: String) extends SimpleTypeDecl(name); diff --git a/src/library/scala/xml/xsd/XsTypeSymbol.scala b/src/library/scala/xml/xsd/XsTypeSymbol.scala deleted file mode 100644 index 970efe6ac9..0000000000 --- a/src/library/scala/xml/xsd/XsTypeSymbol.scala +++ /dev/null @@ -1,40 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.xml.xsd; - - -abstract class XsTypeSymbol extends xml.TypeSymbol; - -object xsdAny extends XsTypeSymbol ; - -class SimpleTypeSymbol(val name: String) extends XsTypeSymbol { - var decl: SimpleTypeDecl = null; -} - -class ComplexTypeSymbol(val name: String) extends XsTypeSymbol { - var decl: ComplexTypeDecl = null; -} - -abstract class DerivSym; - -case class Extends(sym:XsTypeSymbol) extends DerivSym; - -case class Restricts(sym:XsTypeSymbol) extends DerivSym; - -object xsBoolean extends SimpleTypeSymbol("boolean") {} -object xsDouble extends SimpleTypeSymbol("double") {} -object xsFloat extends SimpleTypeSymbol("float") {} -object xsInt extends SimpleTypeSymbol("int") {} -object xsLong extends SimpleTypeSymbol("long") {} -object xsShort extends SimpleTypeSymbol("short") {} -object xsString extends SimpleTypeSymbol("string") {} -object xsDate extends SimpleTypeSymbol("date") {} |