summaryrefslogtreecommitdiff
path: root/test/files/xml
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-06-25 17:29:50 +0000
committerburaq <buraq@epfl.ch>2004-06-25 17:29:50 +0000
commitd4e3c78e738e37a0ba5fa5eb8b5196a8556d2c53 (patch)
treeeda1c098f09aa6283333550d05a86d541a030f6a /test/files/xml
parentf3129f0da6487fd6a33fc40ee1d19a1c6c5de06b (diff)
downloadscala-d4e3c78e738e37a0ba5fa5eb8b5196a8556d2c53.tar.gz
scala-d4e3c78e738e37a0ba5fa5eb8b5196a8556d2c53.tar.bz2
scala-d4e3c78e738e37a0ba5fa5eb8b5196a8556d2c53.zip
namespaces
Diffstat (limited to 'test/files/xml')
-rw-r--r--test/files/xml/lnk.check4
-rw-r--r--test/files/xml/lnk.namespace1
-rw-r--r--test/files/xml/lnk.scala9
-rw-r--r--test/files/xml/xhtml.check4
-rw-r--r--test/files/xml/xhtml.namespace1
-rw-r--r--test/files/xml/xhtml.scala15
6 files changed, 24 insertions, 10 deletions
diff --git a/test/files/xml/lnk.check b/test/files/xml/lnk.check
index f9f959fd5a..e7dca84cc8 100644
--- a/test/files/xml/lnk.check
+++ b/test/files/xml/lnk.check
@@ -1,5 +1,5 @@
-<link target="http://www.scala.org"><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 &quot;What is LDAP&quot;</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):
+<link target="http://www.scala.org" xmlns="http://scala.epfl.ch/testSuite/links"><name>hello-link</name></link>
+<lnkDB xmlns="http://scala.epfl.ch/testSuite/links"><linkgroup><groupname>LDAP Links</groupname><link target="http://www.openldap.org/doc/"><name>OpenLDAP Administration Guide</name><description>contains very readable section &quot;What is LDAP&quot;</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.namespace b/test/files/xml/lnk.namespace
new file mode 100644
index 0000000000..5d787d9564
--- /dev/null
+++ b/test/files/xml/lnk.namespace
@@ -0,0 +1 @@
+http://scala.epfl.ch/testSuite/links \ No newline at end of file
diff --git a/test/files/xml/lnk.scala b/test/files/xml/lnk.scala
index 962c2f9149..8d81eae609 100644
--- a/test/files/xml/lnk.scala
+++ b/test/files/xml/lnk.scala
@@ -1,6 +1,6 @@
// $Id$
-import scala.xml.Node;
+import scala.xml.{Attribute, AttributeSeq, Node};
import dtd._;
object Test {
@@ -14,7 +14,12 @@ object Test {
// !!! System.out.println(b.toXML);
// construct data using constructor
- val c = Link(n + "target" -> "http://www.scala.org", Name(n, scala.xml.Text("hello-link")));
+ val c = Link(
+ new AttributeSeq(
+ Attribute("","target","http://www.scala.org")
+ ),
+ Name(n, scala.xml.Text("hello-link"))
+ );
//c.getAttribs.update("target", "http://www.scala.org");
System.out.println( c );
diff --git a/test/files/xml/xhtml.check b/test/files/xml/xhtml.check
index 50186a8428..1cb0cbf6b4 100644
--- a/test/files/xml/xhtml.check
+++ b/test/files/xml/xhtml.check
@@ -1,2 +1,2 @@
-<html version="-//W3C//DTD XHTML Basic 1.0//EN" xmlns="http://www.w3.org/1999/xhtml"><head profile="" xmlns="http://www.w3.org/1999/xhtml"><base href="http://here.edu" xmlns="http://www.w3.org/1999/xhtml"></base><title xmlns="http://www.w3.org/1999/xhtml">a basic xhtml page</title></head><body xmlns="http://www.w3.org/1999/xhtml"><h1 xmlns="http://www.w3.org/1999/xhtml">Welcome to xhtml in scala</h1><p xmlns="http://www.w3.org/1999/xhtml">a paragraph</p><p xmlns="http://www.w3.org/1999/xhtml">another one, with a <a href="http://lampwww.epfl.ch" xmlns="http://www.w3.org/1999/xhtml">link</a> to the LAMP homepage.</p></body></html>
-<html version="-//W3C//DTD XHTML Basic 1.0//EN" xmlns="http://www.w3.org/1999/xhtml"><head profile="" xmlns="http://www.w3.org/1999/xhtml"><base href="here.com" xmlns="http://www.w3.org/1999/xhtml"></base><title xmlns="http://www.w3.org/1999/xhtml">a basic xhtml page</title></head><body xmlns="http://www.w3.org/1999/xhtml"><h1 xmlns="http://www.w3.org/1999/xhtml">Welcome to xhtml in scala</h1><p xmlns="http://www.w3.org/1999/xhtml">a paragraph</p><p xmlns="http://www.w3.org/1999/xhtml">another, with a <a href="http://lampwww.epfl.ch" xmlns="http://www.w3.org/1999/xhtml">example link</a> to lamp homepage</p></body></html>
+<html version="-//W3C//DTD XHTML Basic 1.0//EN" xmlns="http://www.w3.org/1999/xhtml"><head profile=""><base href="http://here.edu"></base><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 version="-//W3C//DTD XHTML Basic 1.0//EN" xmlns="http://www.w3.org/1999/xhtml"><head profile=""><base href="here.com"></base><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.namespace b/test/files/xml/xhtml.namespace
new file mode 100644
index 0000000000..4685ae94e0
--- /dev/null
+++ b/test/files/xml/xhtml.namespace
@@ -0,0 +1 @@
+http://www.w3.org/1999/xhtml \ No newline at end of file
diff --git a/test/files/xml/xhtml.scala b/test/files/xml/xhtml.scala
index e1510456c7..07cf3a1a74 100644
--- a/test/files/xml/xhtml.scala
+++ b/test/files/xml/xhtml.scala
@@ -1,6 +1,6 @@
// $Id$
-import scala.xml.{Node,Text};
+import scala.xml.{Attribute, AttributeSeq, Node, Text};
import dtd._;
object Test {
@@ -8,8 +8,12 @@ object Test {
val n = Node.NoAttributes;
def main( argv:Array[String] ) = {
- val link = A( n + "href" -> "http://lampwww.epfl.ch",
- Text("link"));
+ val link = A(
+ new AttributeSeq(
+ Attribute("","href","http://lampwww.epfl.ch")
+ ),
+ Text("link")
+ );
//val m = new scala.collection.mutable.HashMap[String, String];
//m.put("href","http://lampwww.epfl.ch");
@@ -21,7 +25,10 @@ object Test {
P(n,Text("another one, with a "),link,Text(" to the LAMP homepage.")));
val page = Html(n,
Head(n,
- Base(n+"href" -> "http://here.edu"),
+ Base(
+ new AttributeSeq(
+ Attribute("","href","http://here.edu")
+ )),
Title(n,Text("a basic xhtml page"))),
body);
System.out.println( page ) ;