From 4f8b58c0aed01c7a2659963ab658e5dd4239d9c4 Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 25 Aug 2003 15:20:27 +0000 Subject: - Added xhtml test --- test/files/xml/xhtml.check | 3 + test/files/xml/xhtml.dtd | 3087 ++++++++++++++++++++++++++++++++++++++++++++ test/files/xml/xhtml.scala | 27 + test/files/xml/xhtml.xml | 12 + 4 files changed, 3129 insertions(+) create mode 100644 test/files/xml/xhtml.check create mode 100644 test/files/xml/xhtml.dtd create mode 100644 test/files/xml/xhtml.scala create mode 100644 test/files/xml/xhtml.xml diff --git a/test/files/xml/xhtml.check b/test/files/xml/xhtml.check new file mode 100644 index 0000000000..37cc1d6924 --- /dev/null +++ b/test/files/xml/xhtml.check @@ -0,0 +1,3 @@ +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.dtd b/test/files/xml/xhtml.dtd new file mode 100644 index 0000000000..8f9aebc175 --- /dev/null +++ b/test/files/xml/xhtml.dtd @@ -0,0 +1,3087 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + +]]> + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +%xhtml-events.mod;]]> + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + +]]> + + +]]> + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + +]]> + + + +]]> + + + + + + + + +]]> + + + +]]> + + + + +]]> + + + +]]> + + + + +]]> + + + +]]> + + + + +]]> + + + +]]> + + + + +]]> + + + +]]> + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + +]]> + + + + + + + + + + + + + + + + +]]> + + + +]]> + + + + + + + +]]> + + + + + + +]]> + + + + + + + +]]> + + + +]]> + + + + + + + +]]> + + + + + + + +]]> + + + + + diff --git a/test/files/xml/xhtml.scala b/test/files/xml/xhtml.scala new file mode 100644 index 0000000000..623dbfbe96 --- /dev/null +++ b/test/files/xml/xhtml.scala @@ -0,0 +1,27 @@ +// $Id$ + +import scala.xml.PCDATA; +import dtd._; + +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 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); + System.out.println(page.toXML) ; + + val doc = load(argv(0)); + System.out.println(doc); + System.out.println(doc.toXML); + } + +} diff --git a/test/files/xml/xhtml.xml b/test/files/xml/xhtml.xml new file mode 100644 index 0000000000..cccc4885d5 --- /dev/null +++ b/test/files/xml/xhtml.xml @@ -0,0 +1,12 @@ + + + + + a basic xhtml page + + +

Welcome to xhtml in scala

+

a paragraph

+

another, with a example link to lamp homepage

+ + -- cgit v1.2.3