From 4cf8078dabdf96dd47b512b928ef77ebac2d2a93 Mon Sep 17 00:00:00 2001 From: buraq Date: Mon, 17 Nov 2003 10:59:53 +0000 Subject: changes to XML API and parameterized binding in... changes to XML API and parameterized binding in dtd2scala better names changes to test suite --- test/files/xml/lnk.scala | 7 +++---- test/files/xml/xhtml.scala | 12 ++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'test/files/xml') diff --git a/test/files/xml/lnk.scala b/test/files/xml/lnk.scala index b338724c89..6a449d8ac4 100644 --- a/test/files/xml/lnk.scala +++ b/test/files/xml/lnk.scala @@ -1,7 +1,6 @@ // $Id$ -import scala.xml.PCDATA; -import scala.xml.Element; +import scala.xml.Node; import dtd._; object Test { @@ -9,11 +8,11 @@ object Test { // 3 ways to construct your data def main(args:Array[String]) = { // construct data using original Element name - val b: Element = dtd._factory.get("link").match { case Some(x) => x(Nil)}; // safe + //val b: Node = dtd._factory.get("link").match { case Some(x) => x(Nil,null)}; // safe // !!! System.out.println(b.toXML); // construct data using constructor - val c = Link(Name(PCDATA("hello-link"))); + val c = Link(Name(scala.xml.Text("hello-link"))); //c.getAttribs.update("target", "http://www.scala.org"); System.out.println(c.toXML); diff --git a/test/files/xml/xhtml.scala b/test/files/xml/xhtml.scala index 0a6fc72d56..06f857612b 100644 --- a/test/files/xml/xhtml.scala +++ b/test/files/xml/xhtml.scala @@ -1,22 +1,22 @@ // $Id$ -import scala.xml.PCDATA; +import scala.xml.Text; import dtd._; object Test { def main( argv:Array[String] ) = { - val link = A(PCDATA("link")); + val link = A(Text("link")); //val m = new scala.collection.mutable.HashMap[String, String]; //m.put("href","http://lampwww.epfl.ch"); //link.setAttribs(m); val body = Body( - H1(PCDATA("Welcome to xhtml in scala")), - P(PCDATA( "a paragraph")), - P(PCDATA("another one, with a "),link,PCDATA(" to the LAMP homepage."))); - val page = Html(Head(Title(PCDATA("a basic xhtml page"))), body); + H1(Text("Welcome to xhtml in scala")), + P(Text( "a paragraph")), + P(Text("another one, with a "),link,Text(" to the LAMP homepage."))); + val page = Html(Head(Title(Text("a basic xhtml page"))), body); System.out.println(page.toXML) ; val doc = load(argv(0)); -- cgit v1.2.3