diff options
author | buraq <buraq@epfl.ch> | 2003-10-03 14:06:35 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2003-10-03 14:06:35 +0000 |
commit | f805b1683ff95e57ab913759cbf65b01608f5dd4 (patch) | |
tree | 25019aa62ca8517aa3c347deca5f7baa03d73c45 /test/files | |
parent | 9baa6069ce93ff300d3b3901d3138dd6fcd67191 (diff) | |
download | scala-f805b1683ff95e57ab913759cbf65b01608f5dd4.tar.gz scala-f805b1683ff95e57ab913759cbf65b01608f5dd4.tar.bz2 scala-f805b1683ff95e57ab913759cbf65b01608f5dd4.zip |
made xml elements mostly immutable, had to adap...
made xml elements mostly immutable, had to adapt test cases
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/xml/lnk.check | 2 | ||||
-rw-r--r-- | test/files/xml/lnk.scala | 4 | ||||
-rw-r--r-- | test/files/xml/xhtml.check | 2 | ||||
-rw-r--r-- | 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 @@ -<link target="http://www.scala.org"><name>hello-link</name></link> +<link><name>hello-link</name></link> <lnkDB><linkgroup><groupname>LDAP Links</groupname><link target="http://www.openldap.org/doc/"><name>OpenLDAP Administration Guide</name><description>contains very readable section "What is LDAP"</description></link><linkgroup><groupname>LDAP RFCs</groupname><link target="ftp://ftp.isi.edu/in-notes/rfc2251.txt"><name>RFC2251 Lightweight Directory Access Protocol (v3)</name></link><link target="ftp://ftp.isi.edu/in-notes/rfc2252.txt"><name>Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions</name></link><link target="ftp://ftp.isi.edu/in-notes/rfc2253.txt"><name>Lightweight Directory Access Protocol (v3): UTF-8 String Representation of Distinguished Names </name></link><link target="ftp://ftp.isi.edu/in-notes/rfc2254.txt"><name>The String Representation of LDAP Search Filters</name></link></linkgroup><linkgroup><groupname>LDAP and Lotus Notes</groupname><link target="http://www.shmoo.com/mail/fw1/jul99/msg00040.html"><name>LDAP enabled on Notes... to change settings</name></link><link target="http://www.openldap.org/lists/openldap-general/200103/msg00004.html"><name>Replicating Notes data to OpenLDAP</name></link></linkgroup></linkgroup></lnkDB> 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 @@ -<html><head><title>a basic xhtml page</title></head><body><h1>Welcome to xhtml in scala</h1><p>a paragraph</p><p>another one, with a <a href="http://lampwww.epfl.ch">link</a> to the LAMP homepage.</p></body></html> +<html><head><title>a basic xhtml page</title></head><body><h1>Welcome to xhtml in scala</h1><p>a paragraph</p><p>another one, with a <a>link</a> to the LAMP homepage.</p></body></html> 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))))))) <html version="-//W3C//DTD XHTML Basic 1.0//EN"><head profile=""><title>a basic xhtml page</title></head><body><h1>Welcome to xhtml in scala</h1><p>a paragraph</p><p>another, with a <a href="http://lampwww.epfl.ch">example link</a> to lamp homepage</p></body></html> 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")), |