You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(11) |
Feb
(12) |
Mar
(8) |
Apr
(16) |
May
(56) |
Jun
(20) |
Jul
(16) |
Aug
(13) |
Sep
(12) |
Oct
(15) |
Nov
|
Dec
(2) |
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(14) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jan T. <de...@us...> - 2003-05-01 10:42:12
|
Update of /cvsroot/net-script/netscript2/docs/netscript In directory sc8-pr-cvs1:/tmp/cvs-serv5086 Modified Files: wipeout.project Log Message: * examples Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/netscript/wipeout.project,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wipeout.project 31 May 2002 19:08:44 -0000 1.2 --- wipeout.project 1 May 2003 10:42:06 -0000 1.3 *************** *** 1,193 **** b ! C DmDictionary 0 1e7d7 8 ! c 0 1e851 9 ! C Category 1 1052a ! c 0 1e885 4 ! C DmString 2 1e88c 2 e3 ! c 2 1e88b a defaultExe ! C DmSet 3 1e88e 1 ! c 2 1053c 2 e3 ! L 1053c ! c 2 1e88d b executables ! c 3 1e889 3 ! c 2 10532 3 *.C ! L 10532 ! c 2 10534 4 *.cc ! L 10534 ! c 2 10536 5 *.cpp ! L 10536 ! c 2 1e888 a extensions ! c 2 1e887 a CPP_source ! c 2 1e886 4 name ! c 2 1e853 a CPP_source ! c 1 10540 ! c 0 1e8cb 4 ! c 2 1e8d2 2 e3 ! c 2 1e8d1 a defaultExe ! c 3 1e8d4 1 ! c 2 1054e 2 e3 ! L 1054e ! c 2 1e8d3 b executables ! c 3 1e8cf 1 ! c 2 10548 3 *.c ! L 10548 ! c 2 1e8ce a extensions ! c 2 1e8cd 8 C_source ! c 2 1e8cc 4 name ! c 2 1e854 8 C_source ! c 1 10552 ! c 0 1e905 4 ! c 2 1e90c 2 e3 ! c 2 1e90b a defaultExe ! c 3 1e90e 1 ! c 2 10560 2 e3 ! L 10560 ! c 2 1e90d b executables ! c 3 1e909 1 ! c 2 1055a 3 *.e ! L 1055a ! c 2 1e908 a extensions ! c 2 1e907 6 Eiffel ! c 2 1e906 4 name ! c 2 1e855 6 Eiffel ! c 1 10564 ! c 0 1e93f 4 ! c 2 1e946 2 e3 ! c 2 1e945 a defaultExe ! c 3 1e948 1 ! c 2 10578 2 e3 ! L 10578 ! c 2 1e947 b executables ! c 3 1e943 4 ! c 2 1056c 3 *.F ! L 1056c ! c 2 1056e 3 *.f ! L 1056e ! c 2 10570 5 *.for ! L 10570 ! c 2 10572 5 *.fpp ! L 10572 ! c 2 1e942 a extensions ! c 2 1e941 7 Fortran ! c 2 1e940 4 name ! c 2 1e856 7 Fortran ! c 1 1057c ! c 0 1e985 4 ! c 2 1e98c 2 e3 ! c 2 1e98b a defaultExe ! c 3 1e98e 1 ! c 2 1058c 2 e3 ! L 1058c ! c 2 1e98d b executables ! c 3 1e989 2 ! c 2 10584 3 *.H ! L 10584 ! c 2 10586 3 *.h ! L 10586 ! c 2 1e988 a extensions ! c 2 1e987 6 Header ! c 2 1e986 4 name ! c 2 1e857 6 Header ! c 1 10590 ! c 0 1e9c3 4 ! c 2 1e9ca 9 surfboard ! c 2 1e9c9 a defaultExe ! c 3 1e9cc 2 ! c 2 105a0 2 e3 ! L 105a0 ! c 2 105a2 9 surfboard ! L 105a2 ! c 2 1e9cb b executables ! c 3 1e9c7 2 ! c 2 10598 5 *.htm ! L 10598 ! c 2 1059a 6 *.html ! L 1059a ! c 2 1e9c6 a extensions ! c 2 1e9c5 4 Html ! c 2 1e9c4 4 name ! c 2 1e858 4 Html ! c 1 105a6 ! c 0 1ea05 4 ! c 2 1ea0c 2 e3 ! c 2 1ea0b a defaultExe ! c 3 1ea0e 1 ! c 2 105b4 2 e3 ! L 105b4 ! c 2 1ea0d b executables ! c 3 1ea09 1 ! c 2 105ae 6 *.java ! L 105ae ! c 2 1ea08 a extensions ! c 2 1ea07 4 Java ! c 2 1ea06 4 name ! c 2 1e859 4 Java ! c 1 105b8 ! c 0 1ea3f 4 ! c 2 1ea46 2 e3 ! c 2 1ea45 a defaultExe ! c 3 1ea48 1 ! c 2 105c6 2 e3 ! L 105c6 ! c 2 1ea47 b executables ! c 3 1ea43 1 ! c 2 105c0 5 *.tex ! L 105c0 ! c 2 1ea42 a extensions ! c 2 1ea41 5 Latex ! c 2 1ea40 4 name ! c 2 1e85a 5 Latex ! c 1 105ca ! c 0 1ea79 4 ! c 2 1ea80 2 e3 ! c 2 1ea7f a defaultExe ! c 3 1ea82 1 ! c 2 105d5 2 e3 ! L 105d5 ! c 2 1ea81 b executables ! c 3 1ea7d 0 ! c 2 1ea7c a extensions ! c 2 1ea7b 5 Other ! c 2 1ea7a 4 name ! c 2 1e85b 5 Other ! c 2 1e850 a categories ! c 0 1e85d 1 ! C ProjectDir 4 105f6 ! c 2 105f7 1a netscript2/docs/netscript/ 11 81 ! c 2 105f8 0 0 ! c 2 1e85f 1a netscript2/docs/netscript/ ! c 2 1e85c b directories ! C DmBag 5 1e7e3 2 ! c 2 1e819 e5 b ! C DmDictionary 0 1e7e5 3 ! C DmString 1 1e7f7 39 b ! C DmSet 0 134d6 1 ! C DmString 1 13630 5 Other ! L 13630 ! c 1 1e7f6 a categories ! c 1 1e7e7 c REQUIREMENTS ! c 1 1e7e6 4 name ! C DmInteger 2 1e7f9 80000001 ! c 1 1e7f8 9 substMode ! c 2 1e84e e3 b ! C DmDictionary 0 1e81a 3 ! C DmString 1 1e82c 38 b ! C DmSet 0 156dc 1 ! C DmString 1 15841 4 Html ! L 15841 ! c 1 1e82b a categories ! c 1 1e81c 11 REQUIREMENTS.html ! c 1 1e81b 4 name ! C DmInteger 2 1e82e 1 ! c 1 1e82d 9 substMode ! c 2 1e84f 5 files ! c 2 1e7df 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 1e7de 6 launch ! c 2 1e7db 4 make ! c 2 1e7da 4 make ! c 2 1e7dd 0 ! c 2 1e7dc 8 makeFile ! c 5 1e7e0 0 ! c 2 1e7e2 7 modules ! c 2 1e7d9 9 netscript ! c 2 1e7d8 4 name --- 1,195 ---- b ! C DmDictionary 0 126a0 8 ! c 0 1271c 9 ! C Category 1 3942 ! c 0 12750 4 ! C DmString 2 12757 2 e3 ! c 2 12756 a defaultExe ! C DmSet 3 12759 1 ! c 2 3951 2 e3 ! L 3951 ! c 2 12758 b executables ! c 3 12754 3 ! c 2 3958 3 *.C ! L 3958 ! c 2 395b 4 *.cc ! L 395b ! c 2 395e 5 *.cpp ! L 395e ! c 2 12753 a extensions ! c 2 12752 a CPP_source ! c 2 12751 4 name ! c 2 1271e a CPP_source ! c 1 3973 ! c 0 12796 4 ! c 2 1279d 2 e3 ! c 2 1279c a defaultExe ! c 3 1279f 1 ! c 2 3980 2 e3 ! L 3980 ! c 2 1279e b executables ! c 3 1279a 1 ! c 2 3987 3 *.c ! L 3987 ! c 2 12799 a extensions ! c 2 12798 8 C_source ! c 2 12797 4 name ! c 2 1271f 8 C_source ! c 1 399c ! c 0 127d0 4 ! c 2 127d7 2 e3 ! c 2 127d6 a defaultExe ! c 3 127d9 1 ! c 2 39a9 2 e3 ! L 39a9 ! c 2 127d8 b executables ! c 3 127d4 1 ! c 2 39b0 3 *.e ! L 39b0 ! c 2 127d3 a extensions ! c 2 127d2 6 Eiffel ! c 2 127d1 4 name ! c 2 12720 6 Eiffel ! c 1 39c5 ! c 0 1280a 4 ! c 2 12811 2 e3 ! c 2 12810 a defaultExe ! c 3 12813 1 ! c 2 39d2 2 e3 ! L 39d2 ! c 2 12812 b executables ! c 3 1280e 4 ! c 2 39d9 3 *.F ! L 39d9 ! c 2 39dc 3 *.f ! L 39dc ! c 2 39df 5 *.for ! L 39df ! c 2 39e2 5 *.fpp ! L 39e2 ! c 2 1280d a extensions ! c 2 1280c 7 Fortran ! c 2 1280b 4 name ! c 2 12721 7 Fortran ! c 1 39f7 ! c 0 12850 4 ! c 2 12857 2 e3 ! c 2 12856 a defaultExe ! c 3 12859 1 ! c 2 3a04 2 e3 ! L 3a04 ! c 2 12858 b executables ! c 3 12854 2 ! c 2 3a0b 3 *.H ! L 3a0b ! c 2 3a0e 3 *.h ! L 3a0e ! c 2 12853 a extensions ! c 2 12852 6 Header ! c 2 12851 4 name ! c 2 12722 6 Header ! c 1 3a23 ! c 0 1288e 4 ! c 2 12895 9 surfboard ! c 2 12894 a defaultExe ! c 3 12897 2 ! c 2 3a30 2 e3 ! L 3a30 ! c 2 3a33 9 surfboard ! L 3a33 ! c 2 12896 b executables ! c 3 12892 2 ! c 2 3a3a 5 *.htm ! L 3a3a ! c 2 3a3d 6 *.html ! L 3a3d ! c 2 12891 a extensions ! c 2 12890 4 Html ! c 2 1288f 4 name ! c 2 12723 4 Html ! c 1 3a52 ! c 0 128d0 4 ! c 2 128d7 2 e3 ! c 2 128d6 a defaultExe ! c 3 128d9 1 ! c 2 3a5f 2 e3 ! L 3a5f ! c 2 128d8 b executables ! c 3 128d4 1 ! c 2 3a66 6 *.java ! L 3a66 ! c 2 128d3 a extensions ! c 2 128d2 4 Java ! c 2 128d1 4 name ! c 2 12724 4 Java ! c 1 3a7b ! c 0 1290a 4 ! c 2 12911 2 e3 ! c 2 12910 a defaultExe ! c 3 12913 1 ! c 2 3a88 2 e3 ! L 3a88 ! c 2 12912 b executables ! c 3 1290e 1 ! c 2 3a8f 5 *.tex ! L 3a8f ! c 2 1290d a extensions ! c 2 1290c 5 Latex ! c 2 1290b 4 name ! c 2 12725 5 Latex ! c 1 3aa4 ! c 0 12944 4 ! c 2 1294b 2 e3 ! c 2 1294a a defaultExe ! c 3 1294d 1 ! c 2 3ab1 2 e3 ! L 3ab1 ! c 2 1294c b executables ! c 3 12948 0 ! c 2 12947 a extensions ! c 2 12946 5 Other ! c 2 12945 4 name ! c 2 12726 5 Other ! c 2 1271b a categories ! c 0 12728 1 ! C ProjectDir 4 3ace ! c 2 3acf 1a netscript2/docs/netscript/ 11 81 ! c 2 3ad0 0 0 ! c 2 1272a 1a netscript2/docs/netscript/ ! c 2 12727 b directories ! C DmBag 5 126ae 2 ! c 2 126e4 e2 b ! C DmDictionary 0 126b0 3 ! C DmString 1 126c2 36 b ! C DmSet 0 42e6 1 ! C DmString 1 4314 5 Other ! L 4314 ! c 1 126c1 a categories ! c 1 126b2 c REQUIREMENTS ! c 1 126b1 4 name ! C DmInteger 2 126c4 80000001 ! c 1 126c3 9 substMode ! c 2 12719 e0 b ! C DmDictionary 0 126e5 3 ! C DmString 1 126f7 35 b ! C DmSet 0 4325 1 ! C DmString 1 4353 4 Html ! L 4353 ! c 1 126f6 a categories ! c 1 126e7 11 REQUIREMENTS.html ! c 1 126e6 4 name ! C DmInteger 2 126f9 1 ! c 1 126f8 9 substMode ! c 2 1271a 5 files ! c 2 126a8 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 126a7 6 launch ! c 2 126a4 4 make ! c 2 126a3 4 make ! c 2 126a6 0 ! c 2 126a5 8 makeFile ! c 5 126a9 2 ! c 2 126ab 8 examples ! c 2 126ac 3 src ! c 2 126ad 7 modules ! c 2 126a2 9 netscript ! c 2 126a1 4 name |
From: Jan T. <de...@us...> - 2003-05-01 10:39:52
|
Update of /cvsroot/net-script/netscript2/docs/netscript/examples/eventcalendar In directory sc8-pr-cvs1:/tmp/cvs-serv4281 Added Files: README.html classes.xml dbsettings.xml event.xml eventReply.xml reservation.xml reservationReply.xml wipeout.project Log Message: * examples --- NEW FILE: README.html --- <pre> /---------------------------------------------------------------------\ | $Id: README.html,v 1.1 2003/05/01 10:39:49 derkork Exp $ | NetScript and all related materials, such as documentation, | are protected under the terms and conditions of the Artistic License. | | (C) 2000-2002 by Jan Thomä, insOMnia (ko...@in...) \---------------------------------------------------------------------/ Event Calendar Example ------------------------ This example shows some of the things you will encounter when programming a web application, and how these things are done in NetScript. The example particulary covers: * HTML forms processing * database usage It is meant as a bigger introductory example, which shows you a somewhat bigger application, instead of just some code snippets. This example is not meant to be complete in terms of functionality. Instead you can add new features to the example to get used to NetScript. Have fun exploring! Preparations ------------- If you want to try out this example, you need to do the following: * modify dbsettings.xml to fit your configuration (reference to the source documentation of NetScript::Libraries::DatabaseLibrary for more information) * in your database, create the following tables: - events + id : varchar(100) + name: varchar(255) + date: varchar(30) + time: varchar(5) + place: varchar(255) + cost: float - reservations + id: varchar(100) + eId: varchar(100) + amount: int * launch index.xml </pre> --- NEW FILE: classes.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Classes # $Id: classes.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <ns:ignore xmlns:ns="http://netscript.insomnia-hq.de" xmlns:db="http://db.netscript.insomnia-hq.de"> <?netscript import $(url[dbsettings.xml])?> <ns:class name="Event"> <ns:member name="id"/> <ns:member name="name"/> <ns:member name="date"/> <ns:member name="time"/> <ns:member name="place"/> <ns:member name="cost"/> <!-- Constructor --> <ns:method name="INIT"> <!-- Initialising --> <ns:var var="this.id" val="0"/> <ns:var var="this.name" val=""/> <ns:var var="this.date" val="01.01.1970"/> <ns:var var="this.time" val="00:00"/> <ns:var var="this.place" val=""/> <ns:var var="this.cost" val="0"/> </ns:method> <!-- Load the entry with the given id from the database --> <ns:method name="load" byVal="id"> <db:exec name="dbResult" handle="myDB" query="SELECT * FROM events WHERE Id LIKE '$(id)'"/> <!-- Get the result line from the result set --> <ns:invoke var="dbResult" method="nextLine"/> <!-- Fill the member variables --> <ns:if test="$(dbResult.lineFetched)"> <ns:var var="this.id" val="$(dbResult.content:0)"/> <ns:var var="this.name" val="$(dbResult.content:1)"/> <ns:var var="this.date" val="$(dbResult.content:2)"/> <ns:var var="this.time" val="$(dbResult.content:3)"/> <ns:var var="this.place" val="$(dbResult.content:4)"/> <ns:var var="this.cost" val="$(dbResult.content:5)"/> </ns:if> <ns:else> <ns:fail message= "There is no event with the id $(id)"/> </ns:else> </ns:method> <!-- Saves the event represented by this instance to the database --> <ns:method name="store"> <db:exec handle="myDB" query="DELETE FROM events WHERE id LIKE '$(this.id)'"/> <db:exec handle="myDB" query="INSERT INTO events VALUES( $(this.id), '$(this.name)', '$(this.date)', '$(this.time)', '$(this.place)', $(this.cost) )"/> </ns:method> </ns:class> <ns:class name="Reservation"> <ns:member name="id"/> <ns:member name="eId"/> <ns:member name="count"/> <!-- Constructor --> <ns:method name="INIT"> <!-- Initialising --> <ns:var var="this.id" val="0"/> <ns:var var="this.eId" val="0"/> <ns:var var="this.count" val="0"/> </ns:method> <!-- Load the entry with the given id from the database --> <ns:method name="load" byVal="id"> <db:exec name="dbResult" handle="myDB" query="SELECT * FROM reservations WHERE Id LIKE '$(id)'"/> <!-- Get the result line from the result set --> <ns:invoke var="dbResult" method="nextLine"/> <!-- Fill the member variables --> <ns:if test="$(dbResult.lineFetched)"> <ns:var var="this.id" val="$(dbResult.content:0)"/> <ns:var var="this.eId" val="$(dbResult.content:1)"/> <ns:var var="this.count" val="$(dbResult.content:2)"/> </ns:if> <ns:else> <ns:fail message= "There is no reservation with the id $(id)"/> </ns:else> </ns:method> <!-- Saves the event represented by this instance to the database --> <ns:method name="store"> <db:exec handle="myDB" query="DELETE FROM reservations WHERE id LIKE '$(this.id)'"/> <db:exec handle="myDB" query="INSERT INTO reservations VALUES( $(this.id), '$(this.eId)', '$(this.count)' )"/> </ns:method> <!-- Calculats the sum of the prices of all reserved tickets. Result is returned in the variable "price" which is given by reference. --> <ns:method name="calculatePrice" byRef="price"> <db:exec handle="myDB" name="result" query="SELECT cost FROM events WHERE Id=$(this.eId)"/> <ns:invoke var="result" method="nextLine"/> <ns:if test="$(result.lineFetched)"> <ns:var var="price" val="$(eval[$(result.content:0)*$(this.count)])"/> </ns:if> <ns:else> <ns:fail message= "There are no matching events for this reservation"/> </ns:else> </ns:method> </ns:class> </ns:ignore> --- NEW FILE: dbsettings.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Database Settings # $Id: dbsettings.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <ns:ignore xmlns:ns="http://netscript.insomnia-hq.de" xmlns:db="http://db.netscript.insomnia-hq.de"> <?netscript use Database?> <db:settings handle="myDB" host="localhost" database="kork" type="Pg" username="kork" password=""/> </ns:ignore> --- NEW FILE: event.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Event editing form # $Id: event.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <html> <head><title>Add Event</title></head> <body> <h1>Create new event</h1> <form action="$(SYS.interpreterURL)" method="POST"> <input type="hidden" name="scriptURL" value="$(url[eventReply.xml])"/> <table> <tr><td>Name</td><td> <input name="eName"/></td></tr> <tr><td>Date</td><td><input name="eDate"/></td></tr> <tr><td>Time</td><td><input name="eTime"/></td></tr> <tr><td>Place</td><td><input name="ePlace"/></td></tr> <tr><td>Price</td><td><input name="eCost"/></td></tr> </table> <input type="submit"/> </form> </body> </html> --- NEW FILE: eventReply.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Event creating reply script # $Id: eventReply.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <html xmlns:ns="http://netscript.insomnia-hq.de"> <!-- Import the classes --> <?netscript import $(url[classes.xml])?> <head><title>Create an Event</title></head> <body> <h1>Event created</h1> <ns:new name="anEvent" class="Event"/> <ns:var var="anEvent.id" val="$(SYS.nextID)"/> <ns:var var="anEvent.name" val="$(P.eName)"/> <ns:var var="anEvent.date" val="$(P.eDate)"/> <ns:var var="anEvent.time" val="$(P.eTime)"/> <ns:var var="anEvent.place" val="$(P.ePlace)"/> <ns:var var="anEvent.cost" val="$(P.eCost)"/> <ns:invoke var="anEvent" method="store"/> The event $(anEvent.name) has been successfully created. <p> <a href="$(SYS.interpreterURL)?scriptURL=$(url[index.xml])">back</a> </p> </body> </html> --- NEW FILE: reservation.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Reservation dialog # $Id: reservation.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <html xmlns:ns="http://netscript.insomnia-hq.de" xmlns:db="http://db.netscript.insomnia-hq.de"> <head><title>Reserve tickets</title></head> <body> <h1>Make a reservation</h1> <!-- Load DB settings --> <?netscript import $(url[dbsettings.xml])?> <?netscript import $(url[classes.xml])?> <db:exec handle="myDB" name="dbResult" query="SELECT id FROM events"/> <ns:invoke var="dbResult" method="nextLine"/> <ns:new name="theEvent" class="Event"/> <ns:while test="$(dbResult.lineFetched)"> <ns:invoke var="theEvent" method="load" id="$(dbResult.content:0)"/> <form action="$(SYS.interpreterURL)" method="post"> <input type="hidden" name="scriptURL" value="$(url[reservationReply.xml])"/> <input type="hidden" name="eid" value="$(theEvent.id)"/> <table> <tr><td colspan="2">$(theEvent.name)</td></tr> <tr><td colspan="2">$(theEvent.place)</td></tr> <tr><td colspan="2">$(theEvent.date) at $(theEvent.time)</td></tr> <tr><td>Price: $(theEvent.cost)</td> <td><input name="amount"/> tickets <input type="submit" value="Reserve!"/> </td> </tr> </table> <hr/> </form> <ns:invoke var="dbResult" method="nextLine"/> </ns:while> </body> </html> --- NEW FILE: reservationReply.xml --- <?xml version="1.0"?> <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # NetScript 2.0 Event Calendar Demo Script - Reservation dialog # $Id: reservationReply.xml,v 1.1 2003/05/01 10:39:49 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <html xmlns:ns="http://netscript.insomnia-hq.de"> <head><title>Reservation done</title></head> <body> <h1>Your reservation</h1> <?netscript import $(url[classes.xml])?> <ns:new name="aReservation" class="Reservation"/> <ns:var var="aReservation.id" val="$(SYS.nextID)"/> <ns:var var="aReservation.eId" val="$(P.eid)"/> <ns:var var="aReservation.count" val="$(P.amount)"/> <ns:invoke var="aReservation" method="store"/> <ns:new name="anEvent" class="Event"/> <ns:invoke var="anEvent" method="load" id="$(aReservation.eId)"/> <ns:var name="cost" val="0"/> <ns:invoke var="aReservation" method="calculatePrice" price="cost"/> Thank you for your reservation! <br/> <table border="0"> <tr> <td>Event:</td><td>$(anEvent.name)</td> </tr> <tr> <td>Date:</td><td>$(anEvent.date)</td> </tr> <tr> <td>Time:</td><td>$(anEvent.time) hours</td> </tr> <tr> <td>Number of reserved tickets:</td><td>$(aReservation.count)</td> </tr> <tr> <td>Price per ticket:</td><td>$(anEvent.cost)</td> </tr> <tr> <td>Total price:</td><td>$(cost)</td> </tr> </table> Your reservation number: $(aReservation.id). <p> <a href="$(SYS.interpreterURL)?scriptURL=$(url[index.xml])">back</a> </p> </body> </html> --- NEW FILE: wipeout.project --- b C DmDictionary 0 4989d 8 c 0 49a20 9 C Category 1 146a7 c 0 49a60 4 C DmString 2 49a67 2 e3 c 2 49a66 a defaultExe C DmSet 3 49a69 1 c 2 146b9 2 e3 L 146b9 c 2 49a68 b executables c 3 49a64 3 c 2 146af 3 *.C L 146af c 2 146b1 4 *.cc L 146b1 c 2 146b3 5 *.cpp L 146b3 c 2 49a63 a extensions c 2 49a62 a CPP_source c 2 49a61 4 name c 2 49a22 a CPP_source c 1 146bd c 0 49aa6 4 c 2 49aad 2 e3 c 2 49aac a defaultExe c 3 49aaf 1 c 2 146cb 2 e3 L 146cb c 2 49aae b executables c 3 49aaa 1 c 2 146c5 3 *.c L 146c5 c 2 49aa9 a extensions c 2 49aa8 8 C_source c 2 49aa7 4 name c 2 49a23 8 C_source c 1 146cf c 0 49ae0 4 c 2 49ae7 2 e3 c 2 49ae6 a defaultExe c 3 49ae9 1 c 2 146dd 2 e3 L 146dd c 2 49ae8 b executables c 3 49ae4 1 c 2 146d7 3 *.e L 146d7 c 2 49ae3 a extensions c 2 49ae2 6 Eiffel c 2 49ae1 4 name c 2 49a24 6 Eiffel c 1 146e1 c 0 49b1a 4 c 2 49b21 2 e3 c 2 49b20 a defaultExe c 3 49b23 1 c 2 146f5 2 e3 L 146f5 c 2 49b22 b executables c 3 49b1e 4 c 2 146e9 3 *.F L 146e9 c 2 146eb 3 *.f L 146eb c 2 146ed 5 *.for L 146ed c 2 146ef 5 *.fpp L 146ef c 2 49b1d a extensions c 2 49b1c 7 Fortran c 2 49b1b 4 name c 2 49a25 7 Fortran c 1 146f9 c 0 49b60 4 c 2 49b67 2 e3 c 2 49b66 a defaultExe c 3 49b69 1 c 2 14709 2 e3 L 14709 c 2 49b68 b executables c 3 49b64 2 c 2 14701 3 *.H L 14701 c 2 14703 3 *.h L 14703 c 2 49b63 a extensions c 2 49b62 6 Header c 2 49b61 4 name c 2 49a26 6 Header c 1 1470d c 0 49b9e 4 c 2 49ba5 9 surfboard c 2 49ba4 a defaultExe c 3 49ba7 2 c 2 1471d 2 e3 L 1471d c 2 1471f 9 surfboard L 1471f c 2 49ba6 b executables c 3 49ba2 2 c 2 14715 5 *.htm L 14715 c 2 14717 6 *.html L 14717 c 2 49ba1 a extensions c 2 49ba0 4 Html c 2 49b9f 4 name c 2 49a27 4 Html c 1 14723 c 0 49be0 4 c 2 49be7 2 e3 c 2 49be6 a defaultExe c 3 49be9 1 c 2 14731 2 e3 L 14731 c 2 49be8 b executables c 3 49be4 1 c 2 1472b 6 *.java L 1472b c 2 49be3 a extensions c 2 49be2 4 Java c 2 49be1 4 name c 2 49a28 4 Java c 1 14735 c 0 49c1a 4 c 2 49c21 2 e3 c 2 49c20 a defaultExe c 3 49c23 1 c 2 14743 2 e3 L 14743 c 2 49c22 b executables c 3 49c1e 1 c 2 1473d 5 *.tex L 1473d c 2 49c1d a extensions c 2 49c1c 5 Latex c 2 49c1b 4 name c 2 49a29 5 Latex c 1 14747 c 0 49c54 4 c 2 49c5b 2 e3 c 2 49c5a a defaultExe c 3 49c5d 1 c 2 14752 2 e3 L 14752 c 2 49c5c b executables c 3 49c58 0 c 2 49c57 a extensions c 2 49c56 5 Other c 2 49c55 4 name c 2 49a2a 5 Other c 2 49a1f a categories c 0 49a2c 1 C ProjectDir 4 1477f c 2 14780 31 netscript2/docs/netscript/examples/eventcalendar/ 11 81 c 2 14781 0 0 c 2 49a2e 31 netscript2/docs/netscript/examples/eventcalendar/ c 2 49a2b b directories C DmBag 5 498a9 7 c 2 498df dc b C DmDictionary 0 498ab 3 C DmString 1 498bd 38 b C DmSet 0 17de8 1 C DmString 1 17f6d 4 Html L 17f6d c 1 498bc a categories c 1 498ad b README.html c 1 498ac 4 name C DmInteger 2 498bf 1 c 1 498be 9 substMode c 2 49914 dd b C DmDictionary 0 498e0 3 C DmString 1 498f2 39 b C DmSet 0 1c4e1 1 C DmString 1 1c65b 5 Other L 1c65b c 1 498f1 a categories c 1 498e2 b classes.xml c 1 498e1 4 name C DmInteger 2 498f4 1 c 1 498f3 9 substMode c 2 49949 e0 b C DmDictionary 0 49915 3 C DmString 1 49927 39 b C DmSet 0 32f40 1 C DmString 1 330ba 5 Other L 330ba c 1 49926 a categories c 1 49917 e dbsettings.xml c 1 49916 4 name C DmInteger 2 49929 1 c 1 49928 9 substMode c 2 4997e db b C DmDictionary 0 4994a 3 C DmString 1 4995c 39 b C DmSet 0 424bb 1 C DmString 1 42635 5 Other L 42635 c 1 4995b a categories c 1 4994c 9 event.xml c 1 4994b 4 name C DmInteger 2 4995e 1 c 1 4995d 9 substMode c 2 499b3 e0 b C DmDictionary 0 4997f 3 C DmString 1 49991 39 b C DmSet 0 442bd 1 C DmString 1 44437 5 Other L 44437 c 1 49990 a categories c 1 49981 e eventReply.xml c 1 49980 4 name C DmInteger 2 49993 1 c 1 49992 9 substMode c 2 499e8 e1 b C DmDictionary 0 499b4 3 C DmString 1 499c6 39 b C DmSet 0 473e8 1 C DmString 1 47562 5 Other L 47562 c 1 499c5 a categories c 1 499b6 f reservation.xml c 1 499b5 4 name C DmInteger 2 499c8 1 c 1 499c7 9 substMode c 2 49a1d e7 b C DmDictionary 0 499e9 3 C DmString 1 499fb 39 b C DmSet 0 49718 1 C DmString 1 49892 5 Other L 49892 c 1 499fa a categories c 1 499eb 14 reservationReply.xml c 1 499ea 4 name C DmInteger 2 499fd 1 c 1 499fc 9 substMode c 2 49a1e 5 files c 2 498a5 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" c 2 498a4 6 launch c 2 498a1 4 make c 2 498a0 4 make c 2 498a3 0 c 2 498a2 8 makeFile c 5 498a6 0 c 2 498a8 7 modules c 2 4989f d eventcalendar c 2 4989e 4 name |
From: Jan T. <de...@us...> - 2002-12-04 19:24:28
|
Update of /cvsroot/net-script/netscript2/docs/netscript/src In directory sc8-pr-cvs1:/tmp/cvs-serv4593 Added Files: ExampleLibrary.pm Log Message: --- NEW FILE: ExampleLibrary.pm --- #-------------------------------------------------------- # $Id: ExampleLibrary.pm,v 1.1 2002/12/04 19:24:25 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; #/** # This is an example for a simple library. It just adds the # $(EXAMPLE)-variable to the global namespace. This variable # holds the string "This is an example." Libraries # generally should not import themselves or depend on each other. # They should just import the core classes, provided with the # interpreter and classes, which are shipped with the library. #*/ package Examples::ExampleLibary; use base qw(NetScript::Libraries::Library); use NetScript::Interpreter; #/** # Ctor. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref($proto) || $proto; my $this = $class -> SUPER::new(); $this; } sub init { my ($this, $interpreter) = @_; $this -> SUPER::init( $interpreter ); # register the variable $this -> interpreter() -> getState() -> setVariableValue( "EXAMPLE", "This is an example." ); } 1; #make require happy |
From: Jan T. <de...@us...> - 2002-12-04 19:23:17
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory sc8-pr-cvs1:/tmp/cvs-serv3372 Modified Files: Interpreter.pm Log Message: * fixed XMLParserRelay Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Interpreter.pm 26 Oct 2002 22:03:52 -0000 1.14 --- Interpreter.pm 4 Dec 2002 19:23:14 -0000 1.15 *************** *** 123,127 **** use NetScript::Engine::LibLoader; use NetScript::Engine::ClassWrapper; - use NetScript::Util::XMLParserRelay; use NetScript::Util::FileRetriever; use NetScript::Util::UIDGenerator; --- 123,126 ---- *************** *** 555,559 **** my $line = $this -> getDOMWalker() -> currentSource() -> getLine(); &handle_errors( $event -> eventMessage(). ! "\n\nError occured in or around line $line in ".$this -> getScriptURL()."\n" ); } else { --- 554,558 ---- my $line = $this -> getDOMWalker() -> currentSource() -> getLine(); &handle_errors( $event -> eventMessage(). ! "\n\nError occured in or around line $line in:\n".$this -> getScriptURL()."\n" ); } else { |
From: Jan T. <de...@us...> - 2002-10-29 11:55:52
|
Update of /cvsroot/net-script/netscript2/src/perl In directory usw-pr-cvs1:/tmp/cvs-serv20206 Modified Files: configuration Log Message: * added new options to the config file Index: configuration =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/configuration,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** configuration 3 May 2002 13:29:06 -0000 1.1 --- configuration 29 Oct 2002 11:55:49 -0000 1.2 *************** *** 9,15 **** #----------------------------------------------------------------------- ! # The base URL where the static files can be found ! STATIC=../../netscript2 --- 9,23 ---- #----------------------------------------------------------------------- ! # The base URL where the static files can be found (relative) ! STATIC=/home/kork/public_html/netscript2/pages + # The base URL where the static files can be found (HTTP-URL) + STATIC_URL=http://insomnia-hq.homeip.net/~kork/netscript2/pages + # The directory where libraries are stored + LIBDIR=/home/kork/public_html/cgi-bin/netscript2/NetScript/Libraries + # Allow http-scriptURLs and HTTP-imports (yes/no) ? + # Most people will say no here because + # it allows an attacker to run arbitrary code on the system. + ALLOW_REMOTE_SCRIPTS=no |
From: Jan T. <de...@us...> - 2002-10-29 11:54:10
|
Update of /cvsroot/net-script/netscript2/src/perl In directory usw-pr-cvs1:/tmp/cvs-serv19525 Modified Files: netscript.pl Log Message: * changed header Index: netscript.pl =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/netscript.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** netscript.pl 17 Mar 2002 19:44:22 -0000 1.1 --- netscript.pl 29 Oct 2002 11:54:07 -0000 1.2 *************** *** 6,10 **** # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- --- 6,10 ---- # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- |
Update of /cvsroot/net-script/netscript2/src/scripts In directory usw-pr-cvs1:/tmp/cvs-serv18988 Modified Files: database.xml files.xml forms.xml rimport_src.xml rimport_trg.xml strings.xml upload.xml Log Message: * added header Index: database.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/database.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** database.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- database.xml 29 Oct 2002 11:52:41 -0000 1.2 *************** *** 1,3 **** --- 1,12 ---- <?xml version="1.0"?> + <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + # NetScript 2.0 Demo Script - Database example + # $Id$ + # + # NetScript and all related materials, such as documentation, + # are protected under the terms and conditions of the Artistic License. + # (C) 2000-2002 by Jan Thomä, insOMnia + # mailto: ko...@in... + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <?netscript use Database?> Index: files.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/files.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** files.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- files.xml 29 Oct 2002 11:52:41 -0000 1.2 *************** *** 1,3 **** --- 1,12 ---- <?xml version="1.0"?> + <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + # NetScript 2.0 Demo Script - Files example + # $Id$ + # + # NetScript and all related materials, such as documentation, + # are protected under the terms and conditions of the Artistic License. + # (C) 2000-2002 by Jan Thomä, insOMnia + # mailto: ko...@in... + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <?netscript use Files?> Index: forms.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/forms.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** forms.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- forms.xml 29 Oct 2002 11:52:41 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!-- NetScript 2.0 Demo Script - Forms example --> <html xmlns:ns="http://netscript.insomnia-hq.de"> <head> --- 1,13 ---- <?xml version="1.0"?> ! <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! # NetScript 2.0 Demo Script - Forms example ! # $Id$ ! # ! # NetScript and all related materials, such as documentation, ! # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia ! # mailto: ko...@in... ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> ! <html xmlns:ns="http://netscript.insomnia-hq.de"> <head> Index: rimport_src.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/rimport_src.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rimport_src.xml 26 Oct 2002 21:10:20 -0000 1.2 --- rimport_src.xml 29 Oct 2002 11:52:41 -0000 1.3 *************** *** 1,3 **** --- 1,13 ---- <?xml version="1.0"?> + <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + # NetScript 2.0 Demo Script - RImport example (Script 1 of 2) + # $Id$ + # + # NetScript and all related materials, such as documentation, + # are protected under the terms and conditions of the Artistic License. + # (C) 2000-2002 by Jan Thomä, insOMnia + # mailto: ko...@in... + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> + <?netscript rimport ./rimport_trg.xml?> <is> Index: rimport_trg.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/rimport_trg.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rimport_trg.xml 26 Oct 2002 21:10:20 -0000 1.2 --- rimport_trg.xml 29 Oct 2002 11:52:41 -0000 1.3 *************** *** 1,3 **** --- 1,13 ---- <?xml version="1.0"?> + <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + # NetScript 2.0 Demo Script - RImport example (script 2 of 2) + # $Id$ + # + # NetScript and all related materials, such as documentation, + # are protected under the terms and conditions of the Artistic License. + # (C) 2000-2002 by Jan Thomä, insOMnia + # mailto: ko...@in... + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> + <dummy> <this> Index: strings.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/strings.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** strings.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- strings.xml 29 Oct 2002 11:52:41 -0000 1.2 *************** *** 1,3 **** --- 1,12 ---- <?xml version="1.0"?> + <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + # NetScript 2.0 Demo Script - Strings example + # $Id$ + # + # NetScript and all related materials, such as documentation, + # are protected under the terms and conditions of the Artistic License. + # (C) 2000-2002 by Jan Thomä, insOMnia + # mailto: ko...@in... + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <?netscript use Strings?> Index: upload.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/upload.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** upload.xml 18 Sep 2002 13:21:15 -0000 1.1 --- upload.xml 29 Oct 2002 11:52:41 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <!-- NetScript 2.0 Demo Script - Upload example --> <html xmlns:ns="http://netscript.insomnia-hq.de"> <head> --- 1,12 ---- <?xml version="1.0"?> ! <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! # NetScript 2.0 Demo Script - Upload example ! # $Id$ ! # ! # NetScript and all related materials, such as documentation, ! # are protected under the terms and conditions of the Artistic License. ! # (C) 2000-2002 by Jan Thomä, insOMnia ! # mailto: ko...@in... ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--> <html xmlns:ns="http://netscript.insomnia-hq.de"> <head> *************** *** 8,12 **** <body bgcolor="#FFFFFF" text="#000000"> <ns:if test="'$(P.mode)' ne 'reply'"> ! Upload a file <form method="post" action="$(SYS.interpreterURL)" enctype="multipart/form-data"> <input type="hidden" name="mode" value="reply"/> --- 16,21 ---- <body bgcolor="#FFFFFF" text="#000000"> <ns:if test="'$(P.mode)' ne 'reply'"> ! <!-- Upload a file --> ! Datei hochladen <form method="post" action="$(SYS.interpreterURL)" enctype="multipart/form-data"> <input type="hidden" name="mode" value="reply"/> *************** *** 17,25 **** </ns:if> <ns:else> ! Uploading... <ns:var name="myFile"/> <ns:var name="myBytes"/> <ns:upload directory="/home/kork/incoming" file="myFile" bytes="myBytes" parameter="myFile"/> ! Uploaded $(myFile) which had $(myBytes) bytes... </ns:else> </body> --- 26,36 ---- </ns:if> <ns:else> ! <!-- Uploading... --> ! Lade hoch... <ns:var name="myFile"/> <ns:var name="myBytes"/> <ns:upload directory="/home/kork/incoming" file="myFile" bytes="myBytes" parameter="myFile"/> ! <!-- Uploaded $(myFile) which had $(myBytes) bytes... --> ! Datei $(myFile) mit $(myBytes) Bytes erfolgreich hochgeladen... </ns:else> </body> |
From: Jan T. <de...@us...> - 2002-10-29 11:14:27
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv22998 Modified Files: ControlStructuresLibrary.pm Log Message: * added <ns:fail>-tag Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ControlStructuresLibrary.pm 26 Oct 2002 21:17:13 -0000 1.13 --- ControlStructuresLibrary.pm 29 Oct 2002 10:31:44 -0000 1.14 *************** *** 101,104 **** --- 101,112 ---- # in the document, the faster the processing will be. # </p> + # <p> + # There may be points in your program, where you want to terminate the + # script with a fatal error. The following tag can be used for this: + # <pre> + # <ns:fail message="your error message here"/> + # </pre> + # This will terminate the script with a fatal error, displaying the + # given error message. #*/ package NetScript::Libraries::ControlStructuresLibrary; *************** *** 173,197 **** if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "if") { $this -> ifStart( $domWalker, $node ); return 0; # consume event } ! elsif( $node -> getLocalName() eq "else" ) { $this -> elseStart( $domWalker, $node ); return 0; # consume event } ! elsif ($node -> getLocalName() eq "while" ) { $this -> whileStart( $domWalker, $node ); return 0; # consume event } ! elsif ($node -> getLocalName() eq "for" ) { $this -> forStart( $domWalker, $node ); return 0; # consume event } ! elsif( $node -> getLocalName() eq "ignore" ) { # Walk over the node $domWalker -> stepSourceIn(); return 0; #consume event } } return 1; # do not consume event --- 181,210 ---- if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! my $localName = $node -> getLocalName(); ! if ( $localName eq "if") { $this -> ifStart( $domWalker, $node ); return 0; # consume event } ! elsif( $localName eq "else" ) { $this -> elseStart( $domWalker, $node ); return 0; # consume event } ! elsif ( $localName eq "while" ) { $this -> whileStart( $domWalker, $node ); return 0; # consume event } ! elsif ( $localName eq "for" ) { $this -> forStart( $domWalker, $node ); return 0; # consume event } ! elsif( $localName eq "ignore" ) { # Walk over the node $domWalker -> stepSourceIn(); return 0; #consume event } + elsif( $localName eq "fail" ) { + $this -> doFail( $domWalker, $node ); + return 0; + } } return 1; # do not consume event *************** *** 199,202 **** --- 212,231 ---- #/** + # Raises a fatal error. + # @param an instance of NetScript::Engine::DOMWalker + # @param the if-node (XML::DOM2::Element) + # @private + #*/ + sub doFail { + my ( $this, $domWalker, $node ) = @_; + my $msg = $node -> getAttribute( "message" ); + $msg = $this -> interpreter() -> getStatementEvaluator() -> + evaluateStatement( $msg ); + # raise fatal error + $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( + $NetScript::Interpreter::FATAL_EVENT, $msg ); + } + + #/** # Checks the test-attribute of the given element node # for being true or false. *************** *** 429,432 **** --- 458,462 ---- my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { + my $localName = $node -> getLocalName(); if ($node -> getLocalName() eq "if") { # kill state *************** *** 450,453 **** --- 480,487 ---- return 0; #consume event } + elsif( $localName eq "fail" ) { #should never be called... + return 0; #consume event + } + } return 1; # do not consume event |
From: Jan T. <de...@us...> - 2002-10-29 10:35:37
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv24222 Modified Files: FormsLibrary.pm Log Message: * fixed infinite loop bug Index: FormsLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/FormsLibrary.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FormsLibrary.pm 24 Sep 2002 22:22:03 -0000 1.7 --- FormsLibrary.pm 29 Oct 2002 10:35:35 -0000 1.8 *************** *** 246,249 **** --- 246,250 ---- $se -> setVariable( $bytes, -3 ); } + $domWalker -> stepSourceNext(); return; } *************** *** 264,267 **** --- 265,269 ---- warn("[webfunctions] Warning: file ",$filename, " does exist. File upload skipped.\n"); $se -> setVariable( $bytes, -2 ); + $domWalker -> stepSourceNext(); return; } *************** *** 303,306 **** --- 305,309 ---- } warn("[webfunctions] Info: file upload complete. Read $overallsize bytes.\n"); + $domWalker -> stepSourceNext(); } |
From: Jan T. <de...@us...> - 2002-10-29 10:29:49
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv19775 Modified Files: EntityReference.pm Log Message: * fixed wrong method name (nodeType -> getNodeType) Index: EntityReference.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/EntityReference.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EntityReference.pm 8 Jun 2002 12:14:29 -0000 1.6 --- EntityReference.pm 29 Oct 2002 10:29:46 -0000 1.7 *************** *** 24,28 **** # @public #*/ ! sub nodeType { $XML::DOM2::Node::ENTITY_REFERENCE_NODE; } --- 24,28 ---- # @public #*/ ! sub getNodeType { $XML::DOM2::Node::ENTITY_REFERENCE_NODE; } |
From: Jan T. <de...@us...> - 2002-10-29 09:27:03
|
Update of /cvsroot/net-script/netscript2/docs/netscript/examples/eventcalendar In directory usw-pr-cvs1:/tmp/cvs-serv31911 Log Message: Status: Vendor Tag: tag1 Release Tags: tag2 No conflicts created by this import ***** Bogus filespec: - Imported sources |
From: Jan T. <de...@us...> - 2002-10-29 09:26:14
|
Update of /cvsroot/net-script/netscript2/docs/netscript/examples In directory usw-pr-cvs1:/tmp/cvs-serv31603 Log Message: Status: Vendor Tag: tag1 Release Tags: tag2 No conflicts created by this import ***** Bogus filespec: - Imported sources |
From: Jan T. <de...@us...> - 2002-10-27 11:07:38
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv26158 Modified Files: ClassLibrary.pm Log Message: * corrected documentation Index: ClassLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ClassLibrary.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClassLibrary.pm 7 Aug 2002 20:13:55 -0000 1.3 --- ClassLibrary.pm 27 Oct 2002 11:07:35 -0000 1.4 *************** *** 40,47 **** # </ns:class> # ! # <ns:var name="myCar" class="car"/> <!-- Create a new instance of car --> # <ns:invoke var="myCar" method="setColor" value="red"/> # </pre> ! # New instances of objects are created via the <code><ns:var></code> # statement. The <code><ns:invoke></code>-statement executes a # method of an object instance. --- 40,47 ---- # </ns:class> # ! # <ns:new name="myCar" class="car"/> <!-- Create a new instance of car --> # <ns:invoke var="myCar" method="setColor" value="red"/> # </pre> ! # New instances of objects are created via the <code><ns:new></code> # statement. The <code><ns:invoke></code>-statement executes a # method of an object instance. |
From: Jan T. <de...@us...> - 2002-10-26 22:03:55
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv31665 Modified Files: Interpreter.pm Log Message: * added ID-generator Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Interpreter.pm 26 Oct 2002 21:09:35 -0000 1.13 --- Interpreter.pm 26 Oct 2002 22:03:52 -0000 1.14 *************** *** 16,23 **** # registered. # ! # The interpreter delivers two global variables: # <pre> # $(SYS.interpreterURL) - URL of the interpreter # $(SYS.scriptURL) - URL of the currently executed script # </pre> # --- 16,26 ---- # registered. # ! # The interpreter delivers three global variables: # <pre> # $(SYS.interpreterURL) - URL of the interpreter # $(SYS.scriptURL) - URL of the currently executed script + # $(SYS.nextID) - contains always a unique ID, which can + # be used for any purpose. Note that this + # id is not numerical. # </pre> # *************** *** 206,209 **** --- 209,213 ---- $systemWrapper -> setMember( '^interpreterURL$', undef, "getInterpreterURL" ); $systemWrapper -> setMember( '^scriptURL$', undef, "getScriptURL" ); + $systemWrapper -> setMember( '^nextID$', undef, "getUID" ); # register the SYS-object |
From: Jan T. <de...@us...> - 2002-10-26 21:17:16
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv16756 Modified Files: ControlStructuresLibrary.pm Log Message: * changed documentation Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ControlStructuresLibrary.pm 26 Oct 2002 21:08:39 -0000 1.12 --- ControlStructuresLibrary.pm 26 Oct 2002 21:17:13 -0000 1.13 *************** *** 87,91 **** # </p> # <pre> ! # <?netscript ripoint {NAME}?> # </pre> # <p> --- 87,91 ---- # </p> # <pre> ! # <?netscript ripoint?> # </pre> # <p> *************** *** 93,97 **** # </p> # <pre> ! # <?netscript rimport {TARGETURL} {RIPOINT_NAME}?> # </pre> # <p> --- 93,97 ---- # </p> # <pre> ! # <?netscript rimport {TARGETURL} ?> # </pre> # <p> |
From: Jan T. <de...@us...> - 2002-10-26 21:10:23
|
Update of /cvsroot/net-script/netscript2/src/scripts In directory usw-pr-cvs1:/tmp/cvs-serv5773 Modified Files: rimport_src.xml rimport_trg.xml Log Message: * adopted scripts to language changes Index: rimport_src.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/rimport_src.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** rimport_src.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- rimport_src.xml 26 Oct 2002 21:10:20 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0"?> ! <?netscript rimport ./rimport_trg.xml ip01?> <is> <a>Test</a> --- 1,4 ---- <?xml version="1.0"?> ! <?netscript rimport ./rimport_trg.xml?> <is> <a>Test</a> Index: rimport_trg.xml =================================================================== RCS file: /cvsroot/net-script/netscript2/src/scripts/rimport_trg.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** rimport_trg.xml 21 Aug 2002 10:40:04 -0000 1.1.1.1 --- rimport_trg.xml 26 Oct 2002 21:10:20 -0000 1.2 *************** *** 1,10 **** <?xml version="1.0"?> - <dummy> <this> ! <?netscript ripoint ip01?> </this> <this> <?netscript import ./rimport_src.xml?> </this> </dummy> --- 1,12 ---- <?xml version="1.0"?> <dummy> <this> ! <!-- Has been r-imported from somewhere else --> ! <?netscript ripoint?> </this> <this> + <!-- Has been imported from rimport_src.xml --> <?netscript import ./rimport_src.xml?> </this> </dummy> + |
From: Jan T. <de...@us...> - 2002-10-26 21:09:40
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv4320 Modified Files: Interpreter.pm Log Message: * added documentation Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Interpreter.pm 24 Sep 2002 22:22:49 -0000 1.12 --- Interpreter.pm 26 Oct 2002 21:09:35 -0000 1.13 *************** *** 379,386 **** my $domparser = $this -> { m_DOMParser }; my $dom = undef; ! eval { $dom = $domparser -> parseString( $scriptContent ); ! }; ! if ( $@ ) { my $string = $@; $string =~ s/&/&/g; --- 379,386 ---- my $domparser = $this -> { m_DOMParser }; my $dom = undef; ! unless ( eval { $dom = $domparser -> parseString( $scriptContent ); ! 1; ! } ) { my $string = $@; $string =~ s/&/&/g; *************** *** 392,396 **** "Error while parsing the input file: " . $string ); } - # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); --- 392,395 ---- |
From: Jan T. <de...@us...> - 2002-10-26 21:08:43
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv2556 Modified Files: ControlStructuresLibrary.pm Log Message: * fixed "internal server error" when importing / rimporing a non-valid file Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ControlStructuresLibrary.pm 27 Sep 2002 17:52:23 -0000 1.11 --- ControlStructuresLibrary.pm 26 Oct 2002 21:08:39 -0000 1.12 *************** *** 60,64 **** # document after the processing instruction.If the URL has no protocol and # starts with . or .. it is treated as relative URL to the currently executed ! # script. The given document has to be an XML-compliant structure. # Hence, it must have a document element. Since # there are occasions, where you do not have or want a document element --- 60,66 ---- # document after the processing instruction.If the URL has no protocol and # starts with . or .. it is treated as relative URL to the currently executed ! # script. Note, that <?netscript import URL?> always has to be enclosed by ! # an element. ! # The given document has to be an XML-compliant structure. # Hence, it must have a document element. Since # there are occasions, where you do not have or want a document element *************** *** 78,82 **** # by using tables. So the head and the foot themselves are not valid XML # documents, and using <code>ns:ignore</code> will not help in these cases. ! # For this, this library has a reature names reverse-import. It will not import # another file into the current file, but will do the opposite of it, # import the current file into a location of another file. --- 80,84 ---- # by using tables. So the head and the foot themselves are not valid XML # documents, and using <code>ns:ignore</code> will not help in these cases. ! # For this, this library has a feature named "reverse-import". It will not import # another file into the current file, but will do the opposite of it, # import the current file into a location of another file. *************** *** 458,461 **** --- 460,464 ---- sub processingInstruction { my ( $this, $event ) = @_; + my $se = $this -> interpreter() -> getStatementEvaluator(); my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); *************** *** 465,468 **** --- 468,473 ---- my $data = $node -> getData(); if ( $data =~ /^\s*use\s*([^\s]*)/) { # check for "use LIBNAME" + my $libName = $1; + $libName = $se -> evaluateStatement( $libName ); $this -> interpreter() -> getLibLoader() -> loadLibrary( $1 ); $domWalker -> stepSourceNext(); *************** *** 471,474 **** --- 476,480 ---- elsif ( $data =~ /^\s*import\s*([^\s]+)/ ) { #check for "import FILEURL" my $fileURL = $1; + $fileURL = $se -> evaluateStatement( $fileURL ); $fileURL = $this -> checkURL( $fileURL ); *************** *** 483,495 **** my $fileData = $this -> interpreter() -> getFileRetriever() -> retrieveFile( $fileURL ); ! my $document = $this -> interpreter() -> getDOMParser() -> ! parseString( $fileData ); $this -> importDocument( $document, $domWalker, $node ); return 0; # consume event } ! elsif ( $data =~ /^\s*ripoint\s*([^\s]+)/ ) { #check for "ripoint NAME" ! my $ripointName = $1; my $targetDoc = $domWalker -> sourceDocument(); ! my $document = $this -> getReferencedDocument( $ripointName, $targetDoc ); if ( defined( $document ) ) { $this -> importDocument( $document, $domWalker, $node ); --- 489,514 ---- my $fileData = $this -> interpreter() -> getFileRetriever() -> retrieveFile( $fileURL ); ! my $document = undef; ! unless( eval { ! $document = $this -> interpreter() -> getDOMParser() -> ! parseString( $fileData ); ! 1; ! } ) { ! my $string = $@; ! $string =~ s/&/&/g; ! $string =~ s/</</g; ! $string =~ s/>/>/g; ! ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "Error while parsing the input file: " . $string ); ! } ! $this -> importDocument( $document, $domWalker, $node ); return 0; # consume event } ! elsif ( $data =~ /^\s*ripoint\s*/ ) { #check for "ripoint" my $targetDoc = $domWalker -> sourceDocument(); ! my $document = $this -> getReferencedDocument( $targetDoc ); if ( defined( $document ) ) { $this -> importDocument( $document, $domWalker, $node ); *************** *** 497,501 **** return 0; # consume event } ! elsif ( $data =~ /^\s*rimport\s+([^\s]+)\s+([^\s]+)\s*/ ) { # filter out "rimport"-PIs $domWalker -> stepSourceNext(); return 0; # consume event --- 516,520 ---- return 0; # consume event } ! elsif ( $data =~ /^\s*rimport\s+([^\s]+)\s*/ ) { # filter out "rimport"-PIs $domWalker -> stepSourceNext(); return 0; # consume event *************** *** 520,524 **** my $parent = $node -> getParentNode(); my $sibling = $node -> getNextSibling(); ! # Import all nodes of the document to the current source document for ( 0..$length ) { --- 539,548 ---- my $parent = $node -> getParentNode(); my $sibling = $node -> getNextSibling(); ! ! if ( $parent -> getNodeType() != $XML::DOM2::Node::ELEMENT_NODE ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "Cannot import! <?netscript import?> must be enclosed by an element." ); ! } # Import all nodes of the document to the current source document for ( 0..$length ) { *************** *** 571,574 **** --- 595,599 ---- my $children = $sourceDocument -> getChildNodes(); my $length = $children -> getLength() - 1; + my $se = $this -> interpreter() -> getStatementEvaluator(); for ( 0..$length ) { *************** *** 578,591 **** if ( $child -> getTarget() eq "netscript" ) { my $data = $child -> getData(); ! if ( $data =~ /^\s*rimport\s+([^\s]+)\s+([^\s]+)\s*/ ) { my $fileURL = $1; ! my $importPoint = $2; $fileURL = $this -> checkURL( $fileURL ); my $fileData = $this -> interpreter() -> getFileRetriever() -> retrieveFile( $fileURL ); ! my $document = $this -> interpreter() -> getDOMParser() -> parseString( $fileData ); $domWalker -> resetDocument( $document ); ! $this -> addDocumentReference( $importPoint, $document, $sourceDocument ); $domWalker -> sourceAgain(); return 0; # consume event; --- 603,631 ---- if ( $child -> getTarget() eq "netscript" ) { my $data = $child -> getData(); ! if ( $data =~ /^\s*rimport\s+([^\s]+)\s*/ ) { my $fileURL = $1; ! $fileURL = $se -> evaluateStatement( $fileURL ); $fileURL = $this -> checkURL( $fileURL ); my $fileData = $this -> interpreter() -> getFileRetriever() -> retrieveFile( $fileURL ); ! my $document = undef; ! ! unless( eval { ! $document = $this -> interpreter() -> getDOMParser() -> parseString( $fileData ); + 1; + } ) { + my $string = $@; + $string =~ s/&/&/g; + $string =~ s/</</g; + $string =~ s/>/>/g; + + $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( + $NetScript::Interpreter::FATAL_EVENT, + "Error while parsing the input file: " . $string ); + } + $domWalker -> resetDocument( $document ); ! $this -> addDocumentReference( $document, $sourceDocument ); $domWalker -> sourceAgain(); return 0; # consume event; *************** *** 600,604 **** # Adds a document reference. This can be used to retrieve the document which should # be inserted into an import point. - # @param the name of the import point # @param the document in which the import point must be located # @param the document to mount into the import point --- 640,643 ---- *************** *** 606,616 **** #*/ sub addDocumentReference { ! my ( $this, $name, $target, $source ) = @_; ! $this -> { m_referencedDocuments } -> { $name.$target } = $source; } #/** # Returns a document for a import point name and document. - # @param the name of the import point # @param the document in which the import point is located. # @return the document to insert into the given mountpoint, or undef --- 645,654 ---- #*/ sub addDocumentReference { ! my ( $this, $target, $source ) = @_; ! $this -> { m_referencedDocuments } -> { $target } = $source; } #/** # Returns a document for a import point name and document. # @param the document in which the import point is located. # @return the document to insert into the given mountpoint, or undef *************** *** 619,624 **** #*/ sub getReferencedDocument { ! my ( $this , $name, $target ) = @_; ! $this -> { m_referencedDocuments } -> { $name.$target }; } --- 657,662 ---- #*/ sub getReferencedDocument { ! my ( $this , $target ) = @_; ! $this -> { m_referencedDocuments } -> { $target }; } |
From: Jan T. <de...@us...> - 2002-10-23 09:35:15
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv1093 Modified Files: DatabaseLibrary.pm Log Message: * fixed wrong documentation Index: DatabaseLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DatabaseLibrary.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DatabaseLibrary.pm 24 Sep 2002 22:40:05 -0000 1.3 --- DatabaseLibrary.pm 23 Oct 2002 09:35:12 -0000 1.4 *************** *** 66,78 **** # <!-- Select all cars --> # <db:exec db="myDB" query="SELECT * FROM Car" name="allCars"/> ! # <ns:var name="numCars" val="0"/> # <ns:invoke var="allCars" method="getRemainingLines" value="numCars"/> ! # <ns:while test="$(numCars) &gt; 0"> ! # <ns:var name="aLine:!"/> ! # <ns:invoke var="allCars" method="fetchLine" value="aLine" escape="yes"/> ! # <ns:for name="i" from="0" to="$(eval[@[aLine]-1])"> ! # $(aLine:$(i)) ! # </ns:for> ! # <ns:invoke var="allCars" method="getRemainingLines" value="numCars" # </ns:while> # </example> --- 66,79 ---- # <!-- Select all cars --> # <db:exec db="myDB" query="SELECT * FROM Car" name="allCars"/> ! # <ns:var name="isCarLeft" val="1"/> # <ns:invoke var="allCars" method="getRemainingLines" value="numCars"/> ! # <ns:while test="$(isCarLeft)"> ! # <ns:invoke var="allCars" method="nextLine"/> ! # <ns:if test="$(allCars.lineFetched)"> ! # <ns:for name="i" from="0" to="$(eval[@[allCars.content]-1])"> ! # $(allCars.content:$(i)) ! # </ns:for> ! # </ns:if> ! # <ns:var var="isCarLeft" val="$(allCars.lineFetched)"/> # </ns:while> # </example> |
From: Jan T. <de...@us...> - 2002-09-27 17:53:39
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv4026 Added Files: DateLibrary.pm Log Message: * first implementation of a Date-library (not yet tested and possibly buggy) --- NEW FILE: DateLibrary.pm --- #-------------------------------------------------------- # $Id: DateLibrary.pm,v 1.1 2002/09/27 17:53:36 derkork Exp $ # # NetScript and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; #/** # This library adds support for date and time operations. # To load this library put the following statements into the netscript: # <pre> # <?netscript use Date?> # </pre> # Add the following attribute to your document element: # <pre> # <yourdocumentelement xmlns:date="http://date.netscript.insomnia-hq.de"/> # </pre> # # The library adds a global TIME-object to the namespace. You can use it as # as follows. # <pre> # $(TIME.now) - current time in milliseconds since 1.1.1970 # $(TIME.year) - the current year ( 4 digit ) # $(TIME.month) - the current month ( 1-12 ) # $(TIME.day) - the current day in month ( 1-31 ) # $(TIME.hour) - the current hour ( 0-23 ) # $(TIME.minute) - the current minute ( 0-59 ) # $(TIME.second) - the current second ( 0-59 ) # </pre> # # You can roll the parts of a given date with the following function. # <pre> # <date:roll {var|name}="<variable>" date="<date>" # [year="<amount>"] [month="<amount>"] [day="<amount>"] # [hour="<amount>"] [minute="<minute>"] [second="<second>"]/> # </pre> # Rolls the given part of the date the given amount up or down and puts # the result into the <variable< specified. Please note that the roll- # function is far from being perfect. It takes care for leap years and # DST but is not very very advanced at it. # If you have the time you might implement a better # version. (I could have used Date::Manip for this, however this module is # so damn big, its pretty useless in a web environment, since loading times # are too long .) # @note The roll-function requires the Time::Local module! # # You can print out a date using the following function: # <pre> # <date:format {var|name}="<variable>" date="<date>" # format="<format>"/> # </pre> # This formats the given date into the given format string. The following # formats are known: # <ul> # <li>%y - year</li> # <li>%M - month</li> # <li>%d - day in month</li> # <li>%h - hour</li> # <li>%m - minute</li> # <li>%s - second</li> # </ul> # #*/ package NetScript::Libraries::DateLibrary; use base qw(NetScript::Libraries::Library); use NetScript::Engine::EventListener; use NetScript::Engine::EventRelay; use NetScript::Interpreter; use NetScript::Engine::DOMWalker; use vars qw( $DATE_NAMESPACE_URI ); $DATE_NAMESPACE_URI="http://date.netscript.insomnia-hq.de"; #/** # Ctor. # @public #*/ sub new { my $proto = shift; # get Prototype my $class = ref($proto) || $proto; my $this = $class -> SUPER::new(); $this; } sub init { my ($this, $interpreter) = @_; date $this -> SUPER::init( $interpreter ); # register event listeners for the cookie-tag my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( $NetScript::Engine::DOMWalker::ELEMENT_START_EVENT, "elementStarted", $this ); my $eventListener2 = NetScript::Engine::EventListener -> new(); $eventListener2 -> init( $NetScript::Engine::DOMWalker::ELEMENT_END_EVENT, "elementFinished", $this ); my $eventRelay = $this -> interpreter() -> getEventRelay(); $eventRelay -> addEventListener( $eventListener1 ); $eventRelay -> addEventListener( $eventListener2 ); # register the time variable my $timeWrapper = NetScript::Engine::ClassWrapper -> new( $this ); $timeWrapper -> setMember( '^now$', undef, "getNow" ); $timeWrapper -> setMember( '^hour$', undef, "getHour" ); $timeWrapper -> setMember( '^minute$', undef, "getMinute" ); $timeWrapper -> setMember( '^second$', undef, "getSecond" ); $timeWrapper -> setMember( '^day$', undef, "getDay" ); $timeWrapper -> setMember( '^month$', undef, "getMonth" ); $timeWrapper -> setMember( '^year$', undef, "getYear" ); # register the TIME-object $this -> getStatementEvaluator() -> createVariable( "TIME", $timeWrapper ); } #/** # Called upon element start # @callback #*/ sub elementStarted { my ( $this, $event ) = @_; my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $DATE_NAMESPACE_URI ) { my $name = $node -> getLocalName(); if ($name eq "roll") { $this -> doRoll( $node, $domWalker ); 0; # consume event } elsif ( $name eq "format" ) { $this -> doFormat( $node, $domWalker ); 0; } else { 1; # do not consume event } } else { 1; # do not consume event } } #/** # Called upon element finish. # @callback #*/ sub elementFinished { my ( $this, $event ) = @_; my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $DATE_NAMESPACE_URI ) { my $name = $node -> getLocalName(); if ($name eq "roll" || $name eq "format") { 0; # consume event } else { 1; # do not consume } } else { 1; # do not consume event } } #/** # Rolls the given date parts and returns the result in the # given variable. # @param an instance of XML::DOM2::Element ( the roll-node ) # @param an instance of NetScript::Engine::DOMWalker #*/ sub doRoll { my ( $this, $node, $domWalker ) = @_; my ( $create, $name ) = $this -> getVariableInfo( $node ); my $se = $this -> interpreter() -> getStatementEvaluator(); unless ( eval { use Time::Local 'timelocal_nocheck'; 1; } ) { $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, "The <date:roll>-function needs the Time::Local module to be installed!" ); } my $date = $se -> evaluateStatement( $node -> getAttribute( "date" ) ); my $format = $se -> evaluateStatement( $node -> getAttribute( "format" ) ); my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime( $date ); my $secAdd = $se -> evaluateStatement( $node -> getAttribute( "second" ) ); my $minAdd = $se -> evaluateStatement( $node -> getAttribute( "minute" ) ); my $hourAdd = $se -> evaluateStatement( $node -> getAttribute( "hour" ) ); my $dayAdd = $se -> evaluateStatement( $node -> getAttribute( "day" ) ); my $monAdd = $se -> evaluateStatement( $node -> getAttribute( "month" ) ); my $yearAdd = $se -> evaluateStatement( $node -> getAttribute( "year" ) ); # XXX: the timelocal function doesnt work for months, so we have to roll # ourselves. This might be a bit buggy and has to be replaced by a # better algorithm while ( $mon + $monAdd > 11 ) { $monAdd -= 12; $yearAdd ++; } while ( $mon + $monAdd < -11 ) { $monAdd += 12; $yearAdd --; } my $result = timelocal_nocheck( $sec + $secAdd, $min + $minAdd, $hour + $hourAdd, $mday + $dayAdd, $mon + $monAdd , $year + $yearAdd ); if ( $create ) { $se -> createVariable( $name, $result ); } else { $se -> setVariable( $name, $result ); } $domWalker -> stepSourceNext(); } #/** # Formats the given date and returns the result in the # given variable. # @param an instance of XML::DOM2::Element ( the format-node ) # @param an instance of NetScript::Engine::DOMWalker #*/ sub doFormat { my ( $this, $node, $domWalker ) = @_; my ( $create, $name ) = $this -> getVariableInfo( $node ); my $se = $this -> interpreter() -> getStatementEvaluator(); my $date = $se -> evaluateStatement( $node -> getAttribute( "date" ) ); my $format = $se -> evaluateStatement( $node -> getAttribute( "format" ) ); my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime( $date ); $year += 1900; $mon += 1; $format =~ s/%s/$sec/g; $format =~ s/%m/$min/g; $format =~ s/%h/$hour/g; $format =~ s/%d/$mday/g; $format =~ s/%M/$mon/g; $format =~ s/%y/$year/g; if ( $create ) { $se -> createVariable( $name, $format ); } else { $se -> setVariable( $name, $format ); } $domWalker -> stepSourceNext(); } sub shutdown { my ($this) = @_; $this -> SUPER::shutdown(); } sub getName { "Strings Library"; } sub getVersion { 1.0; } sub getDescription { "This Library provides string functions."; } 1; #make require happy |
From: Jan T. <de...@us...> - 2002-09-27 17:52:27
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv3567 Modified Files: ControlStructuresLibrary.pm Log Message: Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ControlStructuresLibrary.pm 24 Sep 2002 22:22:03 -0000 1.10 --- ControlStructuresLibrary.pm 27 Sep 2002 17:52:23 -0000 1.11 *************** *** 54,58 **** # Currently the following include modes are supported: # <pre> ! # <?netscript import FILENAME or URL?> # </pre> # <p> --- 54,58 ---- # Currently the following include modes are supported: # <pre> ! # <?netscript import URL?> # </pre> # <p> |
From: Jan T. <de...@us...> - 2002-09-27 17:52:14
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv3450 Modified Files: wipeout.project Log Message: Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/wipeout.project,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wipeout.project 21 Aug 2002 10:34:34 -0000 1.8 --- wipeout.project 27 Sep 2002 17:52:11 -0000 1.9 *************** *** 1,281 **** b ! C DmDictionary 0 e053 8 ! c 0 e275 9 ! C Category 1 7aeb ! c 0 e2b5 4 ! C DmString 2 e2bc 2 e3 ! c 2 e2bb a defaultExe ! C DmSet 3 e2be 1 ! c 2 7afa 2 e3 ! L 7afa ! c 2 e2bd b executables ! c 3 e2b9 3 ! c 2 7b01 3 *.C ! L 7b01 ! c 2 7b04 4 *.cc ! L 7b04 ! c 2 7b07 5 *.cpp ! L 7b07 ! c 2 e2b8 a extensions ! c 2 e2b7 a CPP_source ! c 2 e2b6 4 name ! c 2 e277 a CPP_source ! c 1 7b1c ! c 0 e2fb 4 ! c 2 e302 2 e3 ! c 2 e301 a defaultExe ! c 3 e304 1 ! c 2 7b29 2 e3 ! L 7b29 ! c 2 e303 b executables ! c 3 e2ff 1 ! c 2 7b30 3 *.c ! L 7b30 ! c 2 e2fe a extensions ! c 2 e2fd 8 C_source ! c 2 e2fc 4 name ! c 2 e278 8 C_source ! c 1 7b45 ! c 0 e335 4 ! c 2 e33c 2 e3 ! c 2 e33b a defaultExe ! c 3 e33e 1 ! c 2 7b52 2 e3 ! L 7b52 ! c 2 e33d b executables ! c 3 e339 1 ! c 2 7b59 3 *.e ! L 7b59 ! c 2 e338 a extensions ! c 2 e337 6 Eiffel ! c 2 e336 4 name ! c 2 e279 6 Eiffel ! c 1 7b6e ! c 0 e36f 4 ! c 2 e376 2 e3 ! c 2 e375 a defaultExe ! c 3 e378 1 ! c 2 7b7b 2 e3 ! L 7b7b ! c 2 e377 b executables ! c 3 e373 4 ! c 2 7b82 3 *.F ! L 7b82 ! c 2 7b85 3 *.f ! L 7b85 ! c 2 7b88 5 *.for ! L 7b88 ! c 2 7b8b 5 *.fpp ! L 7b8b ! c 2 e372 a extensions ! c 2 e371 7 Fortran ! c 2 e370 4 name ! c 2 e27a 7 Fortran ! c 1 7ba0 ! c 0 e3b5 4 ! c 2 e3bc 2 e3 ! c 2 e3bb a defaultExe ! c 3 e3be 1 ! c 2 7bad 2 e3 ! L 7bad ! c 2 e3bd b executables ! c 3 e3b9 2 ! c 2 7bb4 3 *.H ! L 7bb4 ! c 2 7bb7 3 *.h ! L 7bb7 ! c 2 e3b8 a extensions ! c 2 e3b7 6 Header ! c 2 e3b6 4 name ! c 2 e27b 6 Header ! c 1 7bcc ! c 0 e3f3 4 ! c 2 e3fa 9 surfboard ! c 2 e3f9 a defaultExe ! c 3 e3fc 2 ! c 2 7bd9 2 e3 ! L 7bd9 ! c 2 7bdc 9 surfboard ! L 7bdc ! c 2 e3fb b executables ! c 3 e3f7 2 ! c 2 7be3 5 *.htm ! L 7be3 ! c 2 7be6 6 *.html ! L 7be6 ! c 2 e3f6 a extensions ! c 2 e3f5 4 Html ! c 2 e3f4 4 name ! c 2 e27c 4 Html ! c 1 7bfb ! c 0 e435 4 ! c 2 e43c 2 e3 ! c 2 e43b a defaultExe ! c 3 e43e 1 ! c 2 7c08 2 e3 ! L 7c08 ! c 2 e43d b executables ! c 3 e439 1 ! c 2 7c0f 6 *.java ! L 7c0f ! c 2 e438 a extensions ! c 2 e437 4 Java ! c 2 e436 4 name ! c 2 e27d 4 Java ! c 1 7c24 ! c 0 e46f 4 ! c 2 e476 2 e3 ! c 2 e475 a defaultExe ! c 3 e478 1 ! c 2 7c31 2 e3 ! L 7c31 ! c 2 e477 b executables ! c 3 e473 1 ! c 2 7c38 5 *.tex ! L 7c38 ! c 2 e472 a extensions ! c 2 e471 5 Latex ! c 2 e470 4 name ! c 2 e27e 5 Latex ! c 1 7c4d ! c 0 e4a9 4 ! c 2 e4b0 2 e3 ! c 2 e4af a defaultExe ! c 3 e4b2 1 ! c 2 7c5a 2 e3 ! L 7c5a ! c 2 e4b1 b executables ! c 3 e4ad 0 ! c 2 e4ac a extensions ! c 2 e4ab 5 Other ! c 2 e4aa 4 name ! c 2 e27f 5 Other ! c 2 e274 a categories ! c 0 e281 1 ! C ProjectDir 4 7c77 ! c 2 7c78 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 7c79 0 0 ! c 2 e283 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 e280 b directories ! C DmBag 5 e05f a ! c 2 e095 d7 b ! C DmDictionary 0 e061 3 ! C DmString 1 e073 36 b ! C DmSet 0 7cbd 1 ! C DmString 1 7ceb 5 Other ! L 7ceb ! c 1 e072 a categories ! c 1 e063 f ClassLibrary.pm ! c 1 e062 4 name ! C DmInteger 2 e075 1 ! c 1 e074 9 substMode ! c 2 e0ca e4 b ! C DmDictionary 0 e096 3 ! C DmString 1 e0a8 36 b ! C DmSet 0 7cfc 1 ! C DmString 1 7d2a 5 Other ! L 7d2a ! c 1 e0a7 a categories ! c 1 e098 1b ControlStructuresLibrary.pm ! c 1 e097 4 name ! C DmInteger 2 e0aa 1 ! c 1 e0a9 9 substMode ! c 2 e0ff db b ! C DmDictionary 0 e0cb 3 ! C DmString 1 e0dd 36 b ! C DmSet 0 7d3b 1 ! C DmString 1 7d69 5 Other ! L 7d69 ! c 1 e0dc a categories ! c 1 e0cd 12 DatabaseLibrary.pm ! c 1 e0cc 4 name ! C DmInteger 2 e0df 1 ! c 1 e0de 9 substMode ! c 2 e134 d7 b ! C DmDictionary 0 e100 3 ! C DmString 1 e112 36 b ! C DmSet 0 7d7a 1 ! C DmString 1 7da8 5 Other ! L 7da8 ! c 1 e111 a categories ! c 1 e102 f DebugLibrary.pm ! c 1 e101 4 name ! C DmInteger 2 e114 1 ! c 1 e113 9 substMode ! c 2 e169 da b ! C DmDictionary 0 e135 3 ! C DmString 1 e147 36 b ! C DmSet 0 7db9 1 ! C DmString 1 7de7 5 Other ! L 7de7 ! c 1 e146 a categories ! c 1 e137 11 DefaultLibrary.pm ! c 1 e136 4 name ! C DmInteger 2 e149 1 ! c 1 e148 9 substMode ! c 2 e19e d7 b ! C DmDictionary 0 e16a 3 ! C DmString 1 e17c 36 b ! C DmSet 0 dece 1 ! C DmString 1 e048 5 Other ! L e048 ! c 1 e17b a categories ! c 1 e16c f FilesLibrary.pm ! c 1 e16b 4 name ! C DmInteger 2 e17e 1 ! c 1 e17d 9 substMode ! c 2 e1d3 d7 b ! C DmDictionary 0 e19f 3 ! C DmString 1 e1b1 36 b ! C DmSet 0 7df8 1 ! C DmString 1 7e26 5 Other ! L 7e26 ! c 1 e1b0 a categories ! c 1 e1a1 f FormsLibrary.pm ! c 1 e1a0 4 name ! C DmInteger 2 e1b3 1 ! c 1 e1b2 9 substMode ! c 2 e208 d2 b ! C DmDictionary 0 e1d4 3 ! C DmString 1 e1e6 36 b ! C DmSet 0 7e37 1 ! C DmString 1 7e65 5 Other ! L 7e65 ! c 1 e1e5 a categories ! c 1 e1d6 a Library.pm ! c 1 e1d5 4 name ! C DmInteger 2 e1e8 1 ! c 1 e1e7 9 substMode ! c 2 e23d da b ! C DmDictionary 0 e209 3 ! C DmString 1 e21b 36 b ! C DmSet 0 7e76 1 ! C DmString 1 7ea4 5 Other ! L 7ea4 ! c 1 e21a a categories ! c 1 e20b 11 StringsLibrary.pm ! c 1 e20a 4 name ! C DmInteger 2 e21d 1 ! c 1 e21c 9 substMode ! c 2 e272 dc b ! C DmDictionary 0 e23e 3 ! C DmString 1 e250 36 b ! C DmSet 0 7eb5 1 ! C DmString 1 7ee3 5 Other ! L 7ee3 ! c 1 e24f a categories ! c 1 e240 13 VariablesLibrary.pm ! c 1 e23f 4 name ! C DmInteger 2 e252 1 ! c 1 e251 9 substMode ! c 2 e273 5 files ! c 2 e05b 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 e05a 6 launch ! c 2 e057 4 make ! c 2 e056 4 make ! c 2 e059 0 ! c 2 e058 8 makeFile ! c 5 e05c 0 ! c 2 e05e 7 modules ! c 2 e055 9 Libraries ! c 2 e054 4 name --- 1,292 ---- b ! C DmDictionary 0 26aab 8 ! c 0 26d02 9 ! C Category 1 7c76 ! c 0 26d42 4 ! C DmString 2 26d49 2 e3 ! c 2 26d48 a defaultExe ! C DmSet 3 26d4b 1 ! c 2 7c85 2 e3 ! L 7c85 ! c 2 26d4a b executables ! c 3 26d46 3 ! c 2 7c8c 3 *.C ! L 7c8c ! c 2 7c8f 4 *.cc ! L 7c8f ! c 2 7c92 5 *.cpp ! L 7c92 ! c 2 26d45 a extensions ! c 2 26d44 a CPP_source ! c 2 26d43 4 name ! c 2 26d04 a CPP_source ! c 1 7ca7 ! c 0 26d88 4 ! c 2 26d8f 2 e3 ! c 2 26d8e a defaultExe ! c 3 26d91 1 ! c 2 7cb4 2 e3 ! L 7cb4 ! c 2 26d90 b executables ! c 3 26d8c 1 ! c 2 7cbb 3 *.c ! L 7cbb ! c 2 26d8b a extensions ! c 2 26d8a 8 C_source ! c 2 26d89 4 name ! c 2 26d05 8 C_source ! c 1 7cd0 ! c 0 26dc2 4 ! c 2 26dc9 2 e3 ! c 2 26dc8 a defaultExe ! c 3 26dcb 1 ! c 2 7cdd 2 e3 ! L 7cdd ! c 2 26dca b executables ! c 3 26dc6 1 ! c 2 7ce4 3 *.e ! L 7ce4 ! c 2 26dc5 a extensions ! c 2 26dc4 6 Eiffel ! c 2 26dc3 4 name ! c 2 26d06 6 Eiffel ! c 1 7cf9 ! c 0 26dfc 4 ! c 2 26e03 2 e3 ! c 2 26e02 a defaultExe ! c 3 26e05 1 ! c 2 7d06 2 e3 ! L 7d06 ! c 2 26e04 b executables ! c 3 26e00 4 ! c 2 7d0d 3 *.F ! L 7d0d ! c 2 7d10 3 *.f ! L 7d10 ! c 2 7d13 5 *.for ! L 7d13 ! c 2 7d16 5 *.fpp ! L 7d16 ! c 2 26dff a extensions ! c 2 26dfe 7 Fortran ! c 2 26dfd 4 name ! c 2 26d07 7 Fortran ! c 1 7d2b ! c 0 26e42 4 ! c 2 26e49 2 e3 ! c 2 26e48 a defaultExe ! c 3 26e4b 1 ! c 2 7d38 2 e3 ! L 7d38 ! c 2 26e4a b executables ! c 3 26e46 2 ! c 2 7d3f 3 *.H ! L 7d3f ! c 2 7d42 3 *.h ! L 7d42 ! c 2 26e45 a extensions ! c 2 26e44 6 Header ! c 2 26e43 4 name ! c 2 26d08 6 Header ! c 1 7d57 ! c 0 26e80 4 ! c 2 26e87 9 surfboard ! c 2 26e86 a defaultExe ! c 3 26e89 2 ! c 2 7d64 2 e3 ! L 7d64 ! c 2 7d67 9 surfboard ! L 7d67 ! c 2 26e88 b executables ! c 3 26e84 2 ! c 2 7d6e 5 *.htm ! L 7d6e ! c 2 7d71 6 *.html ! L 7d71 ! c 2 26e83 a extensions ! c 2 26e82 4 Html ! c 2 26e81 4 name ! c 2 26d09 4 Html ! c 1 7d86 ! c 0 26ec2 4 ! c 2 26ec9 2 e3 ! c 2 26ec8 a defaultExe ! c 3 26ecb 1 ! c 2 7d93 2 e3 ! L 7d93 ! c 2 26eca b executables ! c 3 26ec6 1 ! c 2 7d9a 6 *.java ! L 7d9a ! c 2 26ec5 a extensions ! c 2 26ec4 4 Java ! c 2 26ec3 4 name ! c 2 26d0a 4 Java ! c 1 7daf ! c 0 26efc 4 ! c 2 26f03 2 e3 ! c 2 26f02 a defaultExe ! c 3 26f05 1 ! c 2 7dbc 2 e3 ! L 7dbc ! c 2 26f04 b executables ! c 3 26f00 1 ! c 2 7dc3 5 *.tex ! L 7dc3 ! c 2 26eff a extensions ! c 2 26efe 5 Latex ! c 2 26efd 4 name ! c 2 26d0b 5 Latex ! c 1 7dd8 ! c 0 26f36 4 ! c 2 26f3d 2 e3 ! c 2 26f3c a defaultExe ! c 3 26f3f 1 ! c 2 7de5 2 e3 ! L 7de5 ! c 2 26f3e b executables ! c 3 26f3a 0 ! c 2 26f39 a extensions ! c 2 26f38 5 Other ! c 2 26f37 4 name ! c 2 26d0c 5 Other ! c 2 26d01 a categories ! c 0 26d0e 1 ! C ProjectDir 4 7e02 ! c 2 7e03 28 netscript2/src/perl/NetScript/Libraries/ 11 81 ! c 2 7e04 0 0 ! c 2 26d10 28 netscript2/src/perl/NetScript/Libraries/ ! c 2 26d0d b directories ! C DmBag 5 26ab7 b ! c 2 26aed de b ! C DmDictionary 0 26ab9 3 ! C DmString 1 26acb 36 b ! C DmSet 0 7e4a 1 ! C DmString 1 7e78 5 Other ! L 7e78 ! c 1 26aca a categories ! c 1 26abb f ClassLibrary.pm ! c 1 26aba 4 name ! C DmInteger 2 26acd 1 ! c 1 26acc 9 substMode ! c 2 26b22 eb b ! C DmDictionary 0 26aee 3 ! C DmString 1 26b00 36 b ! C DmSet 0 7e89 1 ! C DmString 1 7eb7 5 Other ! L 7eb7 ! c 1 26aff a categories ! c 1 26af0 1b ControlStructuresLibrary.pm ! c 1 26aef 4 name ! C DmInteger 2 26b02 1 ! c 1 26b01 9 substMode ! c 2 26b57 e2 b ! C DmDictionary 0 26b23 3 ! C DmString 1 26b35 36 b ! C DmSet 0 7ec8 1 ! C DmString 1 7ef6 5 Other ! L 7ef6 ! c 1 26b34 a categories ! c 1 26b25 12 DatabaseLibrary.pm ! c 1 26b24 4 name ! C DmInteger 2 26b37 1 ! c 1 26b36 9 substMode ! c 2 26b8c e0 b ! C DmDictionary 0 26b58 3 ! C DmString 1 26b6a 39 b ! C DmSet 0 26926 1 ! C DmString 1 26aa0 5 Other ! L 26aa0 ! c 1 26b69 a categories ! c 1 26b5a e DateLibrary.pm ! c 1 26b59 4 name ! C DmInteger 2 26b6c 1 ! c 1 26b6b 9 substMode ! c 2 26bc1 de b ! C DmDictionary 0 26b8d 3 ! C DmString 1 26b9f 36 b ! C DmSet 0 7f07 1 ! C DmString 1 7f35 5 Other ! L 7f35 ! c 1 26b9e a categories ! c 1 26b8f f DebugLibrary.pm ! c 1 26b8e 4 name ! C DmInteger 2 26ba1 1 ! c 1 26ba0 9 substMode ! c 2 26bf6 e1 b ! C DmDictionary 0 26bc2 3 ! C DmString 1 26bd4 36 b ! C DmSet 0 7f46 1 ! C DmString 1 7f74 5 Other ! L 7f74 ! c 1 26bd3 a categories ! c 1 26bc4 11 DefaultLibrary.pm ! c 1 26bc3 4 name ! C DmInteger 2 26bd6 1 ! c 1 26bd5 9 substMode ! c 2 26c2b de b ! C DmDictionary 0 26bf7 3 ! C DmString 1 26c09 36 b ! C DmSet 0 7f85 1 ! C DmString 1 7fb3 5 Other ! L 7fb3 ! c 1 26c08 a categories ! c 1 26bf9 f FilesLibrary.pm ! c 1 26bf8 4 name ! C DmInteger 2 26c0b 1 ! c 1 26c0a 9 substMode ! c 2 26c60 de b ! C DmDictionary 0 26c2c 3 ! C DmString 1 26c3e 36 b ! C DmSet 0 7fc4 1 ! C DmString 1 7ff2 5 Other ! L 7ff2 ! c 1 26c3d a categories ! c 1 26c2e f FormsLibrary.pm ! c 1 26c2d 4 name ! C DmInteger 2 26c40 1 ! c 1 26c3f 9 substMode ! c 2 26c95 d9 b ! C DmDictionary 0 26c61 3 ! C DmString 1 26c73 36 b ! C DmSet 0 8003 1 ! C DmString 1 8031 5 Other ! L 8031 ! c 1 26c72 a categories ! c 1 26c63 a Library.pm ! c 1 26c62 4 name ! C DmInteger 2 26c75 1 ! c 1 26c74 9 substMode ! c 2 26cca e1 b ! C DmDictionary 0 26c96 3 ! C DmString 1 26ca8 36 b ! C DmSet 0 8042 1 ! C DmString 1 8070 5 Other ! L 8070 ! c 1 26ca7 a categories ! c 1 26c98 11 StringsLibrary.pm ! c 1 26c97 4 name ! C DmInteger 2 26caa 1 ! c 1 26ca9 9 substMode ! c 2 26cff e3 b ! C DmDictionary 0 26ccb 3 ! C DmString 1 26cdd 36 b ! C DmSet 0 8081 1 ! C DmString 1 80af 5 Other ! L 80af ! c 1 26cdc a categories ! c 1 26ccd 13 VariablesLibrary.pm ! c 1 26ccc 4 name ! C DmInteger 2 26cdf 1 ! c 1 26cde 9 substMode ! c 2 26d00 5 files ! c 2 26ab3 94 xterm -ls -fn -*-lucidatypewriter-medium-r-normal-*-12-* -bg gray90 -T Program -geometry 80x10+0+0 -e "[set command with 'Project->Launch Command']" ! c 2 26ab2 6 launch ! c 2 26aaf 4 make ! c 2 26aae 4 make ! c 2 26ab1 0 ! c 2 26ab0 8 makeFile ! c 5 26ab4 0 ! c 2 26ab6 7 modules ! c 2 26aad 9 Libraries ! c 2 26aac 4 name |
From: Jan T. <de...@us...> - 2002-09-24 23:22:12
|
Update of /cvsroot/net-script/netscript2/src/tools/IPdoc In directory usw-pr-cvs1:/tmp/cvs-serv15599 Modified Files: IPdoc.pm NSDoclet.pm Log Message: * small cosmetic fixes Index: IPdoc.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/IPdoc.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IPdoc.pm 13 May 2002 11:19:30 -0000 1.5 --- IPdoc.pm 24 Sep 2002 23:22:08 -0000 1.6 *************** *** 1,6 **** #-------------------------------------------------------- # $Id$ # ! # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia --- 1,7 ---- #-------------------------------------------------------- + # IPdoc - The insOMnia Perl Documenting System # $Id$ # ! # IPdoc and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia *************** *** 24,28 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.03'; #/** --- 25,34 ---- # Globals #-------------------------------------------------------- ! ! use vars qw( $VERSION ); ! #/** ! # The current version of IPdoc. ! #*/ ! $VERSION = "1.06"; #/** *************** *** 96,100 **** my $baseDir = shift @{$this -> {m_baseDirs}}; my $class = $this -> processFile( $fileName, $baseDir ); ! $classes{$class->name()} = $class; } --- 102,108 ---- my $baseDir = shift @{$this -> {m_baseDirs}}; my $class = $this -> processFile( $fileName, $baseDir ); ! if ( defined( $class ) ) { ! $classes{$class->name()} = $class; ! } } *************** *** 239,242 **** --- 247,251 ---- $lastComment = $this -> processComment( $lastComment, $sub ); $class -> newSub($sub); + $lastComment = ""; } *************** *** 246,249 **** --- 255,259 ---- $lastComment = $this -> processComment( $lastComment, $global ); $class -> newGlobal( $global ); + $lastComment = ""; } *************** *** 390,391 **** --- 400,402 ---- } } + 1; Index: NSDoclet.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/tools/IPdoc/NSDoclet.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NSDoclet.pm 13 May 2002 11:19:30 -0000 1.4 --- NSDoclet.pm 24 Sep 2002 23:22:08 -0000 1.5 *************** *** 1,20 **** #-------------------------------------------------------- ! # This class is a basic doclet for IPDoc. ! # # $Id$ # ! # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- ! package IPdoc::NSDoclet; use IPdoc::Sub; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; #/** --- 1,19 ---- #-------------------------------------------------------- ! # IPdoc - The insOMnia Perl Documenting System. # $Id$ # ! # IPdoc and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2002 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- ! use strict; ! #/** ! # This class represents a doclet for IPdoc. Doclets merely ! # affect the style of the documentation. ! #*/ package IPdoc::NSDoclet; use IPdoc::Sub; #/** *************** *** 172,176 **** my $globalComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $subComment =~ /^([^\.]+)/; $result .= "<tr><td><a href=\"#global_$globalName\"><b>$globalName</b></a><br>$1</td></tr>"; } --- 171,175 ---- my $globalComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $globalComment =~ /^([^\.]+)/; $result .= "<tr><td><a href=\"#global_$globalName\"><b>$globalName</b></a><br>$1</td></tr>"; } *************** *** 189,194 **** my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. ! $subComment =~ /^([^\.]+)/; ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1</td></tr>"; } --- 188,197 ---- my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. ! if ( $subComment =~ /^([^\.]+)/ ) { ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>$1</td></tr>"; ! } ! else { ! $result .= "<tr><td><a href=\"#sub_$subName\"><b>$subName</b></a><br>...</td></tr>"; ! } } *************** *** 210,214 **** my $subName = $_ -> name(); my $type = $_ -> elementType(); ! my $subLink = $classfile . "#$type_" . $subName; # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; --- 213,218 ---- my $subName = $_ -> name(); my $type = $_ -> elementType(); ! my $subLink = $classfile . "#".$type."_" . $subName; ! my $subComment = $_ -> comment(); # cut comment down to the first line or sentence. $subComment =~ /^([^\.]+)/; *************** *** 299,314 **** if ( $description ne "") { ! $aSubName = $aSub -> name(); ! $aClassLink = $class -> relativeFileName(). $aSub -> parent() -> fullFileName(); ! $aSubLink = $aClassLink."#sub_".$aSubName; ! $aClassName = $aSub -> parent() -> name(); ! $description = "<b>Description copied from <a href=\"$aSubLink\">$aSubName</a> in <a href=\"$aClassLink\">$aClassName</a>:</b>".$description; $params = $aSub -> params(); } } ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; $result .= $this -> renderParams( $params ); ! $resutl .= "</p></dl>"; $result; } --- 303,318 ---- if ( $description ne "") { ! my $aSubName = $aSub -> name(); ! my $aClassLink = $class -> relativeFileName(). $aSub -> parent() -> fullFileName(); ! my $aSubLink = $aClassLink."#sub_".$aSubName; ! my $aClassName = $aSub -> parent() -> name(); ! $description = "<b>Description copied from <a href=\"$aSubLink\">$aSubName</a> in <a href=\"$aClassLink\">$aClassName</a>:</b><br>".$description; $params = $aSub -> params(); } } ! my $result = "<h3><a name=\"".$type."_$name\">$name</a></h3><dl><dd>$description\n"; $result .= $this -> renderParams( $params ); ! $result .= "\n</dd></dl>"; $result; } *************** *** 328,334 **** my $params = $global -> params(); ! my $result = "<h3><a name=\"$type_$name\">$name</a></h3><dl><dd>$description</dd><p>"; $result .= $this -> renderParams( $params ); ! $resutl .= "</p></dl>"; $result; } --- 332,338 ---- my $params = $global -> params(); ! my $result = "<h3><a name=\"".$type."_$name\">$name</a></h3><dl><dd>$description"; $result .= $this -> renderParams( $params ); ! $result .= "</dd></dl>"; $result; } *************** *** 370,377 **** ! $result .= "<dl>"; for (@order) { ! $elem = $_; ! foreach $index (0..$#paramNames ) { #FIXME: this is incredibly slow if ( $paramNames[$index] eq $elem ) { $result .= "<dd><b>".$mappings{($paramNames[$index])}."</b><dl><dd>".(@paramValues[$index])."</dd></dl></dd>"; --- 374,381 ---- ! $result .= "<dl>\n"; for (@order) { ! my $elem = $_; ! foreach my $index (0..$#paramNames ) { #FIXME: this is incredibly slow if ( $paramNames[$index] eq $elem ) { $result .= "<dd><b>".$mappings{($paramNames[$index])}."</b><dl><dd>".(@paramValues[$index])."</dd></dl></dd>"; *************** *** 380,384 **** } ! $result .= "</dl>"; $result; --- 384,388 ---- } ! $result .= "\n</dl>"; $result; *************** *** 491,496 **** # sort the array alphabetically by name @allSymbols = sort { ! $name1 = $a -> name(); ! $name2 = $b -> name(); $name1 =~ s/^.*:://g; $name2 =~ s/^.*:://g; --- 495,500 ---- # sort the array alphabetically by name @allSymbols = sort { ! my $name1 = $a -> name(); ! my $name2 = $b -> name(); $name1 =~ s/^.*:://g; $name2 =~ s/^.*:://g; *************** *** 500,504 **** my $lastLetter = ""; my $letters = ""; ! my $biglist = ""; my $first = 1; for (@allSymbols) { --- 504,508 ---- my $lastLetter = ""; my $letters = ""; ! my $bigList = ""; my $first = 1; for (@allSymbols) { *************** *** 527,531 **** $bigList .= "<a name=\"letter_$lastLetter\"><h2><b>$lastLetter</b></h2></a><dl>"; } ! $bigList .= "<dt><a href=\"$file#$type_$name\">$shortName</a> - "; if ( $type eq $IPdoc::Class::ELEMENT_TYPE ) { my $pkName = $package; --- 531,535 ---- $bigList .= "<a name=\"letter_$lastLetter\"><h2><b>$lastLetter</b></h2></a><dl>"; } ! $bigList .= "<dt><a href=\"$file#".$type."_$name\">$shortName</a> - "; if ( $type eq $IPdoc::Class::ELEMENT_TYPE ) { my $pkName = $package; *************** *** 533,537 **** my $href = $fmtString; $href =~ s/\[PKNAME\]/$pkName/e; ! $bigList .= "class in package <a href=\"$href\" target=\"pkgframe\">$package</a>"; } else { --- 537,541 ---- my $href = $fmtString; $href =~ s/\[PKNAME\]/$pkName/e; ! $bigList .= "class in package <a href=\"$href\" target=\"pkgFrame\">$package</a>"; } else { *************** *** 543,546 **** --- 547,551 ---- $bigList .="</dt><dd> $comment</dd>"; } + $bigList .= "</dl>"; $result .= $this -> renderHead( $title, $home, $index, $frameset, $self, $letters ); *************** *** 549,550 **** --- 554,557 ---- $result; } + + 1; # make require happy |
From: Jan T. <de...@us...> - 2002-09-24 22:40:08
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv28016 Modified Files: DatabaseLibrary.pm Log Message: * added SQL-escaping library function Index: DatabaseLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DatabaseLibrary.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DatabaseLibrary.pm 21 Aug 2002 10:34:44 -0000 1.2 --- DatabaseLibrary.pm 24 Sep 2002 22:40:05 -0000 1.3 *************** *** 78,82 **** # </example> # </pre> ! # # @note The database Library requires the DBI-Module. #*/ --- 78,86 ---- # </example> # </pre> ! # This library also offers a function for escaping strings ! # (which is useful if you want to put user put into SQL-statements.). ! # <pre> ! # sql[any string here] - escapes the given string (SQL-escape) ! # </pre> # @note The database Library requires the DBI-Module. #*/ *************** *** 116,119 **** --- 120,126 ---- # create event listeners for all events + # register the SQL-escape function + $this -> interpreter() -> getStatementEvaluator() -> + registerLibraryFunction( "sql", $this, "escapeSQL" ); my $eventListener1 = NetScript::Engine::EventListener -> new(); *************** *** 358,361 **** --- 365,380 ---- } return 1; # do not consume event + } + + + #/** + # Escapes the given string as an SQL-String. This mainly escapes backslashes + # and single quotes. + #*/ + sub escapeSQL { + my ( $this , $string ) = @_; + $string =~ s/\\/\\\\/g; + $string =~ s/'/\\'/g; + return $string; } |
From: Jan T. <de...@us...> - 2002-09-24 22:22:52
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv19312 Modified Files: Interpreter.pm Log Message: * added documentation * added security settings for foreign hosts Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Interpreter.pm 11 Jul 2002 22:03:09 -0000 1.11 --- Interpreter.pm 24 Sep 2002 22:22:49 -0000 1.12 *************** *** 15,18 **** --- 15,34 ---- # file and then redirects the work to the libraries which are # registered. + # + # The interpreter delivers two global variables: + # <pre> + # $(SYS.interpreterURL) - URL of the interpreter + # $(SYS.scriptURL) - URL of the currently executed script + # </pre> + # + # Also there is a function which can be used to calculate an URL + # relative to the currently executed script: + # <pre> + # url[ url here ] + # </pre> + # For example + # <pre> + # <a href="$(SYS.interpreterURL)?scriptURL=$(url[../myfile.xml])"/> + # </pre> #*/ package NetScript::Interpreter; *************** *** 25,34 **** # The location of the config file. #*/ ! $CONFIGURATION = "/home/kork/public_html/cgi-bin/netscript2/configuration"; #/** # The current Version of NetScript #*/ ! $VERSION = '2.0pre1'; #/** --- 41,50 ---- # The location of the config file. #*/ ! $CONFIGURATION = "configuration"; #/** # The current Version of NetScript #*/ ! $VERSION = '2.01 beta'; #/** *************** *** 120,123 **** --- 136,141 ---- my ($request) = @_; + my $configFile = $request -> dir_config( "NetScriptConfigFile" ); + $CONFIGURATION = $configFile; my $interpreter = NetScript::Interpreter -> new( $request ); $interpreter -> run(); *************** *** 137,140 **** --- 155,160 ---- bless( $this, $class ); # create Object + my $config = NetScript::Util::ConfigurationParser -> new( $CONFIGURATION ); + $this -> { m_Request } = $request; $this -> { m_CGI } = new CGI; # CGI-Member *************** *** 153,156 **** --- 173,177 ---- $this -> { m_ScriptURL } = undef; $this -> { m_DOMParser } = XML::DOM2::DOMParser -> new(); + $this -> { m_Config } = $config; my @stateTrees = (); *************** *** 165,169 **** $this -> { m_Cookies } = \@cookieList; ! my $libLoader = NetScript::Engine::LibLoader -> new( $this, "/home/kork/public_html/cgi-bin/netscript2/NetScript/Libraries" ); $this -> { m_LibLoader } = $libLoader; --- 186,197 ---- $this -> { m_Cookies } = \@cookieList; ! my $libdir = $config -> getSetting( "LIBDIR" ); ! unless ( -e $libdir ) { ! $this -> getEventRelay() -> createAndRaiseEvent( ! $FATAL_EVENT, "The configured directory for libraries is:\n\n". ! " \"$libdir\",\n". ! "\nhowever there is no such directory! Please check the configuration file." ); ! } ! my $libLoader = NetScript::Engine::LibLoader -> new( $this, $libdir ); $this -> { m_LibLoader } = $libLoader; *************** *** 174,178 **** $libLoader -> loadLibrary( "Forms" ); $libLoader -> loadLibrary( "Class" ); ! my $systemWrapper = NetScript::Engine::ClassWrapper -> new( $this ); $systemWrapper -> setMember( '^interpreterURL$', undef, "getInterpreterURL" ); --- 202,206 ---- $libLoader -> loadLibrary( "Forms" ); $libLoader -> loadLibrary( "Class" ); ! my $systemWrapper = NetScript::Engine::ClassWrapper -> new( $this ); $systemWrapper -> setMember( '^interpreterURL$', undef, "getInterpreterURL" ); *************** *** 182,185 **** --- 210,216 ---- $this -> getStatementEvaluator() -> createVariable( "SYS", $systemWrapper ); + + # register the relative-URL-function + $this -> getStatementEvaluator() -> registerLibraryFunction( "url", $this, "makeURL" ); # basic init is done - save the global state by putting a new state over it $this -> newStateTree(); *************** *** 187,190 **** --- 218,229 ---- } + #/** + # Returns the current configuration. + # @return an instance of NetScript::Util::ConfigurationParser + #*/ + sub getConfig { + my ( $this ) = @_; + $this -> { m_Config }; + } #/** *************** *** 223,226 **** --- 262,292 ---- #/** + # Takes the given relative URL and makes it absolute. + #*/ + sub makeURL { + my ( $this, $relURL ) = @_; + my $currentURL = $this -> getScriptURL(); + $currentURL =~ /^(.*)\/[^\/]*/; + $currentURL = $1."/"; + + while ( $relURL =~ /^\./ ) { + if ( $relURL =~ /^\.\./ ) { + $currentURL =~ /^(.*)\/[^\/]*\/$/; + $currentURL = $1."/"; + $relURL =~ /^[^\/]*\/(.*)/; + $relURL = $1; + next; + } + if ( $relURL =~ /^\./ ) { + $relURL =~ /^[^\/]*\/(.*)/; + $relURL = $1; + next; + } + } + $currentURL .= $relURL; + return $currentURL; + } + + #/** # Sets a cookie in the outgoing response. Since cookies have # to be set in the http-header, to which libraries have no access *************** *** 298,301 **** --- 364,375 ---- } + if ( $script =~ /^http:/ || $script =~ /^ftp:/ ) { + unless ( $this -> getConfig() -> getSetting( "ALLOW_REMOTE_SCRIPTS" ) =~ /yes/ ) { + $this -> getEventRelay() -> createAndRaiseEvent( + $FATAL_EVENT, + "Cannot execute $script,\nlocal security settings forbid to execute scripts from foreign hosts!" ); + } + } + $this -> { m_ScriptURL } = $script; *************** *** 304,308 **** # start input file parsing my $domparser = $this -> { m_DOMParser }; ! my $dom = $domparser -> parseString( $scriptContent ); # Create a DOMWalker --- 378,395 ---- # start input file parsing my $domparser = $this -> { m_DOMParser }; ! my $dom = undef; ! eval { ! $dom = $domparser -> parseString( $scriptContent ); ! }; ! if ( $@ ) { ! my $string = $@; ! $string =~ s/&/&/g; ! $string =~ s/</</g; ! $string =~ s/>/>/g; ! ! $this -> getEventRelay() -> createAndRaiseEvent( ! $FATAL_EVENT, ! "Error while parsing the input file: " . $string ); ! } # Create a DOMWalker |