summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-06-03 07:57:51 +0000
committerburaq <buraq@epfl.ch>2004-06-03 07:57:51 +0000
commit53ee2c0a66faede5572b6658c9c6173056313112 (patch)
treef1ee91aae858d9c6e828a57de7116c15936f68b3 /test
parent446d90a2b078389c1545617dbf93a18f8b68077a (diff)
downloadscala-53ee2c0a66faede5572b6658c9c6173056313112.tar.gz
scala-53ee2c0a66faede5572b6658c9c6173056313112.tar.bz2
scala-53ee2c0a66faede5572b6658c9c6173056313112.zip
attribute validation active in dtd2scala
Diffstat (limited to 'test')
-rw-r--r--test/files/xml/lnk.check1
-rw-r--r--test/files/xml/lnk.scala7
2 files changed, 3 insertions, 5 deletions
diff --git a/test/files/xml/lnk.check b/test/files/xml/lnk.check
index 28e69cb378..f9f959fd5a 100644
--- a/test/files/xml/lnk.check
+++ b/test/files/xml/lnk.check
@@ -1,4 +1,3 @@
-<link><name>hello-link</name></link>
<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):
Attribute Syntax Definitions</name></link><link target="ftp://ftp.isi.edu/in-notes/rfc2253.txt"><name>Lightweight Directory Access Protocol (v3):
diff --git a/test/files/xml/lnk.scala b/test/files/xml/lnk.scala
index bffe6b5f10..962c2f9149 100644
--- a/test/files/xml/lnk.scala
+++ b/test/files/xml/lnk.scala
@@ -7,18 +7,17 @@ object Test {
// 3 ways to construct your data
def main(args:Array[String]) = {
+
+ val n = Node.NoAttributes ;
// construct data using original Element name
//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(scala.xml.Text("hello-link")));
+ val c = Link(n + "target" -> "http://www.scala.org", Name(n, scala.xml.Text("hello-link")));
//c.getAttribs.update("target", "http://www.scala.org");
System.out.println( c );
- val c2 = c % Pair("target", "http://www.scala.org");
- System.out.println( c2 );
-
// construct data using loading from a file
val lnkDB = load(args(0));
System.out.println( lnkDB );