From ba17480ab2c61075133f896be22e539ec554c82d Mon Sep 17 00:00:00 2001 From: paltherr Date: Mon, 25 Aug 2003 15:00:54 +0000 Subject: - Added xml test lnk --- test/files/xml/lnk.check | 2 ++ test/files/xml/lnk.dtd | 13 ++++++++++++ test/files/xml/lnk.scala | 25 ++++++++++++++++++++++ test/files/xml/lnk.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 test/files/xml/lnk.check create mode 100644 test/files/xml/lnk.dtd create mode 100644 test/files/xml/lnk.scala create mode 100644 test/files/xml/lnk.xml (limited to 'test') diff --git a/test/files/xml/lnk.check b/test/files/xml/lnk.check new file mode 100644 index 0000000000..768cdd195c --- /dev/null +++ b/test/files/xml/lnk.check @@ -0,0 +1,2 @@ +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.dtd b/test/files/xml/lnk.dtd new file mode 100644 index 0000000000..e0ede56aba --- /dev/null +++ b/test/files/xml/lnk.dtd @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/test/files/xml/lnk.scala b/test/files/xml/lnk.scala new file mode 100644 index 0000000000..72ccc117ec --- /dev/null +++ b/test/files/xml/lnk.scala @@ -0,0 +1,25 @@ +// $Id$ + +import scala.xml.PCDATA; +import scala.xml.Element; +import dtd._; + +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 + // !!! System.out.println(b.toXML); + + // construct data using constructor + val c = Link(Name(PCDATA("hello-link"))); + c.getAttribs.put("target", "http://www.scala.org"); + System.out.println(c.toXML); + + // construct data using loading from a file + val lnkDB = load(args(0)); + System.out.println(lnkDB.toXML); + } + +} diff --git a/test/files/xml/lnk.xml b/test/files/xml/lnk.xml new file mode 100644 index 0000000000..c4605be246 --- /dev/null +++ b/test/files/xml/lnk.xml @@ -0,0 +1,54 @@ + + + + + + + LDAP Links + + + OpenLDAP Administration Guide + contains very readable section "What is LDAP" + + + + LDAP RFCs + + + RFC2251 Lightweight Directory Access Protocol (v3) + + + + Lightweight Directory Access Protocol (v3): + Attribute Syntax Definitions + + + + Lightweight Directory Access Protocol (v3): + UTF-8 String Representation of Distinguished Names + + + + + The String Representation of LDAP Search Filters + + + + + + + + LDAP and Lotus Notes + + + LDAP enabled on Notes... to change settings + + + + Replicating Notes data to OpenLDAP + + + + + + -- cgit v1.2.3