From f805b1683ff95e57ab913759cbf65b01608f5dd4 Mon Sep 17 00:00:00 2001 From: buraq Date: Fri, 3 Oct 2003 14:06:35 +0000 Subject: made xml elements mostly immutable, had to adap... made xml elements mostly immutable, had to adapt test cases --- test/files/xml/lnk.check | 2 +- test/files/xml/lnk.scala | 4 ++-- test/files/xml/xhtml.check | 2 +- test/files/xml/xhtml.scala | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/files/xml/lnk.check b/test/files/xml/lnk.check index dd2eb1e512..7d1d8a00c8 100644 --- a/test/files/xml/lnk.check +++ b/test/files/xml/lnk.check @@ -1,2 +1,2 @@ -hello-link +hello-link LDAP LinksOpenLDAP Administration Guidecontains very readable section "What is LDAP"LDAP RFCsRFC2251 Lightweight Directory Access Protocol (v3)Lightweight Directory Access Protocol (v3): Attribute Syntax DefinitionsLightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names The String Representation of LDAP Search FiltersLDAP and Lotus NotesLDAP enabled on Notes... to change settingsReplicating Notes data to OpenLDAP diff --git a/test/files/xml/lnk.scala b/test/files/xml/lnk.scala index 72ccc117ec..b338724c89 100644 --- a/test/files/xml/lnk.scala +++ b/test/files/xml/lnk.scala @@ -9,12 +9,12 @@ 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")(Nil); // safe + val b: Element = dtd._factory.get("link").match { case Some(x) => x(Nil)}; // safe // !!! System.out.println(b.toXML); // construct data using constructor val c = Link(Name(PCDATA("hello-link"))); - c.getAttribs.put("target", "http://www.scala.org"); + //c.getAttribs.update("target", "http://www.scala.org"); System.out.println(c.toXML); // construct data using loading from a file diff --git a/test/files/xml/xhtml.check b/test/files/xml/xhtml.check index e6ff269280..b9292c7b38 100644 --- a/test/files/xml/xhtml.check +++ b/test/files/xml/xhtml.check @@ -1,3 +1,3 @@ -a basic xhtml page

Welcome to xhtml in scala

a paragraph

another one, with a link to the LAMP homepage.

+a basic xhtml page

Welcome to xhtml in scala

a paragraph

another one, with a link to the LAMP homepage.

html(List(head(List(title(List(PCDATA(a basic xhtml page))))),body(List(h1(List(PCDATA(Welcome to xhtml in scala))),p(List(PCDATA(a paragraph))),p(List(PCDATA(another, with a ),a(List(PCDATA(example link))),PCDATA( to lamp homepage))))))) a basic xhtml page

Welcome to xhtml in scala

a paragraph

another, with a example link to lamp homepage

diff --git a/test/files/xml/xhtml.scala b/test/files/xml/xhtml.scala index 623dbfbe96..0a6fc72d56 100644 --- a/test/files/xml/xhtml.scala +++ b/test/files/xml/xhtml.scala @@ -8,9 +8,9 @@ object Test { def main( argv:Array[String] ) = { val link = A(PCDATA("link")); - val m = new scala.xml.javaAdapter.HashMap[String, String]; - m.put("href","http://lampwww.epfl.ch"); - link.setAttribs(m); + //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")), -- cgit v1.2.3