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...> - 2002-07-11 22:03:13
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv6134 Modified Files: Interpreter.pm Log Message: * added support for classes and methods * did a complete rewrite of the variable system * various bugfixes Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Interpreter.pm 7 Jul 2002 14:34:48 -0000 1.10 --- Interpreter.pm 11 Jul 2002 22:03:09 -0000 1.11 *************** *** 110,114 **** use XML::DOM2::DOMWriter; use XML::DOM2::XMLDOMWriterStyle; ! --- 110,114 ---- use XML::DOM2::DOMWriter; use XML::DOM2::XMLDOMWriterStyle; ! use Carp qw(cluck); *************** *** 149,155 **** --- 149,160 ---- $this -> { m_currentState } = NetScript::Engine::State -> new(); + $this -> { m_globalState } = + $this -> { m_currentState }; $this -> { m_ScriptURL } = undef; $this -> { m_DOMParser } = XML::DOM2::DOMParser -> new(); + my @stateTrees = (); + $this -> { m_stateTrees } = \@stateTrees; + my $eventListener = NetScript::Engine::EventListener -> new(); $eventListener -> init( $FATAL_EVENT, "onFatalEvent", $this, *************** *** 168,171 **** --- 173,177 ---- $libLoader -> loadLibrary( "Variables" ); $libLoader -> loadLibrary( "Forms" ); + $libLoader -> loadLibrary( "Class" ); my $systemWrapper = NetScript::Engine::ClassWrapper -> new( $this ); *************** *** 174,179 **** # register the SYS-object ! $this -> getState() -> createObjectValue( "SYS", $systemWrapper ); ! return $this; # return Object } --- 180,187 ---- # register the SYS-object ! $this -> getStatementEvaluator() -> createVariable( "SYS", $systemWrapper ); ! ! # basic init is done - save the global state by putting a new state over it ! $this -> newStateTree(); return $this; # return Object } *************** *** 397,400 **** --- 405,420 ---- #/** + # Creates a new state tree on base of the global state. + # @public + #*/ + sub newStateTree { + my ( $this ) = @_; + my $oldState = $this -> getState(); + push( @{$this -> { m_stateTrees }}, $oldState ); + my $newState = NetScript::Engine::State -> new( $this -> { m_globalState } ); + $this -> { m_currentState } = $newState; + } + + #/** # Drops the current state and sets its parent # as new current state. *************** *** 407,410 **** --- 427,441 ---- } + #/** + # Drops the current state tree and sets its predecessor as new + # current state. + # @public + #*/ + sub dropStateTree { + my ( $this ) = @_; + my $pred = pop( @{ $this -> { m_stateTrees } } ); + $this -> { m_currentState } = $pred; + } + #---------------------------------------------------------------- # Message Handling *************** *** 422,426 **** sub onFatalEvent { my ($this, $event ) = @_; ! # Check for mod_perl if ( $this -> { m_Request } ) { --- 453,457 ---- sub onFatalEvent { my ($this, $event ) = @_; ! cluck "ERROR!"; # Check for mod_perl if ( $this -> { m_Request } ) { |
From: Jan T. <de...@us...> - 2002-07-08 11:16:06
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv13297 Modified Files: wipeout.project Log Message: * removed deprecated files Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/wipeout.project,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wipeout.project 2 Jun 2002 19:31:45 -0000 1.7 --- wipeout.project 8 Jul 2002 11:16:02 -0000 1.8 *************** *** 1,281 **** b ! C DmDictionary 0 2ffe8 8 ! c 0 3020a 9 ! C Category 1 6fef ! c 0 3024a 4 ! C DmString 2 30251 2 e3 ! c 2 30250 a defaultExe ! C DmSet 3 30253 1 ! c 2 6ffe 2 e3 ! L 6ffe ! c 2 30252 b executables ! c 3 3024e 3 ! c 2 7005 3 *.C ! L 7005 ! c 2 7008 4 *.cc ! L 7008 ! c 2 700b 5 *.cpp ! L 700b ! c 2 3024d a extensions ! c 2 3024c a CPP_source ! c 2 3024b 4 name ! c 2 3020c a CPP_source ! c 1 7020 ! c 0 30290 4 ! c 2 30297 2 e3 ! c 2 30296 a defaultExe ! c 3 30299 1 ! c 2 702d 2 e3 ! L 702d ! c 2 30298 b executables ! c 3 30294 1 ! c 2 7034 3 *.c ! L 7034 ! c 2 30293 a extensions ! c 2 30292 8 C_source ! c 2 30291 4 name ! c 2 3020d 8 C_source ! c 1 7049 ! c 0 302ca 4 ! c 2 302d1 2 e3 ! c 2 302d0 a defaultExe ! c 3 302d3 1 ! c 2 7056 2 e3 ! L 7056 ! c 2 302d2 b executables ! c 3 302ce 1 ! c 2 705d 3 *.e ! L 705d ! c 2 302cd a extensions ! c 2 302cc 6 Eiffel ! c 2 302cb 4 name ! c 2 3020e 6 Eiffel ! c 1 7072 ! c 0 30304 4 ! c 2 3030b 2 e3 ! c 2 3030a a defaultExe ! c 3 3030d 1 ! c 2 707f 2 e3 ! L 707f ! c 2 3030c b executables ! c 3 30308 4 ! c 2 7086 3 *.F ! L 7086 ! c 2 7089 3 *.f ! L 7089 ! c 2 708c 5 *.for ! L 708c ! c 2 708f 5 *.fpp ! L 708f ! c 2 30307 a extensions ! c 2 30306 7 Fortran ! c 2 30305 4 name ! c 2 3020f 7 Fortran ! c 1 70a4 ! c 0 3034a 4 ! c 2 30351 2 e3 ! c 2 30350 a defaultExe ! c 3 30353 1 ! c 2 70b1 2 e3 ! L 70b1 ! c 2 30352 b executables ! c 3 3034e 2 ! c 2 70b8 3 *.H ! L 70b8 ! c 2 70bb 3 *.h ! L 70bb ! c 2 3034d a extensions ! c 2 3034c 6 Header ! c 2 3034b 4 name ! c 2 30210 6 Header ! c 1 70d0 ! c 0 30388 4 ! c 2 3038f 9 surfboard ! c 2 3038e a defaultExe ! c 3 30391 2 ! c 2 70dd 2 e3 ! L 70dd ! c 2 70e0 9 surfboard ! L 70e0 ! c 2 30390 b executables ! c 3 3038c 2 ! c 2 70e7 5 *.htm ! L 70e7 ! c 2 70ea 6 *.html ! L 70ea ! c 2 3038b a extensions ! c 2 3038a 4 Html ! c 2 30389 4 name ! c 2 30211 4 Html ! c 1 70ff ! c 0 303ca 4 ! c 2 303d1 2 e3 ! c 2 303d0 a defaultExe ! c 3 303d3 1 ! c 2 710c 2 e3 ! L 710c ! c 2 303d2 b executables ! c 3 303ce 1 ! c 2 7113 6 *.java ! L 7113 ! c 2 303cd a extensions ! c 2 303cc 4 Java ! c 2 303cb 4 name ! c 2 30212 4 Java ! c 1 7128 ! c 0 30404 4 ! c 2 3040b 2 e3 ! c 2 3040a a defaultExe ! c 3 3040d 1 ! c 2 7135 2 e3 ! L 7135 ! c 2 3040c b executables ! c 3 30408 1 ! c 2 713c 5 *.tex ! L 713c ! c 2 30407 a extensions ! c 2 30406 5 Latex ! c 2 30405 4 name ! c 2 30213 5 Latex ! c 1 7151 ! c 0 3043e 4 ! c 2 30445 2 e3 ! c 2 30444 a defaultExe ! c 3 30447 1 ! c 2 715e 2 e3 ! L 715e ! c 2 30446 b executables ! c 3 30442 0 ! c 2 30441 a extensions ! c 2 30440 5 Other ! c 2 3043f 4 name ! c 2 30214 5 Other ! c 2 30209 a categories ! c 0 30216 1 ! C ProjectDir 4 717b ! c 2 717c 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 717d 0 0 ! c 2 30218 23 netscript2/src/perl/NetScript/Util/ ! c 2 30215 b directories ! C DmBag 5 2fff4 a ! c 2 3002a e5 b ! C DmDictionary 0 2fff6 3 ! C DmString 1 30008 36 b ! C DmSet 0 71c3 1 ! C DmString 1 71f1 5 Other ! L 71f1 ! c 1 30007 a categories ! c 1 2fff8 f ClassWrapper.pm ! c 1 2fff7 4 name ! C DmInteger 2 3000a 80000001 ! c 1 30009 9 substMode ! c 2 3005f e3 b ! C DmDictionary 0 3002b 3 ! C DmString 1 3003d 36 b ! C DmSet 0 7202 1 ! C DmString 1 7230 5 Other ! L 7230 ! c 1 3003c a categories ! c 1 3002d 13 ConfigFileParser.pm ! c 1 3002c 4 name ! C DmInteger 2 3003f 1 ! c 1 3003e 9 substMode ! c 2 30094 e6 b ! C DmDictionary 0 30060 3 ! C DmString 1 30072 36 b ! C DmSet 0 7241 1 ! C DmString 1 726f 5 Other ! L 726f ! c 1 30071 a categories ! c 1 30062 16 ConfigurationParser.pm ! c 1 30061 4 name ! C DmInteger 2 30074 1 ! c 1 30073 9 substMode ! c 2 300c9 e0 b ! C DmDictionary 0 30095 3 ! C DmString 1 300a7 36 b ! C DmSet 0 7280 1 ! C DmString 1 72ae 5 Other ! L 72ae ! c 1 300a6 a categories ! c 1 30097 10 FileRetriever.pm ! c 1 30096 4 name ! C DmInteger 2 300a9 1 ! c 1 300a8 9 substMode ! c 2 300fe e9 b ! C DmDictionary 0 300ca 3 ! C DmString 1 300dc 36 b ! C DmSet 0 72bf 1 ! C DmString 1 72ed 5 Other ! L 72ed ! c 1 300db a categories ! c 1 300cc 12 FunctionWrapper.pm ! c 1 300cb 4 name ! C DmInteger 2 300de 80000001 ! c 1 300dd 9 substMode ! c 2 30133 e7 b ! C DmDictionary 0 300ff 3 ! C DmString 1 30111 36 b ! C DmSet 0 72fe 1 ! C DmString 1 732c 5 Other ! L 732c ! c 1 30110 a categories ! c 1 30101 10 MemberWrapper.pm ! c 1 30100 4 name ! C DmInteger 2 30113 80000001 ! c 1 30112 9 substMode ! c 2 30168 e4 b ! C DmDictionary 0 30134 3 ! C DmString 1 30146 36 b ! C DmSet 0 733d 1 ! C DmString 1 736b 5 Other ! L 736b ! c 1 30145 a categories ! c 1 30136 14 ObjectParserStyle.pm ! c 1 30135 4 name ! C DmInteger 2 30148 1 ! c 1 30147 9 substMode ! c 2 3019d e5 b ! C DmDictionary 0 30169 3 ! C DmString 1 3017b 36 b ! C DmSet 0 737c 1 ! C DmString 1 73aa 5 Other ! L 73aa ! c 1 3017a a categories ! c 1 3016b 15 PropertyFileParser.pm ! c 1 3016a 4 name ! C DmInteger 2 3017d 1 ! c 1 3017c 9 substMode ! c 2 301d2 de b ! C DmDictionary 0 3019e 3 ! C DmString 1 301b0 36 b ! C DmSet 0 73bb 1 ! C DmString 1 73e9 5 Other ! L 73e9 ! c 1 301af a categories ! c 1 301a0 f UIDGenerator.pm ! c 1 3019f 4 name ! C DmInteger 2 301b2 1 ! c 1 301b1 9 substMode ! c 2 30207 e1 b ! C DmDictionary 0 301d3 3 ! C DmString 1 301e5 36 b ! C DmSet 0 73fa 1 ! C DmString 1 7428 5 Other ! L 7428 ! c 1 301e4 a categories ! c 1 301d5 11 XMLParserRelay.pm ! c 1 301d4 4 name ! C DmInteger 2 301e7 1 ! c 1 301e6 9 substMode ! c 2 30208 5 files ! c 2 2fff0 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 2ffef 6 launch ! c 2 2ffec 4 make ! c 2 2ffeb 4 make ! c 2 2ffee 0 ! c 2 2ffed 8 makeFile ! c 5 2fff1 0 ! c 2 2fff3 7 modules ! c 2 2ffea 4 Util ! c 2 2ffe9 4 name --- 1,281 ---- b ! C DmDictionary 0 1b80a 8 ! c 0 1ba2c 9 ! C Category 1 85c1 ! c 0 1ba6c 4 ! C DmString 2 1ba73 2 e3 ! c 2 1ba72 a defaultExe ! C DmSet 3 1ba75 1 ! c 2 85d0 2 e3 ! L 85d0 ! c 2 1ba74 b executables ! c 3 1ba70 3 ! c 2 85d7 3 *.C ! L 85d7 ! c 2 85da 4 *.cc ! L 85da ! c 2 85dd 5 *.cpp ! L 85dd ! c 2 1ba6f a extensions ! c 2 1ba6e a CPP_source ! c 2 1ba6d 4 name ! c 2 1ba2e a CPP_source ! c 1 85f2 ! c 0 1bab2 4 ! c 2 1bab9 2 e3 ! c 2 1bab8 a defaultExe ! c 3 1babb 1 ! c 2 85ff 2 e3 ! L 85ff ! c 2 1baba b executables ! c 3 1bab6 1 ! c 2 8606 3 *.c ! L 8606 ! c 2 1bab5 a extensions ! c 2 1bab4 8 C_source ! c 2 1bab3 4 name ! c 2 1ba2f 8 C_source ! c 1 861b ! c 0 1baec 4 ! c 2 1baf3 2 e3 ! c 2 1baf2 a defaultExe ! c 3 1baf5 1 ! c 2 8628 2 e3 ! L 8628 ! c 2 1baf4 b executables ! c 3 1baf0 1 ! c 2 862f 3 *.e ! L 862f ! c 2 1baef a extensions ! c 2 1baee 6 Eiffel ! c 2 1baed 4 name ! c 2 1ba30 6 Eiffel ! c 1 8644 ! c 0 1bb26 4 ! c 2 1bb2d 2 e3 ! c 2 1bb2c a defaultExe ! c 3 1bb2f 1 ! c 2 8651 2 e3 ! L 8651 ! c 2 1bb2e b executables ! c 3 1bb2a 4 ! c 2 8658 3 *.F ! L 8658 ! c 2 865b 3 *.f ! L 865b ! c 2 865e 5 *.for ! L 865e ! c 2 8661 5 *.fpp ! L 8661 ! c 2 1bb29 a extensions ! c 2 1bb28 7 Fortran ! c 2 1bb27 4 name ! c 2 1ba31 7 Fortran ! c 1 8676 ! c 0 1bb6c 4 ! c 2 1bb73 2 e3 ! c 2 1bb72 a defaultExe ! c 3 1bb75 1 ! c 2 8683 2 e3 ! L 8683 ! c 2 1bb74 b executables ! c 3 1bb70 2 ! c 2 868a 3 *.H ! L 868a ! c 2 868d 3 *.h ! L 868d ! c 2 1bb6f a extensions ! c 2 1bb6e 6 Header ! c 2 1bb6d 4 name ! c 2 1ba32 6 Header ! c 1 86a2 ! c 0 1bbaa 4 ! c 2 1bbb1 9 surfboard ! c 2 1bbb0 a defaultExe ! c 3 1bbb3 2 ! c 2 86af 2 e3 ! L 86af ! c 2 86b2 9 surfboard ! L 86b2 ! c 2 1bbb2 b executables ! c 3 1bbae 2 ! c 2 86b9 5 *.htm ! L 86b9 ! c 2 86bc 6 *.html ! L 86bc ! c 2 1bbad a extensions ! c 2 1bbac 4 Html ! c 2 1bbab 4 name ! c 2 1ba33 4 Html ! c 1 86d1 ! c 0 1bbec 4 ! c 2 1bbf3 2 e3 ! c 2 1bbf2 a defaultExe ! c 3 1bbf5 1 ! c 2 86de 2 e3 ! L 86de ! c 2 1bbf4 b executables ! c 3 1bbf0 1 ! c 2 86e5 6 *.java ! L 86e5 ! c 2 1bbef a extensions ! c 2 1bbee 4 Java ! c 2 1bbed 4 name ! c 2 1ba34 4 Java ! c 1 86fa ! c 0 1bc26 4 ! c 2 1bc2d 2 e3 ! c 2 1bc2c a defaultExe ! c 3 1bc2f 1 ! c 2 8707 2 e3 ! L 8707 ! c 2 1bc2e b executables ! c 3 1bc2a 1 ! c 2 870e 5 *.tex ! L 870e ! c 2 1bc29 a extensions ! c 2 1bc28 5 Latex ! c 2 1bc27 4 name ! c 2 1ba35 5 Latex ! c 1 8723 ! c 0 1bc60 4 ! c 2 1bc67 2 e3 ! c 2 1bc66 a defaultExe ! c 3 1bc69 1 ! c 2 8730 2 e3 ! L 8730 ! c 2 1bc68 b executables ! c 3 1bc64 0 ! c 2 1bc63 a extensions ! c 2 1bc62 5 Other ! c 2 1bc61 4 name ! c 2 1ba36 5 Other ! c 2 1ba2b a categories ! c 0 1ba38 1 ! C ProjectDir 4 874d ! c 2 874e 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 874f 0 0 ! c 2 1ba3a 23 netscript2/src/perl/NetScript/Util/ ! c 2 1ba37 b directories ! C DmBag 5 1b816 a ! c 2 1b84c e5 b ! C DmDictionary 0 1b818 3 ! C DmString 1 1b82a 36 b ! C DmSet 0 8795 1 ! C DmString 1 87c3 5 Other ! L 87c3 ! c 1 1b829 a categories ! c 1 1b81a f ClassWrapper.pm ! c 1 1b819 4 name ! C DmInteger 2 1b82c 80000001 ! c 1 1b82b 9 substMode ! c 2 1b881 ea b ! C DmDictionary 0 1b84d 3 ! C DmString 1 1b85f 36 b ! C DmSet 0 87d4 1 ! C DmString 1 8802 5 Other ! L 8802 ! c 1 1b85e a categories ! c 1 1b84f 13 ConfigFileParser.pm ! c 1 1b84e 4 name ! C DmInteger 2 1b861 80000001 ! c 1 1b860 9 substMode ! c 2 1b8b6 e6 b ! C DmDictionary 0 1b882 3 ! C DmString 1 1b894 36 b ! C DmSet 0 8813 1 ! C DmString 1 8841 5 Other ! L 8841 ! c 1 1b893 a categories ! c 1 1b884 16 ConfigurationParser.pm ! c 1 1b883 4 name ! C DmInteger 2 1b896 1 ! c 1 1b895 9 substMode ! c 2 1b8eb e0 b ! C DmDictionary 0 1b8b7 3 ! C DmString 1 1b8c9 36 b ! C DmSet 0 8852 1 ! C DmString 1 8880 5 Other ! L 8880 ! c 1 1b8c8 a categories ! c 1 1b8b9 10 FileRetriever.pm ! c 1 1b8b8 4 name ! C DmInteger 2 1b8cb 1 ! c 1 1b8ca 9 substMode ! c 2 1b920 e9 b ! C DmDictionary 0 1b8ec 3 ! C DmString 1 1b8fe 36 b ! C DmSet 0 8891 1 ! C DmString 1 88bf 5 Other ! L 88bf ! c 1 1b8fd a categories ! c 1 1b8ee 12 FunctionWrapper.pm ! c 1 1b8ed 4 name ! C DmInteger 2 1b900 80000001 ! c 1 1b8ff 9 substMode ! c 2 1b955 e7 b ! C DmDictionary 0 1b921 3 ! C DmString 1 1b933 36 b ! C DmSet 0 88d0 1 ! C DmString 1 88fe 5 Other ! L 88fe ! c 1 1b932 a categories ! c 1 1b923 10 MemberWrapper.pm ! c 1 1b922 4 name ! C DmInteger 2 1b935 80000001 ! c 1 1b934 9 substMode ! c 2 1b98a eb b ! C DmDictionary 0 1b956 3 ! C DmString 1 1b968 36 b ! C DmSet 0 890f 1 ! C DmString 1 893d 5 Other ! L 893d ! c 1 1b967 a categories ! c 1 1b958 14 ObjectParserStyle.pm ! c 1 1b957 4 name ! C DmInteger 2 1b96a 80000001 ! c 1 1b969 9 substMode ! c 2 1b9bf ec b ! C DmDictionary 0 1b98b 3 ! C DmString 1 1b99d 36 b ! C DmSet 0 894e 1 ! C DmString 1 897c 5 Other ! L 897c ! c 1 1b99c a categories ! c 1 1b98d 15 PropertyFileParser.pm ! c 1 1b98c 4 name ! C DmInteger 2 1b99f 80000001 ! c 1 1b99e 9 substMode ! c 2 1b9f4 de b ! C DmDictionary 0 1b9c0 3 ! C DmString 1 1b9d2 36 b ! C DmSet 0 898d 1 ! C DmString 1 89bb 5 Other ! L 89bb ! c 1 1b9d1 a categories ! c 1 1b9c2 f UIDGenerator.pm ! c 1 1b9c1 4 name ! C DmInteger 2 1b9d4 1 ! c 1 1b9d3 9 substMode ! c 2 1ba29 e8 b ! C DmDictionary 0 1b9f5 3 ! C DmString 1 1ba07 36 b ! C DmSet 0 89cc 1 ! C DmString 1 89fa 5 Other ! L 89fa ! c 1 1ba06 a categories ! c 1 1b9f7 11 XMLParserRelay.pm ! c 1 1b9f6 4 name ! C DmInteger 2 1ba09 80000001 ! c 1 1ba08 9 substMode ! c 2 1ba2a 5 files ! c 2 1b812 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 1b811 6 launch ! c 2 1b80e 4 make ! c 2 1b80d 4 make ! c 2 1b810 0 ! c 2 1b80f 8 makeFile ! c 5 1b813 0 ! c 2 1b815 7 modules ! c 2 1b80c 4 Util ! c 2 1b80b 4 name |
From: Jan T. <de...@us...> - 2002-07-08 11:15:48
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv13148 Removed Files: ConfigFileParser.pm ObjectParserStyle.pm PropertyFileParser.pm XMLParserRelay.pm Log Message: * removed deprecated files --- ConfigFileParser.pm DELETED --- --- ObjectParserStyle.pm DELETED --- --- PropertyFileParser.pm DELETED --- --- XMLParserRelay.pm DELETED --- |
From: Jan T. <de...@us...> - 2002-07-07 14:47:35
|
Update of /cvsroot/net-script/netscript2 In directory usw-pr-cvs1:/tmp/cvs-serv8645 Modified Files: Makefile Makefile.files Log Message: Index: Makefile =================================================================== RCS file: /cvsroot/net-script/netscript2/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 3 May 2002 13:36:49 -0000 1.8 --- Makefile 7 Jul 2002 14:47:32 -0000 1.9 *************** *** 12,16 **** #------------------------------------------------ perl_syncheck: ! $(foreach perlfile, $(Perl), perl -Isrc/perl -Isrc/tools -c $(perlfile);) # Target for installing all perl files --- 12,16 ---- #------------------------------------------------ perl_syncheck: ! $(foreach perlfile, $(Perl), perl -Isrc/perl -Isrc/tools -c $(perlfile); ) # Target for installing all perl files *************** *** 20,23 **** --- 20,25 ---- cp -r $(SOURCE_DIR)/* $(TARGET_DIR) cp -r $(PAGE_DIR) $(NODYN_TARGET_DIR) + cp -r $(SCRIPT_DIR) $(NODYN_TARGET_DIR) + cp $(DOCS_DIR)/netscript/src/ExampleLibrary.pm $(TARGET_DIR)/NetScript/Libraries chmod a+x $(TARGET_DIR)/*.pl $(foreach xmlfile, $(XML_Mappings), cp $(xmlfile) $(TARGET_DIR);) *************** *** 33,36 **** --- 35,39 ---- run_tests: tests + cp $(TOOLS_DIR)/runtests.pl $(TARGET_DIR) cd $(TARGET_DIR); perl runtests.pl tests *************** *** 59,62 **** --- 62,66 ---- mkdir -p $(TOOLS_DIR) $(foreach dir, $(TOOLS_Tree), mkdir -p $(TOOLS_DIR)/$(dir);) + # Creates a package *************** *** 77,94 **** #--------------------------- docs_dom2: ! -rm -rf docs/xmldom2 ! perl -Isrc/tools src/tools/ipdoc.pl -d ./docs/xmldom2 -f src/perl/XML -t "insOMnia DOM Level 2 Implementation" -desc ./src/perl/XML/DOM2/notes.txt # Creates docs for IPDoc #--------------------------- docs_ipdoc: ! -rm -rf docs/ipdoc/api ! perl -Isrc/tools src/tools/ipdoc.pl -d ./docs/ipdoc/api -f src/tools/IPdoc -t "The insOMnia Perl Documenting System - IPDoc" -desc ./docs/ipdoc/README.txt # Creates docs for NetScript #--------------------------- docs_netscript: ! -rm -rf docs/netscript/api ! perl -Isrc/tools src/tools/ipdoc.pl -d ./docs/netscript/api -f src/perl/NetScript -t "NetScript 2.0 Documentation" -desc ./docs/REQUIREMENTS # Creates a package for DOM2 --- 81,98 ---- #--------------------------- docs_dom2: ! -rm -rf $(DOCS_DIR)/xmldom2/api ! perl -Isrc/tools src/tools/ipdoc.pl -d ./$(DOCS_DIR)/xmldom2/api -f src/perl/XML -t "insOMnia DOM Level 2 Implementation" -desc ./src/perl/XML/DOM2/notes.txt # Creates docs for IPDoc #--------------------------- docs_ipdoc: ! -rm -rf $(DOCS_DIR)/ipdoc/api ! perl -Isrc/tools src/tools/ipdoc.pl -d ./$(DOCS_DIR)/ipdoc/api -f src/tools/IPdoc -t "The insOMnia Perl Documenting System - IPDoc" -desc ./$(DOCS_DIR)/ipdoc/README.html # Creates docs for NetScript #--------------------------- docs_netscript: ! -rm -rf $(DOCS_DIR)/netscript/api ! perl -Isrc/tools src/tools/ipdoc.pl -d ./$(DOCS_DIR)/netscript/api -f src/perl/NetScript -t "NetScript 2.0 Documentation" -desc ./$(DOCS_DIR)/netscript/REQUIREMENTS.html # Creates a package for DOM2 *************** *** 99,103 **** mkdir -p xmldom2_$(VERSION_DOM2)/docs cp -r $(DOM2_DIR)/* xmldom2_$(VERSION_DOM2)/XML/DOM2 ! cp -r docs/xmldom2/* xmldom2_$(VERSION_DOM2)/docs rm -rf `find xmldom2_$(VERSION_DOM2) -type d | grep CVS` tar -cvzf xmldom2_$(VERSION_DOM2).tar.gz xmldom2_$(VERSION_DOM2) --- 103,107 ---- mkdir -p xmldom2_$(VERSION_DOM2)/docs cp -r $(DOM2_DIR)/* xmldom2_$(VERSION_DOM2)/XML/DOM2 ! cp -r $(DOCS_DIR)/xmldom2/* xmldom2_$(VERSION_DOM2)/docs rm -rf `find xmldom2_$(VERSION_DOM2) -type d | grep CVS` tar -cvzf xmldom2_$(VERSION_DOM2).tar.gz xmldom2_$(VERSION_DOM2) *************** *** 113,117 **** cp src/tools/ipdoc.pl ipdoc_$(VERSION_IPDOC) cp -r src/tools/IPdoc ipdoc_$(VERSION_IPDOC) ! cp -r docs/ipdoc/* ipdoc_$(VERSION_IPDOC)/docs rm -rf `find ipdoc_$(VERSION_IPDOC) -type d | grep CVS` tar -czvf ipdoc_$(VERSION_IPDOC).tar.gz ipdoc_$(VERSION_IPDOC) --- 117,121 ---- cp src/tools/ipdoc.pl ipdoc_$(VERSION_IPDOC) cp -r src/tools/IPdoc ipdoc_$(VERSION_IPDOC) ! cp -r $(DOCS_DIR)/ipdoc/* ipdoc_$(VERSION_IPDOC)/docs rm -rf `find ipdoc_$(VERSION_IPDOC) -type d | grep CVS` tar -czvf ipdoc_$(VERSION_IPDOC).tar.gz ipdoc_$(VERSION_IPDOC) *************** *** 119,122 **** --- 123,144 ---- -mkdir snapshots_ipdoc mv ipdoc_$(VERSION_IPDOC).tar.gz snapshots_ipdoc + + # Creates a package for NetScript + #-------------------------------- + package_netscript: docs_netscript + -rm -rf netscript_$(VERSION_NETSCRIPT) + mkdir -p netscript_$(VERSION_NETSCRIPT)/docs + cp $(SOURCE_DIR)/netscript.pl netscript_$(VERSION_NETSCRIPT) + cp $(SOURCE_DIR)/configuration netscript_$(VERSION_NETSCRIPT) + cp -r $(NETSCRIPT_DIR) netscript_$(VERSION_NETSCRIPT) + cp -r $(DOCS_DIR)/netscript/* netscript_$(VERSION_NETSCRIPT)/docs + mkdir -p netscript_$(VERSION_NETSCRIPT)/XML/DOM2 + cp -r $(DOM2_DIR)/* netscript_$(VERSION_NETSCRIPT)/XML/DOM2 + cp -r $(PAGE_DIR) netscript_$(VERSION_NETSCRIPT) + rm -rf `find netscript_$(VERSION_NETSCRIPT) -type d | grep CVS` + tar -czvf netscript_$(VERSION_NETSCRIPT).tar.gz netscript_$(VERSION_NETSCRIPT) + rm -rf netscript_$(VERSION_NETSCRIPT) + -mkdir snapshots_netscript + mv netscript_$(VERSION_NETSCRIPT).tar.gz snapshots_netscript statistics: Index: Makefile.files =================================================================== RCS file: /cvsroot/net-script/netscript2/Makefile.files,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.files 3 May 2002 13:36:49 -0000 1.8 --- Makefile.files 7 Jul 2002 14:47:32 -0000 1.9 *************** *** 30,35 **** --- 30,38 ---- SOURCE_DIR = src/perl PAGE_DIR = src/pages + DOCS_DIR = docs + SCRIPT_DIR = src/scripts DOM2_DIR = $(SOURCE_DIR)/XML/DOM2 + NETSCRIPT_DIR = $(SOURCE_DIR)/NetScript Perl = $(shell find -name "*.pl" -or -name "*.pm" |grep "src/") XML_Mappings = $(shell find -name "*.xml" | grep "src/xml/" | grep -v "/samples/") *************** *** 39,44 **** TOOLS = $(subst ./,,$(shell cd $(TOOLS_SourceDir);find ./ -name "*.pm" -o -name "*.pl")) TOOLS_Tree = $(subst ./,,$(shell cd $(TOOLS_SourceDir);find ./ -type d | grep -v "CVS")) ! VERSION=2.0 ! VERSION_DOM2=0.1.5alpha VERSION_IPDOC=1.04 --- 42,47 ---- TOOLS = $(subst ./,,$(shell cd $(TOOLS_SourceDir);find ./ -name "*.pm" -o -name "*.pl")) TOOLS_Tree = $(subst ./,,$(shell cd $(TOOLS_SourceDir);find ./ -type d | grep -v "CVS")) ! VERSION_DOM2=0.2.0 VERSION_IPDOC=1.04 + VERSION_NETSCRIPT=2.0pre1 |
From: Jan T. <de...@us...> - 2002-07-07 14:35:56
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv5179 Modified Files: DOMParser.pm Document.pm Element.pm Node.pm Log Message: * bugfixes * speedup Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DOMParser.pm 9 Jun 2002 12:48:12 -0000 1.7 --- DOMParser.pm 7 Jul 2002 14:35:53 -0000 1.8 *************** *** 43,46 **** --- 43,56 ---- ); + return $this; + } + + + #/** + # Performs some initialization. + # @private + #*/ + sub initInternals { + my ( $this ) = @_; # holds the currently innermost element # e.g *************** *** 64,71 **** $this -> { m_contextElement } = $this -> { m_document }; - - return $this; } - #/** --- 74,78 ---- *************** *** 105,108 **** --- 112,116 ---- sub Init { my ($this, $expat ) = @_; + $this -> initInternals(); } Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Document.pm 8 Jun 2002 12:14:29 -0000 1.9 --- Document.pm 7 Jul 2002 14:35:53 -0000 1.10 *************** *** 388,392 **** sub importNode { my ( $this, $node, $deep ) = @_; - if ($node -> getNodeType() == $XML::DOM2::Node::ATTRIBUTE_NODE) { # make a shallow copy --- 388,391 ---- *************** *** 399,403 **** for ( 0..$len ) { $newNode -> appendChild( ! $this -> importNode( $descendants -> item( $_ ) ) ); } return $newNode; --- 398,402 ---- for ( 0..$len ) { $newNode -> appendChild( ! $this -> importNode( $descendants -> item( $_ ), $deep ) ); } return $newNode; *************** *** 414,418 **** for ( 0..$len ) { $newNode -> appendChild( ! $this -> importNode( $descendants -> item( $_ ) ) ); } } --- 413,417 ---- for ( 0..$len ) { $newNode -> appendChild( ! $this -> importNode( $descendants -> item( $_ ), $deep ) ); } } Index: Element.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Element.pm 8 Jun 2002 12:14:29 -0000 1.9 --- Element.pm 7 Jul 2002 14:35:53 -0000 1.10 *************** *** 565,569 **** sub cloneNode { my ($this, $deep ) = @_; - #copy node my $newNode = $this -> getOwnerDocument() -> createElementNS( --- 565,568 ---- Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Node.pm 9 Jun 2002 12:48:12 -0000 1.20 --- Node.pm 7 Jul 2002 14:35:53 -0000 1.21 *************** *** 532,536 **** $this -> getChildNodes() -> insert( $index, $newNode ); # set new parent ! $newNode -> setParentNode( $this ); # get the siblings right --- 532,536 ---- $this -> getChildNodes() -> insert( $index, $newNode ); # set new parent ! $newNode -> { m_parentNode } = $this; # get the siblings right *************** *** 600,604 **** sub removeChild { my ( $this, $oldChild ) = @_; ! # Check index of ref node. my $index = $this -> getChildNodes() -> indexOf( $oldChild ); --- 600,604 ---- sub removeChild { my ( $this, $oldChild ) = @_; ! warn $this->getNodeName()." REMOVING: $oldChild...."; # Check index of ref node. my $index = $this -> getChildNodes() -> indexOf( $oldChild ); |
From: Jan T. <de...@us...> - 2002-07-07 14:34:51
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv4971 Modified Files: Interpreter.pm Log Message: * added support for include/rinclude * various bugfixes * added mod_perl support Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Interpreter.pm 9 Jun 2002 12:51:11 -0000 1.9 --- Interpreter.pm 7 Jul 2002 14:34:48 -0000 1.10 *************** *** 17,21 **** #*/ package NetScript::Interpreter; ! use vars qw( $VERSION $NAMESPACE_URI $FATAL_EVENT $WARNING_EVENT ); #----------------------------------------------------------- --- 17,21 ---- #*/ package NetScript::Interpreter; ! use vars qw( $VERSION $NAMESPACE_URI $FATAL_EVENT $WARNING_EVENT $CONFIGURATION ); #----------------------------------------------------------- *************** *** 23,26 **** --- 23,31 ---- #----------------------------------------------------------- #/** + # The location of the config file. + #*/ + $CONFIGURATION = "/home/kork/public_html/cgi-bin/netscript2/configuration"; + + #/** # The current Version of NetScript #*/ *************** *** 47,85 **** # This is for catching errors at compile-time - use CGI::Carp qw(fatalsToBrowser set_message); use NetScript::Util::ConfigurationParser; - BEGIN { - sub handle_errors { - my ( $message ) = @_; - my $parser = NetScript::Util::ConfigurationParser -> new(); ! my $staticDir = $parser -> getSetting( "STATIC" ); ! my $staticURL = $parser -> getSetting( "STATIC_URL" ); ! my $msg = ""; ! if ( -e $staticDir."/errorpage.html" ) { ! open( AFILE, "<".$staticDir."/errorpage.html" ); ! while(<AFILE>) { ! $msg .= $_; ! } ! close( AFILE ); ! } ! else { ! $msg = "An error occured: <br><pre><message></pre>.<br><b>Warning: could not find". ! " the error page. It is set to \"<staticdir>/errorpage.html\", but this file does not exist!</b>"; ! } ! $msg =~ s/<message>/$message/xeg; ! $msg =~ s/<version>/$VERSION/xeg; ! $msg =~ s/<staticdir>/$staticDir/xeg; ! $msg =~ s/<staticurl>/$staticURL/xeg; ! ! print $msg; ! set_message(""); } ! set_message(\&handle_errors); } #-------------------------------------------------------- # IMPORTS --- 52,95 ---- # This is for catching errors at compile-time use NetScript::Util::ConfigurationParser; ! sub handle_errors { ! my ( $message ) = @_; ! my $parser = NetScript::Util::ConfigurationParser -> new( $CONFIGURATION ); ! my $staticDir = $parser -> getSetting( "STATIC" ); ! my $staticURL = $parser -> getSetting( "STATIC_URL" ); ! my $msg = ""; ! if ( -e $staticDir."/errorpage.html" ) { ! open( AFILE, "<".$staticDir."/errorpage.html" ); ! while(<AFILE>) { ! $msg .= $_; ! } ! close( AFILE ); } ! else { ! $msg = "<html><body>An error occured: <br><pre><message></pre>.<br><b>Warning: could not find". ! " the error page. It is set to \"<staticdir>/errorpage.html\", but this file does not exist!</b></body></html>"; ! } ! ! $msg =~ s/<message>/$message/xeg; ! $msg =~ s/<version>/$VERSION/xeg; ! $msg =~ s/<staticdir>/$staticDir/xeg; ! $msg =~ s/<staticurl>/$staticURL/xeg; ! ! print $msg; } + BEGIN { + $SIG{__DIE__} = sub { + unless( $^S ) { + warn @_; + exit 0; + } + } + } + #-------------------------------------------------------- # IMPORTS *************** *** 101,104 **** --- 111,128 ---- use XML::DOM2::XMLDOMWriterStyle; + + + sub handler { + eval { + use Apache::Constants; + use Apache; + }; + + my ($request) = @_; + my $interpreter = NetScript::Interpreter -> new( $request ); + $interpreter -> run(); + return OK; + } + #/** # Constructor of a new Interpreter. *************** *** 106,110 **** #*/ sub new { ! my $proto = shift; # get Prototype my $class = ref( $proto ) || $proto;# get the Classname --- 130,134 ---- #*/ sub new { ! my ( $proto, $request ) = @_; my $class = ref( $proto ) || $proto;# get the Classname *************** *** 113,119 **** bless( $this, $class ); # create Object $this -> { m_CGI } = new CGI; # CGI-Member $this -> { m_EventRelay } = NetScript::Engine::EventRelay -> new(); - $this -> { m_ConfigFile } = "file:./config.xml"; $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); $this -> { m_UIDGenerator } = --- 137,143 ---- bless( $this, $class ); # create Object + $this -> { m_Request } = $request; $this -> { m_CGI } = new CGI; # CGI-Member $this -> { m_EventRelay } = NetScript::Engine::EventRelay -> new(); $this -> { m_Filename } = $this -> getCGI() -> param( "filename" ); $this -> { m_UIDGenerator } = *************** *** 126,129 **** --- 150,154 ---- NetScript::Engine::State -> new(); $this -> { m_ScriptURL } = undef; + $this -> { m_DOMParser } = XML::DOM2::DOMParser -> new(); my $eventListener = NetScript::Engine::EventListener -> new(); *************** *** 135,139 **** $this -> { m_Cookies } = \@cookieList; ! my $libLoader = NetScript::Engine::LibLoader -> new( $this, "NetScript/Libraries" ); $this -> { m_LibLoader } = $libLoader; --- 160,164 ---- $this -> { m_Cookies } = \@cookieList; ! my $libLoader = NetScript::Engine::LibLoader -> new( $this, "/home/kork/public_html/cgi-bin/netscript2/NetScript/Libraries" ); $this -> { m_LibLoader } = $libLoader; *************** *** 156,159 **** --- 181,192 ---- #/** + # Returns an instance of XML::DOM2::DOMParser. + #*/ + sub getDOMParser { + my ( $this ) = @_; + $this -> { m_DOMParser }; + } + + #/** # Returns an instance of NetScript::Engine::LibLoader. #*/ *************** *** 169,173 **** sub getInterpreterURL { my ( $this ) = @_; ! $this -> getCGI() -> url(); } --- 202,206 ---- sub getInterpreterURL { my ( $this ) = @_; ! $this -> getCGI() -> url( -path=>1); } *************** *** 262,281 **** # start input file parsing ! my $domparser = XML::DOM2::DOMParser -> new(); my $dom = $domparser -> parseString( $scriptContent ); ! # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); $this -> { m_DOMWalker } = $domwalker; ! ! # Walk over the DOM my $resultDOM = $domwalker -> walkOver( $dom ); ! my $domwriter = XML::DOM2::DOMWriter -> new(); my $domstyle = XML::DOM2::XMLDOMWriterStyle -> new(); my $string = $domwriter -> writeDOMToString( $resultDOM, $domstyle ); ! my $cookiesRef = $this -> { m_Cookies }; ! print $this -> getCGI() -> header( -cookie=>$cookiesRef ); print $string; --- 295,322 ---- # start input file parsing ! my $domparser = $this -> { m_DOMParser }; my $dom = $domparser -> parseString( $scriptContent ); ! # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); $this -> { m_DOMWalker } = $domwalker; ! ! # Walk over the DOM my $resultDOM = $domwalker -> walkOver( $dom ); ! my $domwriter = XML::DOM2::DOMWriter -> new(); my $domstyle = XML::DOM2::XMLDOMWriterStyle -> new(); my $string = $domwriter -> writeDOMToString( $resultDOM, $domstyle ); ! my $cookiesRef = $this -> { m_Cookies }; ! ! # check for mod_perl ! if ( $this -> { m_Request } ) { ! $this -> { m_Request } -> send_cgi_header( ! $this -> getCGI() -> header( -cookie=>$cookiesRef ) ); ! } ! else { ! print $this -> getCGI() -> header( -cookie=>$cookiesRef ); ! } print $string; *************** *** 381,387 **** sub onFatalEvent { my ($this, $event ) = @_; ! my $line = $this -> getDOMWalker() -> currentSource() -> getLine(); ! die $event -> eventMessage(). ! "\n\nError occured in or around line $line in ".$this -> getScriptURL()."\n"; } --- 422,443 ---- sub onFatalEvent { my ($this, $event ) = @_; ! ! # Check for mod_perl ! if ( $this -> { m_Request } ) { ! $this -> { m_Request } -> send_cgi_header( "Content-type: text/html\n\n" ); ! } ! else { ! print "Content-type: text/html\n\n"; ! } ! ! if ( $this -> getDOMWalker() ) { ! my $line = $this -> getDOMWalker() -> currentSource() -> getLine(); ! &handle_errors( $event -> eventMessage(). ! "\n\nError occured in or around line $line in ".$this -> getScriptURL()."\n" ); ! } ! else { ! &handle_errors( $event -> eventMessage() ); ! } ! exit 0; } |
From: Jan T. <de...@us...> - 2002-07-07 14:34:45
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv4931 Modified Files: ConfigurationParser.pm Log Message: * added support for include/rinclude * various bugfixes * added mod_perl support Index: ConfigurationParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/ConfigurationParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConfigurationParser.pm 2 Jun 2002 19:31:23 -0000 1.4 --- ConfigurationParser.pm 7 Jul 2002 14:34:42 -0000 1.5 *************** *** 14,17 **** --- 14,18 ---- #*/ package NetScript::Util::ConfigurationParser; + #use Carp; #-------------------------------------------------------- *************** *** 32,36 **** ! open( CFILE, "<$configfile" ); while( <CFILE> ) { unless( /^[ ]*#/ ) { #filter comments --- 33,39 ---- ! ! open( CFILE, "<$configfile" ) || warn "Cannot find Configfile $configfile!"; ! while( <CFILE> ) { unless( /^[ ]*#/ ) { #filter comments |
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv4900 Modified Files: ControlStructuresLibrary.pm DebugLibrary.pm DefaultLibrary.pm FormsLibrary.pm Library.pm VariablesLibrary.pm Log Message: * added support for include/rinclude * various bugfixes * added mod_perl support Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ControlStructuresLibrary.pm 9 Jun 2002 12:49:07 -0000 1.4 --- ControlStructuresLibrary.pm 7 Jul 2002 14:34:37 -0000 1.5 *************** *** 29,42 **** # </ns:while> # ! # <ns:for var="[counter variable]" from="[start value]" to="[end value]"> # [for-block here] # </ns:for> # # </pre> ! # # Also this library provides the library loading mechanism of NetScript. # You can load a library by using a processing instruction: # <pre> ! # <netscript use LIBNAME> # </pre> # The library must be named "LIBNAMELibrary.pm" and must be located --- 29,43 ---- # </ns:while> # ! # <ns:for <var="[counter variable]"|name="[counter variabe]"> ! # from="[start value]" to="[end value]" [step="[step]"]> # [for-block here] # </ns:for> # # </pre> ! # <p> # Also this library provides the library loading mechanism of NetScript. # You can load a library by using a processing instruction: # <pre> ! # <?netscript use LIBNAME?> # </pre> # The library must be named "LIBNAMELibrary.pm" and must be located *************** *** 48,51 **** --- 49,102 ---- # third-party-libraries in another place as the base libraries, # however this is just a recommendation, it is not needed. + # </p> + # <p> + # This library also provides an include mechanism for other netscript files. + # Currently the following include modes are supported: + # <pre> + # <?netscript import FILENAME or URL?> + # </pre> + # <p> + # This imports the file at the given URL and inserts its nodes in the source + # 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 + # in imported files, there is a special netscript tag: + # </p> + # <pre> + # <ns:ignore>....</ns:ignore> + # </pre> + # <p> + # This tag can serve as your document element, but is ignored in processing. + # The tags within the <ns:ignore>-tag are moved up one level in the + # destination document, the <ns:ignore>-tag disappears. + # </p> + # <p> + # There are occasions when the import-facility is not enough. One thing is + # if you have a head and a foot for all your pages. Mostly this will be done + # 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. + # The other file must have a "reverse-import point", or just rpoint. This + # is specified by using the following PI: + # </p> + # <pre> + # <?netscript ripoint {NAME}?> + # </pre> + # <p> + # In the source document, you have to specifiy the following PI: + # </p> + # <pre> + # <?netscript rimport {TARGETURL} {RIPOINT_NAME}?> + # </pre> + # <p> + # This PI has to be specified in the document root, before the root element. + # This serves speed purposes, since the interpreter has to search for this + # PI and it will not search the whole document. The sooner the PI occurs + # in the document, the faster the processing will be. + # </p> #*/ package NetScript::Libraries::ControlStructuresLibrary; *************** *** 53,57 **** - use NetScript::Libraries::DebugLibrary; use NetScript::Engine::EventListener; --- 104,107 ---- *************** *** 70,75 **** --- 120,127 ---- my %forLoops = (); my %forLoopsVarNames = (); + my %referencedDocuments = (); $this -> { m_forLoops } = \%forLoops; $this -> { m_forLoopsVarNames } = \%forLoopsVarNames; + $this -> { m_referencedDocuments } = \%referencedDocuments; $this; } *************** *** 81,84 **** --- 133,137 ---- # create event listeners for all events + my $eventListener1 = NetScript::Engine::EventListener -> new(); $eventListener1 -> init( *************** *** 96,103 **** --- 149,162 ---- "processingInstruction", $this ); + my $eventListener4 = NetScript::Engine::EventListener -> new(); + $eventListener4 -> init( + $NetScript::Engine::DOMWalker::DOCUMENT_START_EVENT, + "documentStart", $this ); + my $eventRelay = $this -> interpreter() -> getEventRelay(); $eventRelay -> addEventListener( $eventListener1 ); $eventRelay -> addEventListener( $eventListener2 ); $eventRelay -> addEventListener( $eventListener3 ); + $eventRelay -> addEventListener( $eventListener4 ); } *************** *** 108,112 **** sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 167,171 ---- sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 127,130 **** --- 186,194 ---- 0; # consume event } + elsif( $node -> getLocalName() eq "ignore" ) { + # Walk over the node + $domWalker -> stepSourceIn(); + 0; #consume event + } else { 1; # do not consume event *************** *** 208,213 **** } else { ! # FIXME: DO NOT use DIE ! die "Else without IF" ; } } --- 272,277 ---- } else { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, "else without if", undef ); } } *************** *** 334,337 **** --- 398,402 ---- # no it should not, skip node delete $this -> { m_forLoops } -> { $node }; + # delete $this -> { m_forLoopsVarNames } -> { $node }; $this -> interpreter() -> dropState(); $domWalker -> stepSourceNext(); *************** *** 372,376 **** sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 437,441 ---- sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 393,396 **** --- 458,464 ---- 0; # consume event } + elsif ($node -> getLocalName() eq "ignore" ) { + 0; #consume event + } else { 1; # do not consume event *************** *** 408,419 **** sub processingInstruction { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getTarget() eq "netscript" ) { my $data = $node -> getData(); ! if ( $data =~ /\s*use\s*([^\s]*)/) { # check for "use LIBNAME" ! $this -> interpreter -> getLibLoader() -> loadLibrary( $1 ); ! $domWalker -> stepSourceIn(); return 0; # consume event } --- 476,513 ---- sub processingInstruction { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); + # Check for a NetScript-Related target if ( $node -> getTarget() eq "netscript" ) { my $data = $node -> getData(); ! warn "DATA: $data\n\n\n"; ! if ( $data =~ /^\s*use\s*([^\s]*)/) { # check for "use LIBNAME" ! $this -> interpreter() -> getLibLoader() -> loadLibrary( $1 ); ! $domWalker -> stepSourceNext(); ! return 0; # consume event ! } ! elsif ( $data =~ /^\s*import\s*([^\s]+)/ ) { #check for "import FILEURL" ! my $fileURL = $1; ! $fileURL = $this -> checkURL( $fileURL ); ! ! 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 ); ! } ! return 0; # consume event ! } ! elsif ( $data =~ /^\s*rimport\s+([^\s]+)\s+([^\s]+)\s*/ ) { # filter out "rimport"-PIs ! $domWalker -> stepSourceNext(); return 0; # consume event } *************** *** 422,426 **** } ! sub shutdown { --- 516,551 ---- } ! #/** ! # Imports the given document into the current source document of the ! # given DOMWalker at the location of the given node. The given node will ! # be removed. ! # @param the document to import ! # @param the DOMWalker ! # @param the reference node ! #*/ ! sub importDocument { ! my ( $this, $document, $domWalker, $node ) = @_; ! my $sourceDocument = $domWalker -> sourceDocument(); ! my $children = $document -> getChildNodes(); ! my $length = $children -> getLength() - 1; ! my $parent = $node -> getParentNode(); ! my $sibling = $node -> getNextSibling(); ! ! # Import all nodes of the document to the current source document ! for ( 0..$length ) { ! my $importedChild = $sourceDocument -> importNode( ! $children -> item( $_ ), 1 ); ! unless( defined( $sibling ) ) { ! $parent -> appendChild( $importedChild ); ! } ! else { ! $parent -> insertBefore( $importedChild, $sibling ); ! } ! } ! # move source pointer to next node ! $domWalker -> stepSourceNext(); ! # remove PI ! $parent -> removeChild( $node ); ! } sub shutdown { *************** *** 444,447 **** --- 569,709 ---- ); } + + #/** + # Called when the document starts. The Library searches for rinclude PIs + # in the document root. If there is one found, the current document will + # be included into the referenced document. If none is found, nothing will + # happen. + #*/ + sub documentStart { + my ( $this, $event ) = @_; + my $domWalker = $event -> getEventUnknown(); + my $sourceDocument = $domWalker -> currentSource(); + my $children = $sourceDocument -> getChildNodes(); + my $length = $children -> getLength() - 1; + + for ( 0..$length ) { + my $child = $children -> item( $_ ); + if ( $child -> getNodeType() == + $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE ) { + 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 ); + warn "RIMPORT: Changing to $fileData ... > $document " ; + $domWalker -> resetDocument( $document ); + $this -> addDocumentReference( $importPoint, $document, $sourceDocument ); + $domWalker -> sourceAgain(); + return 0; # consume event; + } + } + } + } + return 1; # do not consume event + } + + #/** + # 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 + # @private + #*/ + 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 + # if no such document is currently known. + # @private + #*/ + sub getReferencedDocument { + my ( $this , $name, $target ) = @_; + $this -> { m_referencedDocuments } -> { $name.$target }; + } + + + #/** + # Checks the given URL for having a protocol and makes + # absolute URLs out of relative URLs. + # @param the URL to check + # @return the checked URL + #*/ + sub checkURL { + my ( $this, $fileURL ) = @_; + unless ( $fileURL =~ /^[A-Za-z]+:/ ) { # check for protocol + # no protocol, check for relative URL + if ( $fileURL =~ /^\./ ) { # is relativeUrl + $fileURL = $this -> calculateRelativeURL( $fileURL ); + } + else { + # no relative URL - assume "file:"-protocol + $fileURL = "file:".$fileURL; + } + } + return $fileURL; + } + + #/** + # Calculates the resulting URL out of the known URL of the currently executed + # script and the given relative URL. + # @public + # @param a relative URL + # @return an absolute URL + #*/ + sub calculateRelativeURL { + my ( $this, $relativeURL ) = @_; + my $scriptURL = $this -> interpreter() -> getScriptURL(); + + $scriptURL =~ /(.*)\/[^\/]+$/; + $scriptURL = $1; # strip filename + + # for each single point we stay here, for each double point + # we go one folder down... + while ($relativeURL =~ /^([^\/]+)\/(.*)$/ ) { + my $prefix = $1; + $relativeURL = $2; + if ( $prefix eq "." ) { + next; # stay in the same folder + } + elsif ( $prefix eq ".." ) { + $scriptURL =~ /(.*)\/[^\/]+$/; + $scriptURL = $1; # skip folder... + next; + } + else { # its a name + $scriptURL .= "/".$prefix; + next; + } + } + $scriptURL .= "/".$relativeURL; + return $scriptURL; + } + + sub getName { + "Control Structures Library"; + } + + sub getVersion { + 1.0; + } + + sub getDescription { + "This library provides control structures. Also it provides the library import facility."; + } + + 1; #make require happy Index: DebugLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DebugLibrary.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DebugLibrary.pm 9 Jun 2002 12:49:07 -0000 1.5 --- DebugLibrary.pm 7 Jul 2002 14:34:37 -0000 1.6 *************** *** 73,77 **** my ( $this, $event ) = @_; if ( $this -> debugMessage() ne "" ) { ! my $domWalker = $event -> eventUnknown(); my $document = $domWalker -> sourceDocument(); my $comment = $document -> createComment( --- 73,77 ---- my ( $this, $event ) = @_; if ( $this -> debugMessage() ne "" ) { ! my $domWalker = $event -> getEventUnknown(); my $document = $domWalker -> sourceDocument(); my $comment = $document -> createComment( *************** *** 84,88 **** #/** # Called when a debug message has to be inserted. The message ! # must be in the eventMessage - field. The eventUnknown-field # should contain the sender of the event. Messages are # printed this way: --- 84,88 ---- #/** # Called when a debug message has to be inserted. The message ! # must be in the eventMessage - field. The getEventUnknown-field # should contain the sender of the event. Messages are # printed this way: *************** *** 95,99 **** sub debugEvent { my ( $this, $event ) = @_; ! my $sender = $event -> eventUnknown(); my $message = $event -> eventMessage(); $this -> { m_debug } .= "[$sender] $message\n"; --- 95,99 ---- sub debugEvent { my ( $this, $event ) = @_; ! my $sender = $event -> getEventUnknown(); my $message = $event -> eventMessage(); $this -> { m_debug } .= "[$sender] $message\n"; *************** *** 116,119 **** --- 116,131 ---- my ($this) = @_; $this -> SUPER::shutdown(); + } + + sub getName { + "Debug Library"; + } + + sub getVersion { + 1.0; + } + + sub getDescription { + "This library provides some basic debugging capabilities."; } Index: DefaultLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DefaultLibrary.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DefaultLibrary.pm 15 May 2002 18:22:18 -0000 1.3 --- DefaultLibrary.pm 7 Jul 2002 14:34:37 -0000 1.4 *************** *** 103,107 **** sub copyNode { my ($this, $event) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); $domWalker -> insertIntoTarget( $node, 1 ); --- 103,107 ---- sub copyNode { my ($this, $event) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); $domWalker -> insertIntoTarget( $node, 1 ); *************** *** 117,121 **** sub elementStarted { my ($this, $event) = @_; ! my $domWalker = $event -> eventUnknown(); $this -> copyNode( $event ); 0; # consume event --- 117,121 ---- sub elementStarted { my ($this, $event) = @_; ! my $domWalker = $event -> getEventUnknown(); $this -> copyNode( $event ); 0; # consume event *************** *** 129,133 **** sub elementFinished { my ($this, $event) = @_; ! my $domWalker = $event -> eventUnknown(); $domWalker -> stepTargetUp(); 0; # consume event --- 129,133 ---- sub elementFinished { my ($this, $event) = @_; ! my $domWalker = $event -> getEventUnknown(); $domWalker -> stepTargetUp(); 0; # consume event *************** *** 141,145 **** sub documentStarted { my ($this, $event) = @_; ! my $domWalker = $event -> eventUnknown(); $domWalker -> stepSourceIn(); } --- 141,145 ---- sub documentStarted { my ($this, $event) = @_; ! my $domWalker = $event -> getEventUnknown(); $domWalker -> stepSourceIn(); } *************** *** 150,153 **** --- 150,161 ---- my ($this) = @_; $this -> SUPER::shutdown(); + } + + sub getName { + "Default Library"; + } + + sub getDescription { + "This Library provides basic tag copying function. If no other library processes a tag, it will be finally processed by this library."; } Index: FormsLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/FormsLibrary.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FormsLibrary.pm 9 Jun 2002 12:49:07 -0000 1.3 --- FormsLibrary.pm 7 Jul 2002 14:34:37 -0000 1.4 *************** *** 65,71 **** # register the P-object ! $this -> interpreter() -> getState() -> setObjectValue( "P", $paramWrapper ); # register the C-object ! $this -> interpreter() -> getState() -> setObjectValue( "C", $cookieWrapper ); # register event listeners for the cookie-tag --- 65,71 ---- # register the P-object ! $this -> interpreter() -> getState() -> createObjectValue( "P", $paramWrapper ); # register the C-object ! $this -> interpreter() -> getState() -> createObjectValue( "C", $cookieWrapper ); # register event listeners for the cookie-tag *************** *** 91,95 **** sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 91,95 ---- sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 113,117 **** sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 113,117 ---- sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 201,204 **** --- 201,216 ---- "[Forms]" ); + } + + sub getName { + "Forms Library"; + } + + sub getVersion { + 1.0; + } + + sub getDescription { + "This Library adds functionality for processing forms. It adds the P and C variables and cookie-support."; } 1; #make require happy Index: Library.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/Library.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Library.pm 2 Jun 2002 19:31:23 -0000 1.4 --- Library.pm 7 Jul 2002 14:34:37 -0000 1.5 *************** *** 72,75 **** --- 72,101 ---- } + #/** + # Returns the name of the library. + # @public + # @abstract + #*/ + sub getName { + undef; + } + + #/** + # Returns a description of the library. + # @public + # @abstract + #*/ + sub getDescription { + undef; + } + + #/** + # Returns the version of the library as float value. + # @public + # @abstract + #*/ + sub getVersion { + undef; + } 1; #make require happy Index: VariablesLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/VariablesLibrary.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** VariablesLibrary.pm 9 Jun 2002 12:49:07 -0000 1.2 --- VariablesLibrary.pm 7 Jul 2002 14:34:37 -0000 1.3 *************** *** 14,18 **** # <pre> # ! # <ns:var var="[variable name]" value="[value]"/> # </pre> #*/ --- 14,18 ---- # <pre> # ! # <ns:var {var="[variable name]"|name="[variable name]"} value="[value]"/> # </pre> #*/ *************** *** 66,70 **** sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 66,70 ---- sub elementStarted { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 88,92 **** sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { --- 88,92 ---- sub elementFinished { my ( $this, $event ) = @_; ! my $domWalker = $event -> getEventUnknown(); my $node = $domWalker -> currentSource(); if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { *************** *** 150,153 **** --- 150,165 ---- "[Variables]" ); + } + + sub getName { + "Variables Library"; + } + + sub getVersion { + 1.0; + } + + sub getDescription { + "This Library adds functionality for creating and changing variables."; } 1; #make require happy |
From: Jan T. <de...@us...> - 2002-07-07 14:34:34
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv4868 Modified Files: DOMWalker.pm Event.pm LibLoader.pm StatementEvaluator.pm Log Message: * added support for include/rinclude * various bugfixes * added mod_perl support Index: DOMWalker.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DOMWalker.pm 9 Jun 2002 12:50:04 -0000 1.6 --- DOMWalker.pm 7 Jul 2002 14:34:31 -0000 1.7 *************** *** 31,34 **** --- 31,35 ---- $COMMENT_EVENT $PI_EVENT ); + #/** # Event which is generated upon start of the document *************** *** 243,247 **** sub walkOver { my ( $this, $source ) = @_; ! $this -> setCurrentSource( $source ); my $di = XML::DOM2::DOMImplementation -> new(); # create target document --- 244,261 ---- sub walkOver { my ( $this, $source ) = @_; ! $this -> resetDocument( $source ); ! $this -> goWalk(); ! # Return result document ! $this -> targetDocument(); ! } ! ! #/** ! # Resets the current document, clears the target document and ! # sets the source pointer to the document node of the source document. ! # @param the source document ! #*/ ! sub resetDocument { ! my ( $this, $sourceDocument ) = @_; ! my $di = XML::DOM2::DOMImplementation -> new(); # create target document *************** *** 252,261 **** $this -> setCurrentTarget( $document ); ! $this -> setSourceDocument( $source ); $this -> setTargetDocument( $document ); ! ! $this -> goWalk(); ! # Return result document ! $document; } --- 266,272 ---- $this -> setCurrentTarget( $document ); ! $this -> setSourceDocument( $sourceDocument ); $this -> setTargetDocument( $document ); ! $this -> setCurrentSource( $sourceDocument ); } *************** *** 269,272 **** --- 280,284 ---- while ( $this -> currentSource() ) { + warn "I'm walking: ". $this -> currentSource(); $this -> createEvent( $this -> currentSource() ); } Index: Event.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/Event.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Event.pm 15 May 2002 18:21:37 -0000 1.6 --- Event.pm 7 Jul 2002 14:34:31 -0000 1.7 *************** *** 74,78 **** # @public #*/ ! sub eventUnknown { my ($this) = @_; return $this -> { m_EventUnknown }; --- 74,78 ---- # @public #*/ ! sub getEventUnknown { my ($this) = @_; return $this -> { m_EventUnknown }; Index: LibLoader.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/LibLoader.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LibLoader.pm 16 Jun 2002 18:15:12 -0000 1.1 --- LibLoader.pm 7 Jul 2002 14:34:31 -0000 1.2 *************** *** 41,45 **** my %importedLibs = (); ! $this -> { m_ImportedLibs } = \%importedLibs; $this -> { m_BaseDir } = $baseDir; $this -> { m_Interpreter } = $interpreter; --- 41,45 ---- my %importedLibs = (); ! $this -> { m_LoadedLibs } = \%importedLibs; $this -> { m_BaseDir } = $baseDir; $this -> { m_Interpreter } = $interpreter; *************** *** 80,83 **** --- 80,84 ---- # create instance my $libInstance = $perlLibName -> new(); + $this -> { m_LoadedLibs } -> { $libName } = $libInstance; # init instance $libInstance -> init( $this -> interpreter() ); *************** *** 91,95 **** $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, ! "Cannot load library \"$libName\". Library not found!" ); } } --- 92,96 ---- $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, ! "Cannot load library \"$libName\". Library not found (basedir: ".$this -> { m_BaseDir}. ")" ); } } *************** *** 105,108 **** --- 106,110 ---- # @param the base directory to start search from # @param the name of the library. + # @private #*/ sub lookupLibrary { *************** *** 152,155 **** --- 154,167 ---- } + + #/* + # Returns a reference to an array holding references to all loaded libraries. + # @public + #*/ + sub getLoadedLibraries { + my ( $this ) = @_; + my @values = values( %{ $this -> { m_LoadedLibs } } ); + return \@values; + } 1; # make "require" happy Index: StatementEvaluator.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/StatementEvaluator.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** StatementEvaluator.pm 9 Jun 2002 12:50:04 -0000 1.8 --- StatementEvaluator.pm 7 Jul 2002 14:34:31 -0000 1.9 *************** *** 94,100 **** else { $result = $this -> getVariableValue( $param ); - # if (! defined($result)) { - # die "[standardlib] Error: undefined variable ", $param, "\n"; - # } } } --- 94,97 ---- |
From: Jan T. <de...@us...> - 2002-07-02 11:08:16
|
Update of /cvsroot/net-script/netscript2/docs/xmldom2 In directory usw-pr-cvs1:/tmp/cvs-serv27226 Modified Files: CHANGELOG.html Log Message: Index: CHANGELOG.html =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/xmldom2/CHANGELOG.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CHANGELOG.html 8 Jun 2002 12:01:47 -0000 1.1 --- CHANGELOG.html 2 Jul 2002 11:08:11 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + <pre> #-------------------------------------------------------- # DOM Level 2 Implementation for Perl *************** *** 11,18 **** --------------------------------------------------------- ! Version 0.1.3alpha --------------------------------------------------------- ! * rewrote the complete interface, should be much faster ! and easier to use now --------------------------------------------------------- --- 12,28 ---- --------------------------------------------------------- ! Version 0.2.0 --------------------------------------------------------- ! * rewrote the complete interface ! * 30% faster ! * easier to program ! * fixed namespaceURI-bug in XML::DOM2::DOMParser ! ! --------------------------------------------------------- ! Version 0.1.4alpha ! --------------------------------------------------------- ! * fixed a lot of bugs ! * added a DOMWriter which transfers the DOM into a ! textual representation --------------------------------------------------------- *************** *** 33,34 **** --- 43,45 ---- --------------------------------------------------------- * initial public version + </pre> |
From: Jan T. <de...@us...> - 2002-06-16 18:15:15
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv18415 Added Files: LibLoader.pm Log Message: --- NEW FILE: LibLoader.pm --- #-------------------------------------------------------- # $Id: LibLoader.pm,v 1.1 2002/06/16 18:15:12 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 class is responsible for loading libraries. It loads # libraries by name. The convention is, that the libraries have # to be in a file named <LibraryName>Library.pm. Libraries # can be loaded from local filesystem only. #*/ package NetScript::Engine::LibLoader; #-------------------------------------------------------- # Imports #-------------------------------------------------------- use NetScript::Interpreter; #-------------------------------------------------------- # Globals #-------------------------------------------------------- #/** # The constructor. # @param an instance of NetScript::Interpreter. # @param the base directory where the libraries are located. #*/ sub new { my ($proto, $interpreter, $baseDir) = @_; my $class = ref( $proto ) || $proto;# get the Classname my $this = {}; bless( $this, $class ); # create Object my %importedLibs = (); $this -> { m_ImportedLibs } = \%importedLibs; $this -> { m_BaseDir } = $baseDir; $this -> { m_Interpreter } = $interpreter; return $this; # return Object } #/** # Returns an instance of NetScript::Interpreter. # @private #*/ sub interpreter { my ( $this ) = @_; $this -> { m_Interpreter }; } #/** # Loads the given Library, if it has not yet been loaded. # @param the name of the library. #*/ sub loadLibrary { my ( $this, $libName ) = @_; #if lib is not yet loaded. unless ( defined( $this -> { m_LoadedLibs } -> { $libName } ) ) { # try to find the library. my $filename = $this -> lookupLibrary( $this -> { m_BaseDir }, $libName ); if ( $filename ) { my $perlLibName = $this -> getLibName( $filename ); unless( defined( $perlLibName ) ) { $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, "Cannot load library \"$libName\". The library contained no package statement!" ); } unless ( defined( eval { # load file require $filename; # import modules import $perlLibName; # create instance my $libInstance = $perlLibName -> new(); # init instance $libInstance -> init( $this -> interpreter() ); } ) ) { $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, "Cannot load library \"$libName\". $@" ); } } else { $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( $NetScript::Interpreter::FATAL_EVENT, "Cannot load library \"$libName\". Library not found!" ); } } } #/** # Searches for a given library in the given directory and # returns the first occurence of a matching file. If # no matching file could be found in the directory, all # subdirectories are also searched. If the library cannot # be found at all, returns undef. Else returns the filename, # found. # @param the base directory to start search from # @param the name of the library. #*/ sub lookupLibrary { my ( $this, $dir, $library ) = @_; my $libraryFile = $library."Library.pm"; opendir( DIR, $dir ); # search all files in the given directory which match the # filename my @files = grep { $_ eq $libraryFile && -f "$dir/$_" } readdir( DIR ); rewinddir( DIR ); my @subdirs = grep{ $_ ne "." && $_ ne ".." && -d "$dir/$_" } readdir( DIR ); closedir( DIR ); # if file could be found, then use it my $result = shift @files; if ( -f "$dir/$result" ) { return "$dir/$result"; } else { # search subdirs for ( @subdirs ) { my $file = $this -> lookupLibrary( "$dir/$_", $library ); return $file if ($file ne ""); } } # no file found return undef; } #/** # Returns the perl module name of the module contained in the # given filename. # @param the filename to search. # @retun the name of the package located in this file. #*/ sub getLibName { my ( $this, $filename ) = @_; open( AFILE, "<$filename" ); while( <AFILE> ) { if ( /package\s+([A-Za-z0-9_:]+)\s*;/ ) { close( AFILE ); return $1; } } close( AFILE ); return undef; } 1; # make "require" happy |
From: Jan T. <de...@us...> - 2002-06-16 18:15:03
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv17983 Modified Files: wipeout.project Log Message: Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/wipeout.project,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wipeout.project 2 Jun 2002 19:31:23 -0000 1.9 --- wipeout.project 16 Jun 2002 18:15:00 -0000 1.10 *************** *** 1,347 **** b ! C DmDictionary 0 1ebf4 8 ! c 0 1ef54 9 ! C Category 1 585c ! c 0 1ef94 4 ! C DmString 2 1ef9b 2 e3 ! c 2 1ef9a a defaultExe ! C DmSet 3 1ef9d 1 ! c 2 586b 2 e3 ! L 586b ! c 2 1ef9c b executables ! c 3 1ef98 3 ! c 2 5872 3 *.C ! L 5872 ! c 2 5875 4 *.cc ! L 5875 ! c 2 5878 5 *.cpp ! L 5878 ! c 2 1ef97 a extensions ! c 2 1ef96 a CPP_source ! c 2 1ef95 4 name ! c 2 1ef56 a CPP_source ! c 1 588d ! c 0 1efda 4 ! c 2 1efe1 2 e3 ! c 2 1efe0 a defaultExe ! c 3 1efe3 1 ! c 2 589a 2 e3 ! L 589a ! c 2 1efe2 b executables ! c 3 1efde 1 ! c 2 58a1 3 *.c ! L 58a1 ! c 2 1efdd a extensions ! c 2 1efdc 8 C_source ! c 2 1efdb 4 name ! c 2 1ef57 8 C_source ! c 1 58b6 ! c 0 1f014 4 ! c 2 1f01b 2 e3 ! c 2 1f01a a defaultExe ! c 3 1f01d 1 ! c 2 58c3 2 e3 ! L 58c3 ! c 2 1f01c b executables ! c 3 1f018 1 ! c 2 58ca 3 *.e ! L 58ca ! c 2 1f017 a extensions ! c 2 1f016 6 Eiffel ! c 2 1f015 4 name ! c 2 1ef58 6 Eiffel ! c 1 58df ! c 0 1f04e 4 ! c 2 1f055 2 e3 ! c 2 1f054 a defaultExe ! c 3 1f057 1 ! c 2 58ec 2 e3 ! L 58ec ! c 2 1f056 b executables ! c 3 1f052 4 ! c 2 58f3 3 *.F ! L 58f3 ! c 2 58f6 3 *.f ! L 58f6 ! c 2 58f9 5 *.for ! L 58f9 ! c 2 58fc 5 *.fpp ! L 58fc ! c 2 1f051 a extensions ! c 2 1f050 7 Fortran ! c 2 1f04f 4 name ! c 2 1ef59 7 Fortran ! c 1 5911 ! c 0 1f094 4 ! c 2 1f09b 2 e3 ! c 2 1f09a a defaultExe ! c 3 1f09d 1 ! c 2 591e 2 e3 ! L 591e ! c 2 1f09c b executables ! c 3 1f098 2 ! c 2 5925 3 *.H ! L 5925 ! c 2 5928 3 *.h ! L 5928 ! c 2 1f097 a extensions ! c 2 1f096 6 Header ! c 2 1f095 4 name ! c 2 1ef5a 6 Header ! c 1 593d ! c 0 1f0d2 4 ! c 2 1f0d9 9 surfboard ! c 2 1f0d8 a defaultExe ! c 3 1f0db 2 ! c 2 594a 2 e3 ! L 594a ! c 2 594d 9 surfboard ! L 594d ! c 2 1f0da b executables ! c 3 1f0d6 2 ! c 2 5954 5 *.htm ! L 5954 ! c 2 5957 6 *.html ! L 5957 ! c 2 1f0d5 a extensions ! c 2 1f0d4 4 Html ! c 2 1f0d3 4 name ! c 2 1ef5b 4 Html ! c 1 596c ! c 0 1f114 4 ! c 2 1f11b 2 e3 ! c 2 1f11a a defaultExe ! c 3 1f11d 1 ! c 2 5979 2 e3 ! L 5979 ! c 2 1f11c b executables ! c 3 1f118 1 ! c 2 5980 6 *.java ! L 5980 ! c 2 1f117 a extensions ! c 2 1f116 4 Java ! c 2 1f115 4 name ! c 2 1ef5c 4 Java ! c 1 5995 ! c 0 1f14e 4 ! c 2 1f155 2 e3 ! c 2 1f154 a defaultExe ! c 3 1f157 1 ! c 2 59a2 2 e3 ! L 59a2 ! c 2 1f156 b executables ! c 3 1f152 1 ! c 2 59a9 5 *.tex ! L 59a9 ! c 2 1f151 a extensions ! c 2 1f150 5 Latex ! c 2 1f14f 4 name ! c 2 1ef5d 5 Latex ! c 1 59be ! c 0 1f188 4 ! c 2 1f18f 2 e3 ! c 2 1f18e a defaultExe ! c 3 1f191 1 ! c 2 59cb 2 e3 ! L 59cb ! c 2 1f190 b executables ! c 3 1f18c 0 ! c 2 1f18b a extensions ! c 2 1f18a 5 Other ! c 2 1f189 4 name ! c 2 1ef5e 5 Other ! c 2 1ef53 a categories ! c 0 1ef60 1 ! C ProjectDir 4 59e8 ! c 2 59e9 25 netscript2/src/perl/NetScript/Engine/ 11 81 ! c 2 59ea 0 0 ! c 2 1ef62 25 netscript2/src/perl/NetScript/Engine/ ! c 2 1ef5f b directories ! C DmBag 5 1ec00 10 ! c 2 1ec36 e1 b ! C DmDictionary 0 1ec02 3 ! C DmString 1 1ec14 36 b ! C DmSet 0 5a36 1 ! C DmString 1 5a64 5 Other ! L 5a64 ! c 1 1ec13 a categories ! c 1 1ec04 11 BasicStatement.pm ! c 1 1ec03 4 name ! C DmInteger 2 1ec16 1 ! c 1 1ec15 9 substMode ! c 2 1ec6b e8 b ! C DmDictionary 0 1ec37 3 ! C DmString 1 1ec49 36 b ! C DmSet 0 5a75 1 ! C DmString 1 5aa3 5 Other ! L 5aa3 ! c 1 1ec48 a categories ! c 1 1ec39 11 BlockStatement.pm ! c 1 1ec38 4 name ! C DmInteger 2 1ec4b 80000001 ! c 1 1ec4a 9 substMode ! c 2 1eca0 d7 b ! C DmDictionary 0 1ec6c 3 ! C DmString 1 1ec7e 36 b ! C DmSet 0 5ab4 1 ! C DmString 1 5ae2 5 Other ! L 5ae2 ! c 1 1ec7d a categories ! c 1 1ec6e 8 Class.pm ! c 1 1ec6d 4 name ! C DmInteger 2 1ec80 1 ! c 1 1ec7f 9 substMode ! c 2 1ecd5 e1 b ! C DmDictionary 0 1eca1 3 ! C DmString 1 1ecb3 39 b ! C DmSet 0 1d3dc 1 ! C DmString 1 1d556 5 Other ! L 1d556 ! c 1 1ecb2 a categories ! c 1 1eca3 f ClassWrapper.pm ! c 1 1eca2 4 name ! C DmInteger 2 1ecb5 1 ! c 1 1ecb4 9 substMode ! c 2 1ed0a e7 b ! C DmDictionary 0 1ecd6 3 ! C DmString 1 1ece8 36 b ! C DmSet 0 5af3 1 ! C DmString 1 5b21 5 Other ! L 5b21 ! c 1 1ece7 a categories ! c 1 1ecd8 10 CopyStatement.pm ! c 1 1ecd7 4 name ! C DmInteger 2 1ecea 80000001 ! c 1 1ece9 9 substMode ! c 2 1ed3f db b ! C DmDictionary 0 1ed0b 3 ! C DmString 1 1ed1d 36 b ! C DmSet 0 5b32 1 ! C DmString 1 5b60 5 Other ! L 5b60 ! c 1 1ed1c a categories ! c 1 1ed0d c DOMWalker.pm ! c 1 1ed0c 4 name ! C DmInteger 2 1ed1f 1 ! c 1 1ed1e 9 substMode ! c 2 1ed74 d7 b ! C DmDictionary 0 1ed40 3 ! C DmString 1 1ed52 36 b ! C DmSet 0 5b71 1 ! C DmString 1 5b9f 5 Other ! L 5b9f ! c 1 1ed51 a categories ! c 1 1ed42 8 Event.pm ! c 1 1ed41 4 name ! C DmInteger 2 1ed54 1 ! c 1 1ed53 9 substMode ! c 2 1eda9 e0 b ! C DmDictionary 0 1ed75 3 ! C DmString 1 1ed87 36 b ! C DmSet 0 5bb0 1 ! C DmString 1 5bde 5 Other ! L 5bde ! c 1 1ed86 a categories ! c 1 1ed77 10 EventListener.pm ! c 1 1ed76 4 name ! C DmInteger 2 1ed89 1 ! c 1 1ed88 9 substMode ! c 2 1edde dc b ! C DmDictionary 0 1edaa 3 ! C DmString 1 1edbc 36 b ! C DmSet 0 5bef 1 ! C DmString 1 5c1d 5 Other ! L 5c1d ! c 1 1edbb a categories ! c 1 1edac d EventRelay.pm ! c 1 1edab 4 name ! C DmInteger 2 1edbe 1 ! c 1 1edbd 9 substMode ! c 2 1ee13 da b ! C DmDictionary 0 1eddf 3 ! C DmString 1 1edf1 36 b ! C DmSet 0 5c2e 1 ! C DmString 1 5c5c 5 Other ! L 5c5c ! c 1 1edf0 a categories ! c 1 1ede1 b Function.pm ! c 1 1ede0 4 name ! C DmInteger 2 1edf3 1 ! c 1 1edf2 9 substMode ! c 2 1ee48 e5 b ! C DmDictionary 0 1ee14 3 ! C DmString 1 1ee26 39 b ! C DmSet 0 1df09 1 ! C DmString 1 1e083 5 Other ! L 1e083 ! c 1 1ee25 a categories ! c 1 1ee16 12 FunctionWrapper.pm ! c 1 1ee15 4 name ! C DmInteger 2 1ee28 1 ! c 1 1ee27 9 substMode ! c 2 1ee7d d8 b ! C DmDictionary 0 1ee49 3 ! C DmString 1 1ee5b 36 b ! C DmSet 0 5c6d 1 ! C DmString 1 5c9b 5 Other ! L 5c9b ! c 1 1ee5a a categories ! c 1 1ee4b 9 Member.pm ! c 1 1ee4a 4 name ! C DmInteger 2 1ee5d 1 ! c 1 1ee5c 9 substMode ! c 2 1eeb2 e3 b ! C DmDictionary 0 1ee7e 3 ! C DmString 1 1ee90 39 b ! C DmSet 0 1ea6f 1 ! C DmString 1 1ebe9 5 Other ! L 1ebe9 ! c 1 1ee8f a categories ! c 1 1ee80 10 MemberWrapper.pm ! c 1 1ee7f 4 name ! C DmInteger 2 1ee92 1 ! c 1 1ee91 9 substMode ! c 2 1eee7 d7 b ! C DmDictionary 0 1eeb3 3 ! C DmString 1 1eec5 36 b ! C DmSet 0 5cac 1 ! C DmString 1 5cda 5 Other ! L 5cda ! c 1 1eec4 a categories ! c 1 1eeb5 8 State.pm ! c 1 1eeb4 4 name ! C DmInteger 2 1eec7 1 ! c 1 1eec6 9 substMode ! c 2 1ef1c db b ! C DmDictionary 0 1eee8 3 ! C DmString 1 1eefa 36 b ! C DmSet 0 5ceb 1 ! C DmString 1 5d19 5 Other ! L 5d19 ! c 1 1eef9 a categories ! c 1 1eeea c Statement.pm ! c 1 1eee9 4 name ! C DmInteger 2 1eefc 1 ! c 1 1eefb 9 substMode ! c 2 1ef51 e5 b ! C DmDictionary 0 1ef1d 3 ! C DmString 1 1ef2f 36 b ! C DmSet 0 5d2a 1 ! C DmString 1 5d58 5 Other ! L 5d58 ! c 1 1ef2e a categories ! c 1 1ef1f 15 StatementEvaluator.pm ! c 1 1ef1e 4 name ! C DmInteger 2 1ef31 1 ! c 1 1ef30 9 substMode ! c 2 1ef52 5 files ! c 2 1ebfc 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 1ebfb 6 launch ! c 2 1ebf8 4 make ! c 2 1ebf7 4 make ! c 2 1ebfa 0 ! c 2 1ebf9 8 makeFile ! c 5 1ebfd 0 ! c 2 1ebff 7 modules ! c 2 1ebf6 6 Engine ! c 2 1ebf5 4 name --- 1,358 ---- b ! C DmDictionary 0 fc80 8 ! c 0 10015 9 ! C Category 1 6c44 ! c 0 10055 4 ! C DmString 2 1005c 2 e3 ! c 2 1005b a defaultExe ! C DmSet 3 1005e 1 ! c 2 6c53 2 e3 ! L 6c53 ! c 2 1005d b executables ! c 3 10059 3 ! c 2 6c5a 3 *.C ! L 6c5a ! c 2 6c5d 4 *.cc ! L 6c5d ! c 2 6c60 5 *.cpp ! L 6c60 ! c 2 10058 a extensions ! c 2 10057 a CPP_source ! c 2 10056 4 name ! c 2 10017 a CPP_source ! c 1 6c75 ! c 0 1009b 4 ! c 2 100a2 2 e3 ! c 2 100a1 a defaultExe ! c 3 100a4 1 ! c 2 6c82 2 e3 ! L 6c82 ! c 2 100a3 b executables ! c 3 1009f 1 ! c 2 6c89 3 *.c ! L 6c89 ! c 2 1009e a extensions ! c 2 1009d 8 C_source ! c 2 1009c 4 name ! c 2 10018 8 C_source ! c 1 6c9e ! c 0 100d5 4 ! c 2 100dc 2 e3 ! c 2 100db a defaultExe ! c 3 100de 1 ! c 2 6cab 2 e3 ! L 6cab ! c 2 100dd b executables ! c 3 100d9 1 ! c 2 6cb2 3 *.e ! L 6cb2 ! c 2 100d8 a extensions ! c 2 100d7 6 Eiffel ! c 2 100d6 4 name ! c 2 10019 6 Eiffel ! c 1 6cc7 ! c 0 1010f 4 ! c 2 10116 2 e3 ! c 2 10115 a defaultExe ! c 3 10118 1 ! c 2 6cd4 2 e3 ! L 6cd4 ! c 2 10117 b executables ! c 3 10113 4 ! c 2 6cdb 3 *.F ! L 6cdb ! c 2 6cde 3 *.f ! L 6cde ! c 2 6ce1 5 *.for ! L 6ce1 ! c 2 6ce4 5 *.fpp ! L 6ce4 ! c 2 10112 a extensions ! c 2 10111 7 Fortran ! c 2 10110 4 name ! c 2 1001a 7 Fortran ! c 1 6cf9 ! c 0 10155 4 ! c 2 1015c 2 e3 ! c 2 1015b a defaultExe ! c 3 1015e 1 ! c 2 6d06 2 e3 ! L 6d06 ! c 2 1015d b executables ! c 3 10159 2 ! c 2 6d0d 3 *.H ! L 6d0d ! c 2 6d10 3 *.h ! L 6d10 ! c 2 10158 a extensions ! c 2 10157 6 Header ! c 2 10156 4 name ! c 2 1001b 6 Header ! c 1 6d25 ! c 0 10193 4 ! c 2 1019a 9 surfboard ! c 2 10199 a defaultExe ! c 3 1019c 2 ! c 2 6d32 2 e3 ! L 6d32 ! c 2 6d35 9 surfboard ! L 6d35 ! c 2 1019b b executables ! c 3 10197 2 ! c 2 6d3c 5 *.htm ! L 6d3c ! c 2 6d3f 6 *.html ! L 6d3f ! c 2 10196 a extensions ! c 2 10195 4 Html ! c 2 10194 4 name ! c 2 1001c 4 Html ! c 1 6d54 ! c 0 101d5 4 ! c 2 101dc 2 e3 ! c 2 101db a defaultExe ! c 3 101de 1 ! c 2 6d61 2 e3 ! L 6d61 ! c 2 101dd b executables ! c 3 101d9 1 ! c 2 6d68 6 *.java ! L 6d68 ! c 2 101d8 a extensions ! c 2 101d7 4 Java ! c 2 101d6 4 name ! c 2 1001d 4 Java ! c 1 6d7d ! c 0 1020f 4 ! c 2 10216 2 e3 ! c 2 10215 a defaultExe ! c 3 10218 1 ! c 2 6d8a 2 e3 ! L 6d8a ! c 2 10217 b executables ! c 3 10213 1 ! c 2 6d91 5 *.tex ! L 6d91 ! c 2 10212 a extensions ! c 2 10211 5 Latex ! c 2 10210 4 name ! c 2 1001e 5 Latex ! c 1 6da6 ! c 0 10249 4 ! c 2 10250 2 e3 ! c 2 1024f a defaultExe ! c 3 10252 1 ! c 2 6db3 2 e3 ! L 6db3 ! c 2 10251 b executables ! c 3 1024d 0 ! c 2 1024c a extensions ! c 2 1024b 5 Other ! c 2 1024a 4 name ! c 2 1001f 5 Other ! c 2 10014 a categories ! c 0 10021 1 ! C ProjectDir 4 6dd0 ! c 2 6dd1 25 netscript2/src/perl/NetScript/Engine/ 11 81 ! c 2 6dd2 0 0 ! c 2 10023 25 netscript2/src/perl/NetScript/Engine/ ! c 2 10020 b directories ! C DmBag 5 fc8c 11 ! c 2 fcc2 da b ! C DmDictionary 0 fc8e 3 ! C DmString 1 fca0 36 b ! C DmSet 0 6e24 1 ! C DmString 1 6e52 5 Other ! L 6e52 ! c 1 fc9f a categories ! c 1 fc90 11 BasicStatement.pm ! c 1 fc8f 4 name ! C DmInteger 2 fca2 1 ! c 1 fca1 9 substMode ! c 2 fcf7 e1 b ! C DmDictionary 0 fcc3 3 ! C DmString 1 fcd5 36 b ! C DmSet 0 6e63 1 ! C DmString 1 6e91 5 Other ! L 6e91 ! c 1 fcd4 a categories ! c 1 fcc5 11 BlockStatement.pm ! c 1 fcc4 4 name ! C DmInteger 2 fcd7 80000001 ! c 1 fcd6 9 substMode ! c 2 fd2c d0 b ! C DmDictionary 0 fcf8 3 ! C DmString 1 fd0a 36 b ! C DmSet 0 6ea2 1 ! C DmString 1 6ed0 5 Other ! L 6ed0 ! c 1 fd09 a categories ! c 1 fcfa 8 Class.pm ! c 1 fcf9 4 name ! C DmInteger 2 fd0c 1 ! c 1 fd0b 9 substMode ! c 2 fd61 d7 b ! C DmDictionary 0 fd2d 3 ! C DmString 1 fd3f 36 b ! C DmSet 0 6ee1 1 ! C DmString 1 6f0f 5 Other ! L 6f0f ! c 1 fd3e a categories ! c 1 fd2f f ClassWrapper.pm ! c 1 fd2e 4 name ! C DmInteger 2 fd41 1 ! c 1 fd40 9 substMode ! c 2 fd96 e0 b ! C DmDictionary 0 fd62 3 ! C DmString 1 fd74 36 b ! C DmSet 0 6f20 1 ! C DmString 1 6f4e 5 Other ! L 6f4e ! c 1 fd73 a categories ! c 1 fd64 10 CopyStatement.pm ! c 1 fd63 4 name ! C DmInteger 2 fd76 80000001 ! c 1 fd75 9 substMode ! c 2 fdcb d4 b ! C DmDictionary 0 fd97 3 ! C DmString 1 fda9 36 b ! C DmSet 0 6f5f 1 ! C DmString 1 6f8d 5 Other ! L 6f8d ! c 1 fda8 a categories ! c 1 fd99 c DOMWalker.pm ! c 1 fd98 4 name ! C DmInteger 2 fdab 1 ! c 1 fdaa 9 substMode ! c 2 fe00 d0 b ! C DmDictionary 0 fdcc 3 ! C DmString 1 fdde 36 b ! C DmSet 0 6f9e 1 ! C DmString 1 6fcc 5 Other ! L 6fcc ! c 1 fddd a categories ! c 1 fdce 8 Event.pm ! c 1 fdcd 4 name ! C DmInteger 2 fde0 1 ! c 1 fddf 9 substMode ! c 2 fe35 d9 b ! C DmDictionary 0 fe01 3 ! C DmString 1 fe13 36 b ! C DmSet 0 6fdd 1 ! C DmString 1 700b 5 Other ! L 700b ! c 1 fe12 a categories ! c 1 fe03 10 EventListener.pm ! c 1 fe02 4 name ! C DmInteger 2 fe15 1 ! c 1 fe14 9 substMode ! c 2 fe6a d5 b ! C DmDictionary 0 fe36 3 ! C DmString 1 fe48 36 b ! C DmSet 0 701c 1 ! C DmString 1 704a 5 Other ! L 704a ! c 1 fe47 a categories ! c 1 fe38 d EventRelay.pm ! c 1 fe37 4 name ! C DmInteger 2 fe4a 1 ! c 1 fe49 9 substMode ! c 2 fe9f d3 b ! C DmDictionary 0 fe6b 3 ! C DmString 1 fe7d 36 b ! C DmSet 0 705b 1 ! C DmString 1 7089 5 Other ! L 7089 ! c 1 fe7c a categories ! c 1 fe6d b Function.pm ! c 1 fe6c 4 name ! C DmInteger 2 fe7f 1 ! c 1 fe7e 9 substMode ! c 2 fed4 db b ! C DmDictionary 0 fea0 3 ! C DmString 1 feb2 36 b ! C DmSet 0 709a 1 ! C DmString 1 70c8 5 Other ! L 70c8 ! c 1 feb1 a categories ! c 1 fea2 12 FunctionWrapper.pm ! c 1 fea1 4 name ! C DmInteger 2 feb4 1 ! c 1 feb3 9 substMode ! c 2 ff09 d4 b ! C DmDictionary 0 fed5 3 ! C DmString 1 fee7 36 b ! C DmSet 0 fafb 1 ! C DmString 1 fc75 5 Other ! L fc75 ! c 1 fee6 a categories ! c 1 fed7 c LibLoader.pm ! c 1 fed6 4 name ! C DmInteger 2 fee9 1 ! c 1 fee8 9 substMode ! c 2 ff3e d1 b ! C DmDictionary 0 ff0a 3 ! C DmString 1 ff1c 36 b ! C DmSet 0 70d9 1 ! C DmString 1 7107 5 Other ! L 7107 ! c 1 ff1b a categories ! c 1 ff0c 9 Member.pm ! c 1 ff0b 4 name ! C DmInteger 2 ff1e 1 ! c 1 ff1d 9 substMode ! c 2 ff73 d9 b ! C DmDictionary 0 ff3f 3 ! C DmString 1 ff51 36 b ! C DmSet 0 7118 1 ! C DmString 1 7146 5 Other ! L 7146 ! c 1 ff50 a categories ! c 1 ff41 10 MemberWrapper.pm ! c 1 ff40 4 name ! C DmInteger 2 ff53 1 ! c 1 ff52 9 substMode ! c 2 ffa8 d0 b ! C DmDictionary 0 ff74 3 ! C DmString 1 ff86 36 b ! C DmSet 0 7157 1 ! C DmString 1 7185 5 Other ! L 7185 ! c 1 ff85 a categories ! c 1 ff76 8 State.pm ! c 1 ff75 4 name ! C DmInteger 2 ff88 1 ! c 1 ff87 9 substMode ! c 2 ffdd d4 b ! C DmDictionary 0 ffa9 3 ! C DmString 1 ffbb 36 b ! C DmSet 0 7196 1 ! C DmString 1 71c4 5 Other ! L 71c4 ! c 1 ffba a categories ! c 1 ffab c Statement.pm ! c 1 ffaa 4 name ! C DmInteger 2 ffbd 1 ! c 1 ffbc 9 substMode ! c 2 10012 de b ! C DmDictionary 0 ffde 3 ! C DmString 1 fff0 36 b ! C DmSet 0 71d5 1 ! C DmString 1 7203 5 Other ! L 7203 ! c 1 ffef a categories ! c 1 ffe0 15 StatementEvaluator.pm ! c 1 ffdf 4 name ! C DmInteger 2 fff2 1 ! c 1 fff1 9 substMode ! c 2 10013 5 files ! c 2 fc88 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 fc87 6 launch ! c 2 fc84 4 make ! c 2 fc83 4 make ! c 2 fc86 0 ! c 2 fc85 8 makeFile ! c 5 fc89 0 ! c 2 fc8b 7 modules ! c 2 fc82 6 Engine ! c 2 fc81 4 name |
From: Jan T. <de...@us...> - 2002-06-09 12:51:14
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript In directory usw-pr-cvs1:/tmp/cvs-serv25787 Modified Files: Interpreter.pm Log Message: * added the line number to the errror message, so errors can be tracked more easily Index: Interpreter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Interpreter.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Interpreter.pm 2 Jun 2002 19:31:23 -0000 1.8 --- Interpreter.pm 9 Jun 2002 12:51:11 -0000 1.9 *************** *** 149,153 **** # register the SYS-object ! $this -> getState() -> setObjectValue( "SYS", $systemWrapper ); return $this; # return Object --- 149,153 ---- # register the SYS-object ! $this -> getState() -> createObjectValue( "SYS", $systemWrapper ); return $this; # return Object *************** *** 219,222 **** --- 219,231 ---- #/** + # Returns the DOMWalker walking over the base script. + # @public + #*/ + sub getDOMWalker { + my ( $this ) = @_; + $this -> { m_DOMWalker }; + } + + #/** # Invokes the Interpreter. This will get the filename-parameter # from the CGI-Object, read configuration files, mappings and *************** *** 254,261 **** # start input file parsing my $domparser = XML::DOM2::DOMParser -> new(); ! my $dom = $domparser -> parseString( { string => $scriptContent } ); # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); # Walk over the DOM --- 263,271 ---- # start input file parsing my $domparser = XML::DOM2::DOMParser -> new(); ! my $dom = $domparser -> parseString( $scriptContent ); # Create a DOMWalker my $domwalker = NetScript::Engine::DOMWalker -> new( $this ); + $this -> { m_DOMWalker } = $domwalker; # Walk over the DOM *************** *** 264,270 **** my $domwriter = XML::DOM2::DOMWriter -> new(); my $domstyle = XML::DOM2::XMLDOMWriterStyle -> new(); ! my $string = $domwriter -> writeDOMToString( { ! document => $resultDOM, ! style => $domstyle } ); my $cookiesRef = $this -> { m_Cookies }; --- 274,278 ---- my $domwriter = XML::DOM2::DOMWriter -> new(); my $domstyle = XML::DOM2::XMLDOMWriterStyle -> new(); ! my $string = $domwriter -> writeDOMToString( $resultDOM, $domstyle ); my $cookiesRef = $this -> { m_Cookies }; *************** *** 373,377 **** sub onFatalEvent { my ($this, $event ) = @_; ! die $event -> eventMessage(); } --- 381,387 ---- sub onFatalEvent { my ($this, $event ) = @_; ! my $line = $this -> getDOMWalker() -> currentSource() -> getLine(); ! die $event -> eventMessage(). ! "\n\nError occured in or around line $line in ".$this -> getScriptURL()."\n"; } |
From: Jan T. <de...@us...> - 2002-06-09 12:50:07
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine In directory usw-pr-cvs1:/tmp/cvs-serv25473 Modified Files: BasicStatement.pm DOMWalker.pm State.pm StatementEvaluator.pm Log Message: * added checks for variable existence * added distinction between creating a variable and altering it Index: BasicStatement.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/BasicStatement.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BasicStatement.pm 2 Jun 2002 19:31:23 -0000 1.6 --- BasicStatement.pm 9 Jun 2002 12:50:04 -0000 1.7 *************** *** 72,96 **** # clone the node into the new document ! my $newNode = $document -> importNode( { importedNode => $node, deep => 0 } ); # Check for the Node Type. ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # attributes in elements will be checked for variables ! my $attributes = $newNode -> attributes(); ! my $length = $attributes -> length() -1; for ( 0..$length ) { ! my $attribute = $attributes -> item( { index => $_ } ); ! my $value = $attribute -> value(); ! my $name = $attribute -> nodeName(); $value = $interpreter -> getStatementEvaluator() -> evaluateStatement( $value ); ! $attribute -> value( { value => $value } ); } } ! elsif ( $newNode -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! my $text = $newNode -> data(); $text = $interpreter -> getStatementEvaluator() -> evaluateStatement( $text ); ! $newNode -> data( { data => $text } ); } --- 72,96 ---- # clone the node into the new document ! my $newNode = $document -> importNode( $node, 0 ); # Check for the Node Type. ! if ( $newNode -> getNodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # attributes in elements will be checked for variables ! my $attributes = $newNode -> getAttributes(); ! my $length = $attributes -> getLength() -1; for ( 0..$length ) { ! my $attribute = $attributes -> item( $_ ); ! my $value = $attribute -> getValue(); ! my $name = $attribute -> getNodeName(); $value = $interpreter -> getStatementEvaluator() -> evaluateStatement( $value ); ! $attribute -> setValue( $value ); } } ! elsif ( $newNode -> getNodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! my $text = $newNode -> getData(); $text = $interpreter -> getStatementEvaluator() -> evaluateStatement( $text ); ! $newNode -> setData( $text ); } Index: DOMWalker.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DOMWalker.pm 2 Jun 2002 19:31:23 -0000 1.5 --- DOMWalker.pm 9 Jun 2002 12:50:04 -0000 1.6 *************** *** 213,222 **** # append clone to document ! $this -> currentTarget() -> appendChild( { ! newChild => $clone ! }); # set current target node to new node ! if ( $clone -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE && $isRefNode ) { $this -> setCurrentTarget( $clone ) ; --- 213,220 ---- # append clone to document ! $this -> currentTarget() -> appendChild( $clone ); # set current target node to new node ! if ( $clone -> getNodeType() == $XML::DOM2::Node::ELEMENT_NODE && $isRefNode ) { $this -> setCurrentTarget( $clone ) ; *************** *** 248,259 **** my $di = XML::DOM2::DOMImplementation -> new(); # create target document ! my $document = $di -> createDocument( { ! namespaceURI => "dummy", ! qualifiedName => "dummy:dummy" ! } ); # remove document element ! $document -> removeChild( { ! oldChild => $document -> documentElement() ! } ); $this -> setCurrentTarget( $document ); --- 246,253 ---- my $di = XML::DOM2::DOMImplementation -> new(); # create target document ! my $document = $di -> createDocument( ! "dummy", "dummy:dummy" ); # remove document element ! $document -> removeChild( $document -> getDocumentElement() ); $this -> setCurrentTarget( $document ); *************** *** 305,309 **** my $nextSource = undef; if ( $source ) { ! $nextSource = $source -> firstChild(); unless ( $nextSource ) { $this -> stepSourceNext(); --- 299,303 ---- my $nextSource = undef; if ( $source ) { ! $nextSource = $source -> getFirstChild(); unless ( $nextSource ) { $this -> stepSourceNext(); *************** *** 323,327 **** my ($this) = @_; my $source = $this -> currentSource(); ! $this -> setCurrentSource( $source -> parentNode() ); } --- 317,321 ---- my ($this) = @_; my $source = $this -> currentSource(); ! $this -> setCurrentSource( $source -> getParentNode() ); } *************** *** 333,337 **** my ( $this ) = @_; my $target = $this -> currentTarget(); ! $this -> setCurrentTarget( $target -> parentNode() ); } --- 327,331 ---- my ( $this ) = @_; my $target = $this -> currentTarget(); ! $this -> setCurrentTarget( $target -> getParentNode() ); } *************** *** 348,356 **** if ( $source ) { ! my $nextSource = $source -> nextSibling(); unless ( $nextSource ) { ! my $parent = $source -> parentNode(); while ( defined( $parent ) && !defined( $nextSource ) ) { ! $nextSource = $parent -> nextSibling(); unless( $nextSource ) { # parent is finished --- 342,350 ---- if ( $source ) { ! my $nextSource = $source -> getNextSibling(); unless ( $nextSource ) { ! my $parent = $source -> getParentNode(); while ( defined( $parent ) && !defined( $nextSource ) ) { ! $nextSource = $parent -> getNextSibling(); unless( $nextSource ) { # parent is finished *************** *** 359,363 **** return; # stop processing } ! $parent = $parent -> parentNode(); } else { --- 353,357 ---- return; # stop processing } ! $parent = $parent -> getParentNode(); } else { *************** *** 400,404 **** sub createEvent { my ( $this, $node ) = @_; ! my $nodeType = $node -> nodeType(); my $eventType; if ( $nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { --- 394,398 ---- sub createEvent { my ( $this, $node ) = @_; ! my $nodeType = $node -> getNodeType(); my $eventType; if ( $nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { *************** *** 431,440 **** sub createEndEvent { my ( $this, $node ) = @_; ! my $nodeType = $node -> nodeType(); my $eventType; ! if ($node -> nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { $eventType = $NetScript::Engine::DOMWalker::ELEMENT_END_EVENT; } ! elsif ( $node -> nodeType == $XML::DOM2::Node::DOCUMENT_NODE ) { $eventType = $NetScript::Engine::DOMWalker::DOCUMENT_END_EVENT; } --- 425,434 ---- sub createEndEvent { my ( $this, $node ) = @_; ! my $nodeType = $node -> getNodeType(); my $eventType; ! if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE ) { $eventType = $NetScript::Engine::DOMWalker::ELEMENT_END_EVENT; } ! elsif ( $nodeType == $XML::DOM2::Node::DOCUMENT_NODE ) { $eventType = $NetScript::Engine::DOMWalker::DOCUMENT_END_EVENT; } Index: State.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/State.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** State.pm 29 May 2002 20:26:17 -0000 1.5 --- State.pm 9 Jun 2002 12:50:04 -0000 1.6 *************** *** 40,46 **** --- 40,52 ---- my %arrays = (); my %objects = (); + my %variablesFlags = (); + my %arraysFlags = (); + my %objectsFlags = (); $this -> { m_Variables } = \%variables; $this -> { m_Arrays } = \%arrays; $this -> { m_Objects } = \%objects; + $this -> { m_VariablesFlags } = \%variablesFlags; + $this -> { m_ObjectsFlags } = \%objectsFlags; + $this -> { m_ArraysFlags } = \%arraysFlags; # Set parent if parent is defined. *************** *** 154,157 **** --- 160,164 ---- # @param a string containing the variable name. # @param a scalar containing the variable value + # @return nonzero on successful setting, zero if variable did not exist #*/ sub setVariableValue { *************** *** 164,171 **** # Yes another one has it. $variableHolder -> setVariableValue( $variable, $value ); } ! else { # no one has it, so we define it ourselves. $this -> { m_Variables } -> { $variable } = $value ; } } --- 171,201 ---- # Yes another one has it. $variableHolder -> setVariableValue( $variable, $value ); + return 1; } ! elsif ( defined($variableHolder) ) { $this -> { m_Variables } -> { $variable } = $value ; } + return 0; + } + + #/** + # Creates the given variable with the given value. + # @param a string containing the variable name. + # @param a scalar containing the variable value + # @return nonzero on successful creation, zero if + # variable already exists. + #*/ + sub createVariableValue { + my ( $this, $name, $value ) = @_; + # check if a parent state already knows this + # variable. + my $variableHolder = $this -> variableExists( $name ); + + unless( defined( $variableHolder ) ) { + # no one has it, so we define it ourselves. + $this -> { m_Variables } -> { $name } = $value ; + return 1; + } + return 0; } *************** *** 196,200 **** # @param a scalar containing the array index # @param a scalar containing the value ! # #*/ sub setArrayValue { --- 226,231 ---- # @param a scalar containing the array index # @param a scalar containing the value ! # @return nonzero on successfully setting the value, ! # zero if the array didnt exist. #*/ sub setArrayValue { *************** *** 208,221 **** # Yes another one has it. $variableHolder -> setArrayValue( $array, $index, $value ); } elsif (defined( $variableHolder ) ) { #array exists in this state $this -> { m_Arrays } -> { $array } -> [$index] = $value; } ! else { # array does not exist at all. my @newArray = (); $newArray[$index] = $value; $this -> { m_Arrays } -> { $array } = \@newArray; } } #/** --- 239,279 ---- # Yes another one has it. $variableHolder -> setArrayValue( $array, $index, $value ); + return 1; } elsif (defined( $variableHolder ) ) { #array exists in this state $this -> { m_Arrays } -> { $array } -> [$index] = $value; + return 1; } ! else { ! return 0; ! } ! } ! ! #/** ! # Creates the given array entry. ! # @param a string containing the array name. ! # @param a scalar containing the array index ! # @param a scalar containing the value ! # @return nonzero on successfully creating the array, ! # zero if the array already exists. ! #*/ ! sub createArrayValue { ! my ($this, $array, $index, $value) = @_; ! ! # check if a parent state already knows this ! # array ! my $variableHolder = $this -> arrayExists( $array ); ! ! unless ( defined( $variableHolder ) ) { # array does not exist at all. my @newArray = (); $newArray[$index] = $value; $this -> { m_Arrays } -> { $array } = \@newArray; + return 1; } + + return 0; + } + #/** *************** *** 242,246 **** # array exists. # @param the name of the array. ! # @return the largest valid index within the array. #*/ sub getLargestArrayIndex { --- 300,305 ---- # array exists. # @param the name of the array. ! # @return the largest valid index within the array or undef, if the ! # array doesn't exist. #*/ sub getLargestArrayIndex { *************** *** 259,262 **** --- 318,323 ---- # @param a string containing the object name. # @param a scalar containing the value + # @return nonzero if the value could be set, zero if the object + # didn't exist. # #*/ *************** *** 271,278 **** # Yes another one has it. $variableHolder -> setObjectValue( $object, $value ); } ! else { # object is in this state or not defined at all $this -> { m_Objects } -> { $object } = $value; } } --- 332,362 ---- # Yes another one has it. $variableHolder -> setObjectValue( $object, $value ); + return 1; } ! return 0; ! } ! ! #/** ! # Sets an object for the given name.The name ! # first looked up in parent state, if it does exist there ! # then it is set there, else it is set in current state. ! # @param a string containing the object name. ! # @param a scalar containing the value ! # @return nonzero if the object could be created, ! # zero if the object already exists ! #*/ ! sub createObjectValue { ! my ( $this, $object, $value ) = @_; ! ! # check if a parent state already knows this ! # object ! my $variableHolder = $this -> objectExists( $object ); ! ! unless ( defined( $variableHolder ) ) { ! # object is not defined at all $this -> { m_Objects } -> { $object } = $value; + return 1; } + return 0; } Index: StatementEvaluator.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/StatementEvaluator.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StatementEvaluator.pm 2 Jun 2002 19:31:23 -0000 1.7 --- StatementEvaluator.pm 9 Jun 2002 12:50:04 -0000 1.8 *************** *** 58,62 **** # so some time can be saved by this. # ! if ($aString =~ /[^ \n]/) { # Reworked evaluation of variables. --- 58,62 ---- # so some time can be saved by this. # ! if ($aString =~ /[^\s\n]/) { # Reworked evaluation of variables. *************** *** 67,72 **** # Quite hefty regexp. Does find the innermost pair parentheses which is not quoted. - # while ( $aString =~ /^(.*[^\\])\(((\\\(|\\\)|[^\(\)])*[^\\\)])?\)((\\\(|[^\(])*)$/ ) { - while ( $aString =~ /^(.*[^\\])\(((\\\(|\\\)|[^\(\)])*[^\\\)]?)?\)((\\\(|[^\(])*)$/ ) { # Search for the innermost pair of parentheses. --- 67,70 ---- *************** *** 101,111 **** } } ! elsif ($action eq 'eval') { # an eval-statement $result = eval($param); } ! elsif ($action eq '@') { #last index of an array $result = $this -> getLargestArrayIndex( $param ); } ! elsif ($action eq '#') { #length of string $result = $this -> getStringLength( $param ); } --- 99,109 ---- } } ! elsif ($action eq 'eval' || $action eq '?' ) { # an eval-statement $result = eval($param); } ! elsif ($action eq 'alen' || $action eq '@') { #last index of an array $result = $this -> getLargestArrayIndex( $param ); } ! elsif ($action eq 'slen' || $action eq '#') { #length of string $result = $this -> getStringLength( $param ); } *************** *** 141,145 **** my $result = $this -> interpreter() -> getState() -> getVariableValue( $variable ); ! # TODO: check for undef $result; } --- 139,147 ---- my $result = $this -> interpreter() -> getState() -> getVariableValue( $variable ); ! unless( defined( $result ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "A variable named \"$variable\" doesn't exist!" ); ! } $result; } *************** *** 155,159 **** my $result = $this -> interpreter() -> getState() -> getArrayValue( $array, $index ); ! # TODO: check for undef $result; } --- 157,166 ---- my $result = $this -> interpreter() -> getState() -> getArrayValue( $array, $index ); ! ! unless( defined( $result ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "An array named \"$array\" doesn't exist!" ); ! } $result; } *************** *** 168,172 **** my $result = $this -> interpreter() -> getState() -> getLargestArrayIndex( $array ); ! # TODO: check for undef $result; } --- 175,184 ---- my $result = $this -> interpreter() -> getState() -> getLargestArrayIndex( $array ); ! ! unless( defined( $result ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "An array named \"$array\" doesn't exist!" ); ! } $result; } *************** *** 178,189 **** #*/ sub getMember { ! my ( $this, $object, $member ) = @_; my $object = $this -> interpreter() -> getState() -> ! getObjectValue( $object ); ! # $object is an instance of Class ! return undef unless $object ; my $memberObject = $object -> member( $member ); ! return undef unless $memberObject; $memberObject -> value(); } --- 190,210 ---- #*/ sub getMember { ! my ( $this, $objectName, $member ) = @_; my $object = $this -> interpreter() -> getState() -> ! getObjectValue( $objectName ); ! # check if object exists ! unless( defined( $object ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "An object named \"$objectName\" doesn't exist!" ); ! } my $memberObject = $object -> member( $member ); ! # check if member exists ! unless( defined( $memberObject ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "The object \"$objectName\" has no member named \"$member\"!" ); ! } $memberObject -> value(); } *************** *** 198,207 **** if ( $name =~ /(^.*):(.*$)/ ) { # its an array ! $this -> interpreter() -> getState() -> ! setArrayValue( $1, $2, $value ); } else { ! $this -> interpreter() -> getState() -> ! setVariableValue( $name, $value ); } } --- 219,262 ---- if ( $name =~ /(^.*):(.*$)/ ) { # its an array ! unless( $this -> interpreter() -> getState() -> ! createArrayValue( $1, $2, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "An array named \"$1\" already exists!" ); ! } } else { ! unless( $this -> interpreter() -> getState() -> ! createVariableValue( $name, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "A variable named \"$name\" already exists!" ); ! } ! } ! } ! ! #/** ! # Sets the given variable (array) ! # @param string describing the variable name ! # @param string holding the variable value ! #*/ ! sub setVariable { ! my ( $this, $name, $value ) = @_; ! ! if ( $name =~ /(^.*):(.*$)/ ) { # its an array ! unless( $this -> interpreter() -> getState() -> ! setArrayValue( $1, $2, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "An array named \"$1\" doesn't exist!" ); ! } ! } ! else { ! unless( $this -> interpreter() -> getState() -> ! setVariableValue( $name, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "A variable named \"$name\" doesn't exist!" ); ! } } } |
From: Jan T. <de...@us...> - 2002-06-09 12:49:10
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries In directory usw-pr-cvs1:/tmp/cvs-serv25269 Modified Files: ControlStructuresLibrary.pm DebugLibrary.pm FormsLibrary.pm VariablesLibrary.pm Log Message: * re-implemented for-loop * changed semantics of the var-tag Index: ControlStructuresLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/ControlStructuresLibrary.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ControlStructuresLibrary.pm 2 Jun 2002 19:31:23 -0000 1.3 --- ControlStructuresLibrary.pm 9 Jun 2002 12:49:07 -0000 1.4 *************** *** 69,73 **** --- 69,75 ---- my $this = $class -> SUPER::new(); my %forLoops = (); + my %forLoopsVarNames = (); $this -> { m_forLoops } = \%forLoops; + $this -> { m_forLoopsVarNames } = \%forLoopsVarNames; $this; } *************** *** 108,125 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "if") { $this -> ifStart( $domWalker, $node ); 0; # consume event } ! elsif( $node -> localName() eq "else" ) { $this -> elseStart( $domWalker, $node ); 0; # consume event } ! elsif ($node -> localName() eq "while" ) { $this -> whileStart( $domWalker, $node ); 0; # consume event } ! elsif ($node -> localName() eq "for" ) { $this -> forStart( $domWalker, $node ); 0; # consume event --- 110,127 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "if") { $this -> ifStart( $domWalker, $node ); 0; # consume event } ! elsif( $node -> getLocalName() eq "else" ) { $this -> elseStart( $domWalker, $node ); 0; # consume event } ! elsif ($node -> getLocalName() eq "while" ) { $this -> whileStart( $domWalker, $node ); 0; # consume event } ! elsif ($node -> getLocalName() eq "for" ) { $this -> forStart( $domWalker, $node ); 0; # consume event *************** *** 142,148 **** sub checkNodeTest { my ($this, $node) = @_; ! my $test = $node -> getAttribute( { ! name => "test" ! }); # replace variables my $se = $this -> interpreter() -> getStatementEvaluator(); --- 144,148 ---- sub checkNodeTest { my ($this, $node) = @_; ! my $test = $node -> getAttribute("test"); # replace variables my $se = $this -> interpreter() -> getStatementEvaluator(); *************** *** 182,196 **** my ( $this, $domWalker, $node ) = @_; # find the belonging IF-Node ! my $ifNode = $node -> previousSibling(); # skip text nodes ! while ( $ifNode && $ifNode -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! $ifNode = $ifNode -> previousSibling(); } if ( $ifNode && ! $ifNode -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI && ! $ifNode -> localName() eq "if") { # check condition --- 182,196 ---- my ( $this, $domWalker, $node ) = @_; # find the belonging IF-Node ! my $ifNode = $node -> getPreviousSibling(); # skip text nodes ! while ( $ifNode && $ifNode -> getNodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! $ifNode = $ifNode -> getPreviousSibling(); } if ( $ifNode && ! $ifNode -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI && ! $ifNode -> getLocalName() eq "if") { # check condition *************** *** 208,212 **** } else { ! # FIXME: DO not use DIE die "Else without IF" ; } --- 208,212 ---- } else { ! # FIXME: DO NOT use DIE die "Else without IF" ; } *************** *** 260,306 **** ! my $from = $node -> getAttribute({ ! name => "from" ! }); ! my $to = $node -> getAttribute({ ! name => "to" ! }); ! my $var = $node -> getAttribute({ ! name => "var" ! }); ! $from = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $from ); ! $to = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $to ); ! $var = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $var ); my $value = $this -> { m_forLoops } -> { $node }; ! ! if ( !defined( $value ) ) { # variable is yet unknown so we initialize it $value = $from; } else { ! if ( $from <= $to ) { # step up if from is <= to ! $value ++; ! } ! else { # step down otherwise ! $value --; ! } } # create new state $this -> interpreter() -> newState(); ! # set variable ! $this -> interpreter() -> getState() -> setVariableValue( ! $var, $value ); $this -> { m_forLoops } -> { $node } = $value; ! ! if ( ( $from <= $to && $value > $to ) || ! ( $from > $to && $value < $to ) ) { # check if loop should be executed # no it should not, skip node $domWalker -> stepSourceNext(); } --- 260,338 ---- ! my $from = $node -> getAttribute( "from" ); ! my $to = $node -> getAttribute( "to" ); ! my $var = $node -> getAttribute( "var" ); ! my $name = $node -> getAttribute( "name" ); ! my $step = $node -> getAttribute( "step" ); ! my $varOrig = $var; ! my $nameOrig = $name; ! my $se = $this -> interpreter() -> getStatementEvaluator(); ! $from = $se -> evaluateStatement( $from ); ! $to = $se -> evaluateStatement( $to ); ! $var = $se -> evaluateStatement( $var ); ! $step = $se -> evaluateStatement( $step ); ! $name = $se -> evaluateStatement( $name ); ! ! unless ( $step =~ /^-?[0-9]+$/ ) { # if step is not given or not numeric it is 1 ! $step = 1; ! } ! ! my $theVar; ! my $createVar = 0; + if ( $var eq "" && $name ne "" ) { + $theVar = $name; + $createVar = 1; + $this -> { m_forLoopsVarNames } -> { $node } = $nameOrig; + } + elsif( $var ne "" && $name eq "" ) { + $theVar = $var; + $this -> { m_forLoopsVarNames } -> { $node } = $varOrig; + } + else { + $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( + $NetScript::Interpreter::FATAL_EVENT, + "None or both of the \"name\" or \"var\" attributes in for-loop are specified.\n". + "You must specify one of these." ); + } + my $value = $this -> { m_forLoops } -> { $node }; ! unless ( defined( $value ) ) { # variable is yet unknown so we initialize it $value = $from; } else { ! $value += $step; } # create new state $this -> interpreter() -> newState(); ! if ( $createVar ) { ! # create variable ! unless( $this -> interpreter() -> getState() -> createVariableValue( ! $theVar, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "A variable named $theVar already exists. Use var=\"$theVar\" instead of name=\"$theVar\"." ); ! } ! } ! else { ! # set variable ! unless( $this -> interpreter() -> getState() -> setVariableValue( ! $theVar, $value ) ) { ! $this -> interpreter() -> getEventRelay() -> createAndRaiseEvent( ! $NetScript::Interpreter::FATAL_EVENT, ! "A variable named $theVar doesn't exist. Use name=\"$theVar\" instead of var=\"$theVar\"." ); ! } ! } $this -> { m_forLoops } -> { $node } = $value; ! if ( ( $from < $to && ( $value > $to || $value < $from ) ) || ! ( $from > $to && ( $value < $to || $value > $from ) ) || ! ( $from == $to && $value != $from ) ) { # check if loop should be executed # no it should not, skip node + delete $this -> { m_forLoops } -> { $node }; + $this -> interpreter() -> dropState(); $domWalker -> stepSourceNext(); } *************** *** 319,353 **** sub forEnd { my ($this, $domWalker, $node) = @_; ! my $from = $node -> getAttribute({ ! name => "from" ! }); ! my $to = $node -> getAttribute({ ! name => "to" ! }); ! ! my $var = $node -> getAttribute({ ! name => "var" ! }); ! ! $from = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $from ); ! $to = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $to ); ! $var = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $var ); ! ! my $value = $this -> interpreter() -> getState() -> ! getVariableValue( $var ); ! $this -> interpreter() -> dropState(); ! if ( ( $from <= $to && $value <= $to ) || ! ( $from > $to && $value >= $to ) ) { # check if loop should be executed ! # in case that the user has changed the value ! $this -> { m_forLoops } -> { $node } = $value; $domWalker -> sourceAgain(); } - else { - delete $this -> { m_forLoops } -> { $node }; - } } --- 351,367 ---- sub forEnd { my ($this, $domWalker, $node) = @_; ! if ( defined( $this -> { m_forLoops } -> { $node } ) ) { ! # if the variable value was changed in the loop we have to ! # reflect this in our internal setting. ! my $varName = $this -> { m_forLoopsVarNames } -> { $node }; ! $varName = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $varName ); ! my $varValue = $this -> interpreter() -> getState() -> ! getVariableValue( $varName ); ! $this -> { m_forLoops } -> { $node } = $varValue; ! $this -> interpreter() -> dropState(); $domWalker -> sourceAgain(); } } *************** *** 360,379 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "if") { # kill state $this -> interpreter() -> dropState(); 0; # consume event } ! elsif ($node -> localName() eq "else") { # kill state $this -> interpreter() -> dropState(); 0; # consume event } ! elsif ($node -> localName() eq "while" ) { $this -> whileEnd( $domWalker, $node ); 0; # consume event } ! elsif ($node -> localName() eq "for" ) { $this -> forEnd( $domWalker, $node ); 0; # consume event --- 374,393 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "if") { # kill state $this -> interpreter() -> dropState(); 0; # consume event } ! elsif ($node -> getLocalName() eq "else") { # kill state $this -> interpreter() -> dropState(); 0; # consume event } ! elsif ($node -> getLocalName() eq "while" ) { $this -> whileEnd( $domWalker, $node ); 0; # consume event } ! elsif ($node -> getLocalName() eq "for" ) { $this -> forEnd( $domWalker, $node ); 0; # consume event *************** *** 397,402 **** my $node = $domWalker -> currentSource(); ! if ( $node -> target() eq "netscript" ) { ! my $data = $node -> data(); if ( $data =~ /\s*use\s*([^\s]*)/) { # check for "use LIBNAME" $this -> interpreter -> getLibLoader() -> loadLibrary( $1 ); --- 411,416 ---- my $node = $domWalker -> currentSource(); ! if ( $node -> getTarget() eq "netscript" ) { ! my $data = $node -> getData(); if ( $data =~ /\s*use\s*([^\s]*)/) { # check for "use LIBNAME" $this -> interpreter -> getLibLoader() -> loadLibrary( $1 ); Index: DebugLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/DebugLibrary.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DebugLibrary.pm 2 Jun 2002 19:31:23 -0000 1.4 --- DebugLibrary.pm 9 Jun 2002 12:49:07 -0000 1.5 *************** *** 75,81 **** my $domWalker = $event -> eventUnknown(); my $document = $domWalker -> sourceDocument(); ! my $comment = $document -> createComment( { ! data => "\nDebug Messages:\n-----------------\n".$this -> debugMessage() ! } ); $domWalker -> insertIntoTarget( $comment ); } --- 75,80 ---- my $domWalker = $event -> eventUnknown(); my $document = $domWalker -> sourceDocument(); ! my $comment = $document -> createComment( ! "\nDebug Messages:\n-----------------\n".$this -> debugMessage() ); $domWalker -> insertIntoTarget( $comment ); } Index: FormsLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/FormsLibrary.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FormsLibrary.pm 2 Jun 2002 19:31:23 -0000 1.2 --- FormsLibrary.pm 9 Jun 2002 12:49:07 -0000 1.3 *************** *** 93,98 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "cookie") { $this -> setCookie( $node, $domWalker ); 0; # consume event --- 93,98 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "cookie") { $this -> setCookie( $node, $domWalker ); 0; # consume event *************** *** 115,120 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "cookie") { 0; # consume event } --- 115,120 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "cookie") { 0; # consume event } *************** *** 169,185 **** sub setCookie { my ( $this, $node, $walker ) = @_; ! my $name = $node -> getAttribute( { ! name => "name" } ); ! my $value = $node -> getAttribute( { ! name => "val" } ); ! my $expires = $node -> getAttribute( { ! name => "expires" } ); ! $name = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $name ); ! $value = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $value ); ! $expires = $this -> interpreter() -> getStatementEvaluator() -> ! evaluateStatement( $expires ); $this -> interpreter() -> setCookie( $name, $value, $expires ); --- 169,180 ---- sub setCookie { my ( $this, $node, $walker ) = @_; ! my $name = $node -> getAttribute( "name" ); ! my $value = $node -> getAttribute( "val" ); ! my $expires = $node -> getAttribute( "expires"); ! my $se = $this -> interpreter() -> getStatementEvaluator(); ! $name = $se -> evaluateStatement( $name ); ! $value = $se -> evaluateStatement( $value ); ! $expires = $se -> evaluateStatement( $expires ); $this -> interpreter() -> setCookie( $name, $value, $expires ); Index: VariablesLibrary.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Libraries/VariablesLibrary.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VariablesLibrary.pm 29 May 2002 20:27:39 -0000 1.1 --- VariablesLibrary.pm 9 Jun 2002 12:49:07 -0000 1.2 *************** *** 68,73 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "var") { $this -> varStart( $domWalker, $node ); 0; # consume event --- 68,73 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "var") { $this -> varStart( $domWalker, $node ); 0; # consume event *************** *** 90,95 **** my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> namespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> localName() eq "var") { 0; # consume event } --- 90,95 ---- my $domWalker = $event -> eventUnknown(); my $node = $domWalker -> currentSource(); ! if ( $node -> getNamespaceURI() eq $NetScript::Interpreter::NAMESPACE_URI ) { ! if ($node -> getLocalName() eq "var") { 0; # consume event } *************** *** 112,127 **** sub varStart { my ( $this, $domWalker, $node ) = @_; ! my $name = $node -> getAttribute( { ! name => "var" ! }); # replace variables my $se = $this -> interpreter() -> getStatementEvaluator(); $name = $se -> evaluateStatement( $name ); ! my $value = $node -> getAttribute( { ! name => "val" ! }); $value = $se -> evaluateStatement( $value ); ! $this -> interpreter() -> getStatementEvaluator() -> ! createVariable( $name, $value ); $domWalker -> stepSourceIn(); } --- 112,130 ---- sub varStart { my ( $this, $domWalker, $node ) = @_; ! my $var = $node -> getAttribute( "var" ); ! my $name = $node -> getAttribute( "name" ); # replace variables my $se = $this -> interpreter() -> getStatementEvaluator(); $name = $se -> evaluateStatement( $name ); ! $var = $se -> evaluateStatement( $var ); ! my $value = $node -> getAttribute( "val"); $value = $se -> evaluateStatement( $value ); ! ! if ( $name ne "" && $var eq "" ) { ! $se -> createVariable( $name, $value ); ! } ! elsif( $name eq "" && $var ne "" ) { ! $se -> setVariable( $var, $value ); ! } $domWalker -> stepSourceIn(); } |
From: Jan T. <de...@us...> - 2002-06-09 12:48:16
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv25095 Modified Files: DOMParser.pm Node.pm Log Message: * minor fixes * domparser sets line-property of node, which specifies in which line the node was in the textual representation of the document Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DOMParser.pm 8 Jun 2002 12:14:29 -0000 1.6 --- DOMParser.pm 9 Jun 2002 12:48:12 -0000 1.7 *************** *** 138,141 **** --- 138,142 ---- $namespaceURI, defined($prefix) ? $prefix.":".$element : $element ); + $elementNode -> setLine( $expat -> current_line() ); # get currently innermost open Element. *************** *** 185,188 **** --- 186,190 ---- # first, create a text node my $textNode = $this -> { m_document } -> createTextNode( $string ); + $textNode -> setLine( $expat -> current_line() ); # append it to the context element *************** *** 200,204 **** my $procNode = $this -> { m_document } -> createProcessingInstruction( $target, $data ); ! # append it to the context element $this -> { m_contextElement } -> appendChild( $procNode ); --- 202,206 ---- my $procNode = $this -> { m_document } -> createProcessingInstruction( $target, $data ); ! $procNode -> setLine( $expat -> current_line() ); # append it to the context element $this -> { m_contextElement } -> appendChild( $procNode ); *************** *** 215,218 **** --- 217,221 ---- my $commentNode = $this -> { m_document } -> createComment( $data ); + $commentNode -> setLine( $expat -> current_line() ); # append it to the context element Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Node.pm 8 Jun 2002 12:14:29 -0000 1.19 --- Node.pm 9 Jun 2002 12:48:12 -0000 1.20 *************** *** 70,73 **** --- 70,74 ---- $this -> { m_firstChild } = undef; $this -> { m_lastChild } = undef; + $this -> { m_line } = undef; return $this; # return Object } *************** *** 754,756 **** --- 755,779 ---- } + #/** + # Sets the line number where this node occured in the textual representation + # of the document. + # @param a line number + # @not-standard + # @public + #*/ + sub setLine { + my ( $this, $line ) = @_; + $this -> { m_Line } = $line; + } + + #/** + # Returns the line number where this node occured in the textual representation + # of the document. + # @not-standard + # @public + #*/ + sub getLine { + my ( $this ) = @_; + $this -> { m_Line }; + } 1; # make require happy |
From: Jan T. <de...@us...> - 2002-06-08 12:27:06
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv6042 Modified Files: wipeout.project Log Message: Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/wipeout.project,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wipeout.project 17 Mar 2002 19:26:04 -0000 1.8 --- wipeout.project 8 Jun 2002 12:27:03 -0000 1.9 *************** *** 1,446 **** b ! C DmDictionary 0 a6e1 8 ! c 0 ac1e 9 ! C Category 1 6234 ! c 0 ac5e 4 ! C DmString 2 ac65 2 e3 ! c 2 ac64 a defaultExe ! C DmSet 3 ac67 1 ! c 2 6243 2 e3 ! L 6243 ! c 2 ac66 b executables ! c 3 ac62 3 ! c 2 624a 3 *.C ! L 624a ! c 2 624d 4 *.cc ! L 624d ! c 2 6250 5 *.cpp ! L 6250 ! c 2 ac61 a extensions ! c 2 ac60 a CPP_source ! c 2 ac5f 4 name ! c 2 ac20 a CPP_source ! c 1 6265 ! c 0 aca4 4 ! c 2 acab 2 e3 ! c 2 acaa a defaultExe ! c 3 acad 1 ! c 2 6272 2 e3 ! L 6272 ! c 2 acac b executables ! c 3 aca8 1 ! c 2 6279 3 *.c ! L 6279 ! c 2 aca7 a extensions ! c 2 aca6 8 C_source ! c 2 aca5 4 name ! c 2 ac21 8 C_source ! c 1 628e ! c 0 acde 4 ! c 2 ace5 2 e3 ! c 2 ace4 a defaultExe ! c 3 ace7 1 ! c 2 629b 2 e3 ! L 629b ! c 2 ace6 b executables ! c 3 ace2 1 ! c 2 62a2 3 *.e ! L 62a2 ! c 2 ace1 a extensions ! c 2 ace0 6 Eiffel ! c 2 acdf 4 name ! c 2 ac22 6 Eiffel ! c 1 62b7 ! c 0 ad18 4 ! c 2 ad1f 2 e3 ! c 2 ad1e a defaultExe ! c 3 ad21 1 ! c 2 62c4 2 e3 ! L 62c4 ! c 2 ad20 b executables ! c 3 ad1c 4 ! c 2 62cb 3 *.F ! L 62cb ! c 2 62ce 3 *.f ! L 62ce ! c 2 62d1 5 *.for ! L 62d1 ! c 2 62d4 5 *.fpp ! L 62d4 ! c 2 ad1b a extensions ! c 2 ad1a 7 Fortran ! c 2 ad19 4 name ! c 2 ac23 7 Fortran ! c 1 62e9 ! c 0 ad5e 4 ! c 2 ad65 2 e3 ! c 2 ad64 a defaultExe ! c 3 ad67 1 ! c 2 62f6 2 e3 ! L 62f6 ! c 2 ad66 b executables ! c 3 ad62 2 ! c 2 62fd 3 *.H ! L 62fd ! c 2 6300 3 *.h ! L 6300 ! c 2 ad61 a extensions ! c 2 ad60 6 Header ! c 2 ad5f 4 name ! c 2 ac24 6 Header ! c 1 6315 ! c 0 ad9c 4 ! c 2 ada3 9 surfboard ! c 2 ada2 a defaultExe ! c 3 ada5 2 ! c 2 6322 2 e3 ! L 6322 ! c 2 6325 9 surfboard ! L 6325 ! c 2 ada4 b executables ! c 3 ada0 2 ! c 2 632c 5 *.htm ! L 632c ! c 2 632f 6 *.html ! L 632f ! c 2 ad9f a extensions ! c 2 ad9e 4 Html ! c 2 ad9d 4 name ! c 2 ac25 4 Html ! c 1 6344 ! c 0 adde 4 ! c 2 ade5 2 e3 ! c 2 ade4 a defaultExe ! c 3 ade7 1 ! c 2 6351 2 e3 ! L 6351 ! c 2 ade6 b executables ! c 3 ade2 1 ! c 2 6358 6 *.java ! L 6358 ! c 2 ade1 a extensions ! c 2 ade0 4 Java ! c 2 addf 4 name ! c 2 ac26 4 Java ! c 1 636d ! c 0 ae18 4 ! c 2 ae1f 2 e3 ! c 2 ae1e a defaultExe ! c 3 ae21 1 ! c 2 637a 2 e3 ! L 637a ! c 2 ae20 b executables ! c 3 ae1c 1 ! c 2 6381 5 *.tex ! L 6381 ! c 2 ae1b a extensions ! c 2 ae1a 5 Latex ! c 2 ae19 4 name ! c 2 ac27 5 Latex ! c 1 6396 ! c 0 ae52 4 ! c 2 ae59 2 e3 ! c 2 ae58 a defaultExe ! c 3 ae5b 1 ! c 2 63a3 2 e3 ! L 63a3 ! c 2 ae5a b executables ! c 3 ae56 0 ! c 2 ae55 a extensions ! c 2 ae54 5 Other ! c 2 ae53 4 name ! c 2 ac28 5 Other ! c 2 ac1d a categories ! c 0 ac2a 1 ! C ProjectDir 4 63c0 ! c 2 63c1 1d netscript2/src/perl/XML/DOM2/ 11 81 ! c 2 63c2 0 0 ! c 2 ac2c 1d netscript2/src/perl/XML/DOM2/ ! c 2 ac29 b directories ! C DmBag 5 a6ed 19 ! c 2 a723 cf b ! C DmDictionary 0 a6ef 3 ! C DmString 1 a701 36 b ! C DmSet 0 6424 1 ! C DmString 1 6452 5 Other ! L 6452 ! c 1 a700 a categories ! c 1 a6f1 7 Attr.pm ! c 1 a6f0 4 name ! C DmInteger 2 a703 1 ! c 1 a702 9 substMode ! c 2 a758 d7 b ! C DmDictionary 0 a724 3 ! C DmString 1 a736 36 b ! C DmSet 0 6463 1 ! C DmString 1 6491 5 Other ! L 6491 ! c 1 a735 a categories ! c 1 a726 f CDATASection.pm ! c 1 a725 4 name ! C DmInteger 2 a738 1 ! c 1 a737 9 substMode ! c 2 a78d d1 b ! C DmDictionary 0 a759 3 ! C DmString 1 a76b 36 b ! C DmSet 0 64a2 1 ! C DmString 1 64d0 5 Other ! L 64d0 ! c 1 a76a a categories ! c 1 a75b 9 CHANGELOG ! c 1 a75a 4 name ! C DmInteger 2 a76d 1 ! c 1 a76c 9 substMode ! c 2 a7c2 d9 b ! C DmDictionary 0 a78e 3 ! C DmString 1 a7a0 36 b ! C DmSet 0 64e1 1 ! C DmString 1 650f 5 Other ! L 650f ! c 1 a79f a categories ! c 1 a790 10 CharacterData.pm ! c 1 a78f 4 name ! C DmInteger 2 a7a2 1 ! c 1 a7a1 9 substMode ! c 2 a7f7 d2 b ! C DmDictionary 0 a7c3 3 ! C DmString 1 a7d5 36 b ! C DmSet 0 6520 1 ! C DmString 1 654e 5 Other ! L 654e ! c 1 a7d4 a categories ! c 1 a7c5 a Comment.pm ! c 1 a7c4 4 name ! C DmInteger 2 a7d7 1 ! c 1 a7d6 9 substMode ! c 2 a82c d7 b ! C DmDictionary 0 a7f8 3 ! C DmString 1 a80a 36 b ! C DmSet 0 655f 1 ! C DmString 1 658d 5 Other ! L 658d ! c 1 a809 a categories ! c 1 a7fa f DOMException.pm ! c 1 a7f9 4 name ! C DmInteger 2 a80c 1 ! c 1 a80b 9 substMode ! c 2 a861 dd b ! C DmDictionary 0 a82d 3 ! C DmString 1 a83f 36 b ! C DmSet 0 659e 1 ! C DmString 1 65cc 5 Other ! L 65cc ! c 1 a83e a categories ! c 1 a82f 14 DOMImplementation.pm ! c 1 a82e 4 name ! C DmInteger 2 a841 1 ! c 1 a840 9 substMode ! c 2 a896 d4 b ! C DmDictionary 0 a862 3 ! C DmString 1 a874 36 b ! C DmSet 0 65dd 1 ! C DmString 1 660b 5 Other ! L 660b ! c 1 a873 a categories ! c 1 a864 c DOMParser.pm ! c 1 a863 4 name ! C DmInteger 2 a876 1 ! c 1 a875 9 substMode ! c 2 a8cb da b ! C DmDictionary 0 a897 3 ! C DmString 1 a8a9 36 b ! C DmSet 0 661c 1 ! C DmString 1 664a 5 Other ! L 664a ! c 1 a8a8 a categories ! c 1 a899 11 DOMParserStyle.pm ! c 1 a898 4 name ! C DmInteger 2 a8ab 1 ! c 1 a8aa 9 substMode ! c 2 a900 d4 b ! C DmDictionary 0 a8cc 3 ! C DmString 1 a8de 36 b ! C DmSet 0 665b 1 ! C DmString 1 6689 5 Other ! L 6689 ! c 1 a8dd a categories ! c 1 a8ce c DOMWriter.pm ! c 1 a8cd 4 name ! C DmInteger 2 a8e0 1 ! c 1 a8df 9 substMode ! c 2 a935 da b ! C DmDictionary 0 a901 3 ! C DmString 1 a913 36 b ! C DmSet 0 669a 1 ! C DmString 1 66c8 5 Other ! L 66c8 ! c 1 a912 a categories ! c 1 a903 11 DOMWriterStyle.pm ! c 1 a902 4 name ! C DmInteger 2 a915 1 ! c 1 a914 9 substMode ! c 2 a96a d3 b ! C DmDictionary 0 a936 3 ! C DmString 1 a948 36 b ! C DmSet 0 66d9 1 ! C DmString 1 6707 5 Other ! L 6707 ! c 1 a947 a categories ! c 1 a938 b Document.pm ! c 1 a937 4 name ! C DmInteger 2 a94a 1 ! c 1 a949 9 substMode ! c 2 a99f dc b ! C DmDictionary 0 a96b 3 ! C DmString 1 a97d 36 b ! C DmSet 0 6718 1 ! C DmString 1 6746 5 Other ! L 6746 ! c 1 a97c a categories ! c 1 a96d 13 DocumentFragment.pm ! c 1 a96c 4 name ! C DmInteger 2 a97f 1 ! c 1 a97e 9 substMode ! c 2 a9d4 d7 b ! C DmDictionary 0 a9a0 3 ! C DmString 1 a9b2 36 b ! C DmSet 0 6757 1 ! C DmString 1 6785 5 Other ! L 6785 ! c 1 a9b1 a categories ! c 1 a9a2 f DocumentType.pm ! c 1 a9a1 4 name ! C DmInteger 2 a9b4 1 ! c 1 a9b3 9 substMode ! c 2 aa09 d2 b ! C DmDictionary 0 a9d5 3 ! C DmString 1 a9e7 36 b ! C DmSet 0 6796 1 ! C DmString 1 67c4 5 Other ! L 67c4 ! c 1 a9e6 a categories ! c 1 a9d7 a Element.pm ! c 1 a9d6 4 name ! C DmInteger 2 a9e9 1 ! c 1 a9e8 9 substMode ! c 2 aa3e d1 b ! C DmDictionary 0 aa0a 3 ! C DmString 1 aa1c 36 b ! C DmSet 0 67d5 1 ! C DmString 1 6803 5 Other ! L 6803 ! c 1 aa1b a categories ! c 1 aa0c 9 Entity.pm ! c 1 aa0b 4 name ! C DmInteger 2 aa1e 1 ! c 1 aa1d 9 substMode ! c 2 aa73 db b ! C DmDictionary 0 aa3f 3 ! C DmString 1 aa51 36 b ! C DmSet 0 6814 1 ! C DmString 1 6842 5 Other ! L 6842 ! c 1 aa50 a categories ! c 1 aa41 12 EntityReference.pm ! c 1 aa40 4 name ! C DmInteger 2 aa53 1 ! c 1 aa52 9 substMode ! c 2 aaa8 d7 b ! C DmDictionary 0 aa74 3 ! C DmString 1 aa86 36 b ! C DmSet 0 6853 1 ! C DmString 1 6881 5 Other ! L 6881 ! c 1 aa85 a categories ! c 1 aa76 f NamedNodeMap.pm ! c 1 aa75 4 name ! C DmInteger 2 aa88 1 ! c 1 aa87 9 substMode ! c 2 aadd cf b ! C DmDictionary 0 aaa9 3 ! C DmString 1 aabb 36 b ! C DmSet 0 6892 1 ! C DmString 1 68c0 5 Other ! L 68c0 ! c 1 aaba a categories ! c 1 aaab 7 Node.pm ! c 1 aaaa 4 name ! C DmInteger 2 aabd 1 ! c 1 aabc 9 substMode ! c 2 ab12 d3 b ! C DmDictionary 0 aade 3 ! C DmString 1 aaf0 36 b ! C DmSet 0 68d1 1 ! C DmString 1 68ff 5 Other ! L 68ff ! c 1 aaef a categories ! c 1 aae0 b NodeList.pm ! c 1 aadf 4 name ! C DmInteger 2 aaf2 1 ! c 1 aaf1 9 substMode ! c 2 ab47 d3 b ! C DmDictionary 0 ab13 3 ! C DmString 1 ab25 36 b ! C DmSet 0 6910 1 ! C DmString 1 693e 5 Other ! L 693e ! c 1 ab24 a categories ! c 1 ab15 b Notation.pm ! c 1 ab14 4 name ! C DmInteger 2 ab27 1 ! c 1 ab26 9 substMode ! c 2 ab7c e1 b ! C DmDictionary 0 ab48 3 ! C DmString 1 ab5a 36 b ! C DmSet 0 694f 1 ! C DmString 1 697d 5 Other ! L 697d ! c 1 ab59 a categories ! c 1 ab4a 18 ProcessingInstruction.pm ! c 1 ab49 4 name ! C DmInteger 2 ab5c 1 ! c 1 ab5b 9 substMode ! c 2 abb1 cf b ! C DmDictionary 0 ab7d 3 ! C DmString 1 ab8f 36 b ! C DmSet 0 698e 1 ! C DmString 1 69bc 5 Other ! L 69bc ! c 1 ab8e a categories ! c 1 ab7f 7 Text.pm ! c 1 ab7e 4 name ! C DmInteger 2 ab91 1 ! c 1 ab90 9 substMode ! c 2 abe6 dd b ! C DmDictionary 0 abb2 3 ! C DmString 1 abc4 36 b ! C DmSet 0 a55c 1 ! C DmString 1 a6d6 5 Other ! L a6d6 ! c 1 abc3 a categories ! c 1 abb4 14 XMLDOMWriterStyle.pm ! c 1 abb3 4 name ! C DmInteger 2 abc6 1 ! c 1 abc5 9 substMode ! c 2 ac1b d1 b ! C DmDictionary 0 abe7 3 ! C DmString 1 abf9 36 b ! C DmSet 0 69cd 1 ! C DmString 1 69fb 5 Other ! L 69fb ! c 1 abf8 a categories ! c 1 abe9 9 notes.txt ! c 1 abe8 4 name ! C DmInteger 2 abfb 1 ! c 1 abfa 9 substMode ! c 2 ac1c 5 files ! c 2 a6e9 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 a6e8 6 launch ! c 2 a6e5 4 make ! c 2 a6e4 4 make ! c 2 a6e7 0 ! c 2 a6e6 8 makeFile ! c 5 a6ea 0 ! c 2 a6ec 7 modules ! c 2 a6e3 4 DOM2 ! c 2 a6e2 4 name --- 1,446 ---- b ! C DmDictionary 0 2f442 8 ! c 0 2f97f 9 ! C Category 1 9c82 ! c 0 2f9bf 4 ! C DmString 2 2f9c6 2 e3 ! c 2 2f9c5 a defaultExe ! C DmSet 3 2f9c8 1 ! c 2 9c91 2 e3 ! L 9c91 ! c 2 2f9c7 b executables ! c 3 2f9c3 3 ! c 2 9c98 3 *.C ! L 9c98 ! c 2 9c9b 4 *.cc ! L 9c9b ! c 2 9c9e 5 *.cpp ! L 9c9e ! c 2 2f9c2 a extensions ! c 2 2f9c1 a CPP_source ! c 2 2f9c0 4 name ! c 2 2f981 a CPP_source ! c 1 9cb3 ! c 0 2fa05 4 ! c 2 2fa0c 2 e3 ! c 2 2fa0b a defaultExe ! c 3 2fa0e 1 ! c 2 9cc0 2 e3 ! L 9cc0 ! c 2 2fa0d b executables ! c 3 2fa09 1 ! c 2 9cc7 3 *.c ! L 9cc7 ! c 2 2fa08 a extensions ! c 2 2fa07 8 C_source ! c 2 2fa06 4 name ! c 2 2f982 8 C_source ! c 1 9cdc ! c 0 2fa3f 4 ! c 2 2fa46 2 e3 ! c 2 2fa45 a defaultExe ! c 3 2fa48 1 ! c 2 9ce9 2 e3 ! L 9ce9 ! c 2 2fa47 b executables ! c 3 2fa43 1 ! c 2 9cf0 3 *.e ! L 9cf0 ! c 2 2fa42 a extensions ! c 2 2fa41 6 Eiffel ! c 2 2fa40 4 name ! c 2 2f983 6 Eiffel ! c 1 9d05 ! c 0 2fa79 4 ! c 2 2fa80 2 e3 ! c 2 2fa7f a defaultExe ! c 3 2fa82 1 ! c 2 9d12 2 e3 ! L 9d12 ! c 2 2fa81 b executables ! c 3 2fa7d 4 ! c 2 9d19 3 *.F ! L 9d19 ! c 2 9d1c 3 *.f ! L 9d1c ! c 2 9d1f 5 *.for ! L 9d1f ! c 2 9d22 5 *.fpp ! L 9d22 ! c 2 2fa7c a extensions ! c 2 2fa7b 7 Fortran ! c 2 2fa7a 4 name ! c 2 2f984 7 Fortran ! c 1 9d37 ! c 0 2fabf 4 ! c 2 2fac6 2 e3 ! c 2 2fac5 a defaultExe ! c 3 2fac8 1 ! c 2 9d44 2 e3 ! L 9d44 ! c 2 2fac7 b executables ! c 3 2fac3 2 ! c 2 9d4b 3 *.H ! L 9d4b ! c 2 9d4e 3 *.h ! L 9d4e ! c 2 2fac2 a extensions ! c 2 2fac1 6 Header ! c 2 2fac0 4 name ! c 2 2f985 6 Header ! c 1 9d63 ! c 0 2fafd 4 ! c 2 2fb04 9 surfboard ! c 2 2fb03 a defaultExe ! c 3 2fb06 2 ! c 2 9d70 2 e3 ! L 9d70 ! c 2 9d73 9 surfboard ! L 9d73 ! c 2 2fb05 b executables ! c 3 2fb01 2 ! c 2 9d7a 5 *.htm ! L 9d7a ! c 2 9d7d 6 *.html ! L 9d7d ! c 2 2fb00 a extensions ! c 2 2faff 4 Html ! c 2 2fafe 4 name ! c 2 2f986 4 Html ! c 1 9d92 ! c 0 2fb3f 4 ! c 2 2fb46 2 e3 ! c 2 2fb45 a defaultExe ! c 3 2fb48 1 ! c 2 9d9f 2 e3 ! L 9d9f ! c 2 2fb47 b executables ! c 3 2fb43 1 ! c 2 9da6 6 *.java ! L 9da6 ! c 2 2fb42 a extensions ! c 2 2fb41 4 Java ! c 2 2fb40 4 name ! c 2 2f987 4 Java ! c 1 9dbb ! c 0 2fb79 4 ! c 2 2fb80 2 e3 ! c 2 2fb7f a defaultExe ! c 3 2fb82 1 ! c 2 9dc8 2 e3 ! L 9dc8 ! c 2 2fb81 b executables ! c 3 2fb7d 1 ! c 2 9dcf 5 *.tex ! L 9dcf ! c 2 2fb7c a extensions ! c 2 2fb7b 5 Latex ! c 2 2fb7a 4 name ! c 2 2f988 5 Latex ! c 1 9de4 ! c 0 2fbb3 4 ! c 2 2fbba 2 e3 ! c 2 2fbb9 a defaultExe ! c 3 2fbbc 1 ! c 2 9df1 2 e3 ! L 9df1 ! c 2 2fbbb b executables ! c 3 2fbb7 0 ! c 2 2fbb6 a extensions ! c 2 2fbb5 5 Other ! c 2 2fbb4 4 name ! c 2 2f989 5 Other ! c 2 2f97e a categories ! c 0 2f98b 1 ! C ProjectDir 4 9e0e ! c 2 9e0f 1d netscript2/src/perl/XML/DOM2/ 11 81 ! c 2 9e10 0 0 ! c 2 2f98d 1d netscript2/src/perl/XML/DOM2/ ! c 2 2f98a b directories ! C DmBag 5 2f44e 19 ! c 2 2f484 d6 b ! C DmDictionary 0 2f450 3 ! C DmString 1 2f462 36 b ! C DmSet 0 9e74 1 ! C DmString 1 9ea2 5 Other ! L 9ea2 ! c 1 2f461 a categories ! c 1 2f452 7 Attr.pm ! c 1 2f451 4 name ! C DmInteger 2 2f464 1 ! c 1 2f463 9 substMode ! c 2 2f4b9 de b ! C DmDictionary 0 2f485 3 ! C DmString 1 2f497 36 b ! C DmSet 0 9eb3 1 ! C DmString 1 9ee1 5 Other ! L 9ee1 ! c 1 2f496 a categories ! c 1 2f487 f CDATASection.pm ! c 1 2f486 4 name ! C DmInteger 2 2f499 1 ! c 1 2f498 9 substMode ! c 2 2f4ee df b ! C DmDictionary 0 2f4ba 3 ! C DmString 1 2f4cc 36 b ! C DmSet 0 9ef2 1 ! C DmString 1 9f20 5 Other ! L 9f20 ! c 1 2f4cb a categories ! c 1 2f4bc 9 CHANGELOG ! c 1 2f4bb 4 name ! C DmInteger 2 2f4ce 80000001 ! c 1 2f4cd 9 substMode ! c 2 2f523 e0 b ! C DmDictionary 0 2f4ef 3 ! C DmString 1 2f501 36 b ! C DmSet 0 9f31 1 ! C DmString 1 9f5f 5 Other ! L 9f5f ! c 1 2f500 a categories ! c 1 2f4f1 10 CharacterData.pm ! c 1 2f4f0 4 name ! C DmInteger 2 2f503 1 ! c 1 2f502 9 substMode ! c 2 2f558 d9 b ! C DmDictionary 0 2f524 3 ! C DmString 1 2f536 36 b ! C DmSet 0 9f70 1 ! C DmString 1 9f9e 5 Other ! L 9f9e ! c 1 2f535 a categories ! c 1 2f526 a Comment.pm ! c 1 2f525 4 name ! C DmInteger 2 2f538 1 ! c 1 2f537 9 substMode ! c 2 2f58d de b ! C DmDictionary 0 2f559 3 ! C DmString 1 2f56b 36 b ! C DmSet 0 9faf 1 ! C DmString 1 9fdd 5 Other ! L 9fdd ! c 1 2f56a a categories ! c 1 2f55b f DOMException.pm ! c 1 2f55a 4 name ! C DmInteger 2 2f56d 1 ! c 1 2f56c 9 substMode ! c 2 2f5c2 e4 b ! C DmDictionary 0 2f58e 3 ! C DmString 1 2f5a0 36 b ! C DmSet 0 9fee 1 ! C DmString 1 a01c 5 Other ! L a01c ! c 1 2f59f a categories ! c 1 2f590 14 DOMImplementation.pm ! c 1 2f58f 4 name ! C DmInteger 2 2f5a2 1 ! c 1 2f5a1 9 substMode ! c 2 2f5f7 db b ! C DmDictionary 0 2f5c3 3 ! C DmString 1 2f5d5 36 b ! C DmSet 0 a02d 1 ! C DmString 1 a05b 5 Other ! L a05b ! c 1 2f5d4 a categories ! c 1 2f5c5 c DOMParser.pm ! c 1 2f5c4 4 name ! C DmInteger 2 2f5d7 1 ! c 1 2f5d6 9 substMode ! c 2 2f62c e1 b ! C DmDictionary 0 2f5f8 3 ! C DmString 1 2f60a 36 b ! C DmSet 0 a06c 1 ! C DmString 1 a09a 5 Other ! L a09a ! c 1 2f609 a categories ! c 1 2f5fa 11 DOMParserStyle.pm ! c 1 2f5f9 4 name ! C DmInteger 2 2f60c 1 ! c 1 2f60b 9 substMode ! c 2 2f661 db b ! C DmDictionary 0 2f62d 3 ! C DmString 1 2f63f 36 b ! C DmSet 0 a0ab 1 ! C DmString 1 a0d9 5 Other ! L a0d9 ! c 1 2f63e a categories ! c 1 2f62f c DOMWriter.pm ! c 1 2f62e 4 name ! C DmInteger 2 2f641 1 ! c 1 2f640 9 substMode ! c 2 2f696 e1 b ! C DmDictionary 0 2f662 3 ! C DmString 1 2f674 36 b ! C DmSet 0 a0ea 1 ! C DmString 1 a118 5 Other ! L a118 ! c 1 2f673 a categories ! c 1 2f664 11 DOMWriterStyle.pm ! c 1 2f663 4 name ! C DmInteger 2 2f676 1 ! c 1 2f675 9 substMode ! c 2 2f6cb da b ! C DmDictionary 0 2f697 3 ! C DmString 1 2f6a9 36 b ! C DmSet 0 a129 1 ! C DmString 1 a157 5 Other ! L a157 ! c 1 2f6a8 a categories ! c 1 2f699 b Document.pm ! c 1 2f698 4 name ! C DmInteger 2 2f6ab 1 ! c 1 2f6aa 9 substMode ! c 2 2f700 e3 b ! C DmDictionary 0 2f6cc 3 ! C DmString 1 2f6de 36 b ! C DmSet 0 a168 1 ! C DmString 1 a196 5 Other ! L a196 ! c 1 2f6dd a categories ! c 1 2f6ce 13 DocumentFragment.pm ! c 1 2f6cd 4 name ! C DmInteger 2 2f6e0 1 ! c 1 2f6df 9 substMode ! c 2 2f735 de b ! C DmDictionary 0 2f701 3 ! C DmString 1 2f713 36 b ! C DmSet 0 a1a7 1 ! C DmString 1 a1d5 5 Other ! L a1d5 ! c 1 2f712 a categories ! c 1 2f703 f DocumentType.pm ! c 1 2f702 4 name ! C DmInteger 2 2f715 1 ! c 1 2f714 9 substMode ! c 2 2f76a d9 b ! C DmDictionary 0 2f736 3 ! C DmString 1 2f748 36 b ! C DmSet 0 a1e6 1 ! C DmString 1 a214 5 Other ! L a214 ! c 1 2f747 a categories ! c 1 2f738 a Element.pm ! c 1 2f737 4 name ! C DmInteger 2 2f74a 1 ! c 1 2f749 9 substMode ! c 2 2f79f d8 b ! C DmDictionary 0 2f76b 3 ! C DmString 1 2f77d 36 b ! C DmSet 0 a225 1 ! C DmString 1 a253 5 Other ! L a253 ! c 1 2f77c a categories ! c 1 2f76d 9 Entity.pm ! c 1 2f76c 4 name ! C DmInteger 2 2f77f 1 ! c 1 2f77e 9 substMode ! c 2 2f7d4 e2 b ! C DmDictionary 0 2f7a0 3 ! C DmString 1 2f7b2 36 b ! C DmSet 0 a264 1 ! C DmString 1 a292 5 Other ! L a292 ! c 1 2f7b1 a categories ! c 1 2f7a2 12 EntityReference.pm ! c 1 2f7a1 4 name ! C DmInteger 2 2f7b4 1 ! c 1 2f7b3 9 substMode ! c 2 2f809 de b ! C DmDictionary 0 2f7d5 3 ! C DmString 1 2f7e7 36 b ! C DmSet 0 a2a3 1 ! C DmString 1 a2d1 5 Other ! L a2d1 ! c 1 2f7e6 a categories ! c 1 2f7d7 f NamedNodeMap.pm ! c 1 2f7d6 4 name ! C DmInteger 2 2f7e9 1 ! c 1 2f7e8 9 substMode ! c 2 2f83e d6 b ! C DmDictionary 0 2f80a 3 ! C DmString 1 2f81c 36 b ! C DmSet 0 a2e2 1 ! C DmString 1 a310 5 Other ! L a310 ! c 1 2f81b a categories ! c 1 2f80c 7 Node.pm ! c 1 2f80b 4 name ! C DmInteger 2 2f81e 1 ! c 1 2f81d 9 substMode ! c 2 2f873 da b ! C DmDictionary 0 2f83f 3 ! C DmString 1 2f851 36 b ! C DmSet 0 a321 1 ! C DmString 1 a34f 5 Other ! L a34f ! c 1 2f850 a categories ! c 1 2f841 b NodeList.pm ! c 1 2f840 4 name ! C DmInteger 2 2f853 1 ! c 1 2f852 9 substMode ! c 2 2f8a8 da b ! C DmDictionary 0 2f874 3 ! C DmString 1 2f886 36 b ! C DmSet 0 a360 1 ! C DmString 1 a38e 5 Other ! L a38e ! c 1 2f885 a categories ! c 1 2f876 b Notation.pm ! c 1 2f875 4 name ! C DmInteger 2 2f888 1 ! c 1 2f887 9 substMode ! c 2 2f8dd e8 b ! C DmDictionary 0 2f8a9 3 ! C DmString 1 2f8bb 36 b ! C DmSet 0 a39f 1 ! C DmString 1 a3cd 5 Other ! L a3cd ! c 1 2f8ba a categories ! c 1 2f8ab 18 ProcessingInstruction.pm ! c 1 2f8aa 4 name ! C DmInteger 2 2f8bd 1 ! c 1 2f8bc 9 substMode ! c 2 2f912 d6 b ! C DmDictionary 0 2f8de 3 ! C DmString 1 2f8f0 36 b ! C DmSet 0 a3de 1 ! C DmString 1 a40c 5 Other ! L a40c ! c 1 2f8ef a categories ! c 1 2f8e0 7 Text.pm ! c 1 2f8df 4 name ! C DmInteger 2 2f8f2 1 ! c 1 2f8f1 9 substMode ! c 2 2f947 e4 b ! C DmDictionary 0 2f913 3 ! C DmString 1 2f925 36 b ! C DmSet 0 a41d 1 ! C DmString 1 a44b 5 Other ! L a44b ! c 1 2f924 a categories ! c 1 2f915 14 XMLDOMWriterStyle.pm ! c 1 2f914 4 name ! C DmInteger 2 2f927 1 ! c 1 2f926 9 substMode ! c 2 2f97c d8 b ! C DmDictionary 0 2f948 3 ! C DmString 1 2f95a 36 b ! C DmSet 0 a45c 1 ! C DmString 1 a48a 5 Other ! L a48a ! c 1 2f959 a categories ! c 1 2f94a 9 notes.txt ! c 1 2f949 4 name ! C DmInteger 2 2f95c 1 ! c 1 2f95b 9 substMode ! c 2 2f97d 5 files ! c 2 2f44a 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 2f449 6 launch ! c 2 2f446 4 make ! c 2 2f445 4 make ! c 2 2f448 0 ! c 2 2f447 8 makeFile ! c 5 2f44b 0 ! c 2 2f44d 7 modules ! c 2 2f444 4 DOM2 ! c 2 2f443 4 name |
From: Jan T. <de...@us...> - 2002-06-08 12:23:38
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv5241 Removed Files: CHANGELOG Log Message: --- CHANGELOG DELETED --- |
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv3460 Modified Files: Attr.pm CDATASection.pm CHANGELOG CharacterData.pm Comment.pm DOMException.pm DOMImplementation.pm DOMParser.pm DOMWriter.pm Document.pm DocumentFragment.pm DocumentType.pm Element.pm Entity.pm EntityReference.pm NamedNodeMap.pm Node.pm NodeList.pm Notation.pm ProcessingInstruction.pm Text.pm XMLDOMWriterStyle.pm notes.txt Log Message: * rewrote complete interface * 30% speed improvement Index: Attr.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Attr.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Attr.pm 2 Jun 2002 19:37:40 -0000 1.7 --- Attr.pm 8 Jun 2002 12:14:29 -0000 1.8 *************** *** 9,12 **** --- 9,16 ---- #-------------------------------------------------------- use strict; + + #/** + # This class represents an Attribute of an Element node. + #*/ package XML::DOM2::Attr; use base qw(XML::DOM2::Node); *************** *** 41,47 **** # @public #*/ ! sub name { my ($this) = @_; ! $this -> nodeName(); } --- 45,51 ---- # @public #*/ ! sub getName { my ($this) = @_; ! $this -> getNodeName(); } *************** *** 51,55 **** # @public #*/ ! sub ownerElement { my ($this) = @_; $this -> { m_ownerElement }; --- 55,59 ---- # @public #*/ ! sub getOwnerElement { my ($this) = @_; $this -> { m_ownerElement }; *************** *** 57,63 **** ! sub nodeValue { ! my ($this, $paramRef) = @_; ! $this -> value( $paramRef ); } --- 61,68 ---- ! ! sub getNodeValue { ! my ($this ) = @_; ! $this -> getValue(); } *************** *** 65,109 **** # Returns the value of this attribute. On retrieval, the value # is returned as a string. Character and general entity references ! # are replaced with their values. On setting, this creates a text ! # node with the unparsed contents of the string, i.e any characters ! # that an XML processor would recognize as markup are instead treated ! # as literal text. ! # @optional a hash reference containing the following key-value-pairs ! # <ul><li>value - the new value of the string.</li></ul> # @return the value of this attribute. #*/ ! sub value { ! my ($this, $paramRef) = @_; - if ( defined($paramRef) ) { - my $value = $paramRef -> {"value"}; - - # escape the value - # XXX: do NOT ???? escape the value ? - # $value =~ s/&/&/g; - # $value =~ s/([^a-zA-Z0-9_ .:\/()?=!-\\\[\]])/('&#'.ord($1).';')/eg; - # $value =~ s/</</g; - # $value =~ s/>/>/g; - # $value =~ s/"/"/g; - - # clear list of children - $this -> childNodes() -> removeAll(); - # append new node - my $textNode = $this -> ownerDocument() -> createTextNode( - { data => $value } ); - $this -> appendChild( { newChild => $textNode } ); - $this -> { m_specified } = 1; - } - # now convert all child nodes (which can be text or entity references) # to string and concatenate them. ! my $result = ""; ! my $count = $this -> childNodes() -> length() -1; for (0 .. $count ) { # FIXME: Support for entity references ! my $node = $this -> childNodes() -> item( { index => $_ } ); ! if ( $node -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! $result .= $node -> nodeValue(); } } --- 70,91 ---- # Returns the value of this attribute. On retrieval, the value # is returned as a string. Character and general entity references ! # are replaced with their values. ! # # @return the value of this attribute. #*/ ! sub getValue { ! my ($this) = @_; # now convert all child nodes (which can be text or entity references) # to string and concatenate them. ! my $result = ""; ! my $children = $this -> getChildNodes(); ! my $count = $children -> getLength() -1; for (0 .. $count ) { # FIXME: Support for entity references ! my $node = $children -> item( $_ ); ! if ( $node -> getNodeType() == $XML::DOM2::Node::TEXT_NODE ) { ! $result .= $node -> getNodeValue(); } } *************** *** 111,114 **** --- 93,116 ---- } + + #/** + # Sets the node value of this Attribute. On setting, this creates a text + # node with the unparsed contents of the string, i.e any characters + # that an XML processor would recognize as markup are instead treated + # as literal text. + # @param the new value of the attribute. + #*/ + sub setValue { + my ( $this, $value ) = @_; + + # clear list of children + $this -> getChildNodes() -> removeAll(); + # append new node + my $textNode = $this -> getOwnerDocument() -> createTextNode( $value ); + $this -> appendChild( $textNode ); + $this -> { m_specified } = 1; + } + + #/* # If this attribute was explicitly given a value in the *************** *** 117,123 **** # @public #*/ ! sub specified { my ($this) = @_; ! if ( defined( $this -> ownerElement() ) ) { $this -> m_specified; } --- 119,125 ---- # @public #*/ ! sub getSpecified { my ($this) = @_; ! if ( defined( $this -> getOwnerElement() ) ) { $this -> m_specified; } *************** *** 127,138 **** } ! sub nodeName { my ($this) = @_; $this -> { m_nodeName }; } ! sub prefix { my ($this) = @_; ! my $name = $this -> nodeName(); my ($prefix, $localname ) = split( /:/, $name ); if ( !defined($localname) ) { --- 129,140 ---- } ! sub getNodeName { my ($this) = @_; $this -> { m_nodeName }; } ! sub getPrefix { my ($this) = @_; ! my $name = $this -> getNodeName(); my ($prefix, $localname ) = split( /:/, $name ); if ( !defined($localname) ) { *************** *** 144,150 **** } ! sub localName { my ($this) = @_; ! my $name = $this -> nodeName(); my ($prefix, $localname ) = split( /:/, $name ); if ( !defined($localname) ) { --- 146,152 ---- } ! sub getLocalName { my ($this) = @_; ! my $name = $this -> getNodeName(); my ($prefix, $localname ) = split( /:/, $name ); if ( !defined($localname) ) { *************** *** 156,184 **** } ! sub namespaceURI { my ($this) = @_; $this -> { m_namespaceURI }; } ! #/** ! # Clones this node. ! # @public ! #*/ sub cloneNode { ! my ($this, $paramRef) = @_; ! my $deep = $paramRef -> { deep }; ! my $newNode = $this -> ownerDocument() -> createAttributeNS( { ! namespaceURI => $this -> namespaceURI(), ! qualifiedName => $this -> nodeName() ! } ); $newNode -> { m_specified } = 1; if ( $deep ) { ! my $children = $this -> childNodes(); ! my $len = $children -> length() - 1; for ( 0.. $len ) { ! $newNode -> appendChild( { newChild => $children -> ! item( {index => $_} ) -> cloneNode( $paramRef ) } ); } } --- 158,182 ---- } ! sub getNamespaceURI { my ($this) = @_; $this -> { m_namespaceURI }; } ! sub cloneNode { ! my ($this, $deep ) = @_; ! my $newNode = $this -> getOwnerDocument() -> createAttributeNS( ! $this -> getNamespaceURI(), ! $this -> getNodeName() ); ! $newNode -> { m_specified } = 1; if ( $deep ) { ! my $children = $this -> getChildNodes(); ! my $len = $children -> getLength() - 1; for ( 0.. $len ) { ! $newNode -> appendChild( $children -> ! item( $_ ) -> cloneNode( $deep ) ); } } *************** *** 191,196 **** # @public #*/ ! sub nodeType { ! my ($this) = @_; $XML::DOM2::Node::ATTRIBUTE_NODE; } --- 189,193 ---- # @public #*/ ! sub getNodeType { $XML::DOM2::Node::ATTRIBUTE_NODE; } Index: CDATASection.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CDATASection.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CDATASection.pm 2 Jun 2002 19:37:40 -0000 1.7 --- CDATASection.pm 8 Jun 2002 12:14:29 -0000 1.8 *************** *** 9,12 **** --- 9,15 ---- #-------------------------------------------------------- use strict; + #/** + # This class represents a CDATA-Section. + #*/ package XML::DOM2::CDATASection; use base qw(XML::DOM2::Text); *************** *** 25,32 **** #*/ sub new { ! my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname ! my $this = $proto -> SUPER::new(@_); return $this; } --- 28,35 ---- #*/ sub new { ! my ($proto) = @_; my $class = ref( $proto ) || $proto;# get the Classname ! my $this = $proto -> SUPER::new(); return $this; } *************** *** 37,43 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 40,46 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 48,54 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 51,57 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 59,65 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); --- 62,68 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); *************** *** 71,77 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 74,80 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 81,91 **** # @return the content of the CDATA-Section #*/ ! sub nodeValue { my ($this) = @_; ! $this -> data(); } ! sub nodeType { ! my ($this) = @_; $XML::DOM2::Node::CDATA_SECTION_NODE; } --- 84,93 ---- # @return the content of the CDATA-Section #*/ ! sub getNodeValue { my ($this) = @_; ! $this -> getData(); } ! sub getNodeType { $XML::DOM2::Node::CDATA_SECTION_NODE; } *************** *** 97,103 **** sub cloneNode { my ($this) = @_; ! my $newNode = $this -> ownerDocument() -> createCDATASection( { ! data => $this -> data() ! } ); $newNode; } --- 99,104 ---- sub cloneNode { my ($this) = @_; ! my $newNode = $this -> getOwnerDocument() -> createCDATASection( ! $this -> getData() ); $newNode; } Index: CHANGELOG =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CHANGELOG,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CHANGELOG 17 Mar 2002 19:26:14 -0000 1.2 --- CHANGELOG 8 Jun 2002 12:14:29 -0000 1.3 *************** *** 10,13 **** --- 10,18 ---- #-------------------------------------------------------- + --------------------------------------------------------- + Version 0.1.3alpha + --------------------------------------------------------- + * rewrote the complete interface, should be much faster + and easier to use now --------------------------------------------------------- Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CharacterData.pm 2 Jun 2002 19:37:40 -0000 1.7 --- CharacterData.pm 8 Jun 2002 12:14:29 -0000 1.8 *************** *** 35,56 **** #/** ! # The character data of the node that implements this interface. ! # Can be set or retrieved. If the param is not supplied it will ! # return the data, if the param is supplied it will set the new ! # data. ! # @param a hash reference containing the following key-value-pairs ! # data - the new character data # @return the character data of the node that implements this # interface. #*/ ! sub data { ! my ( $this, $paramsRef ) = @_; ! ! if ( defined( $paramsRef ) ) { ! $this -> { m_data } = $paramsRef -> {"data"}; ! } ! $this -> { m_data }; } #/** # Returns the length of the character data in characters --- 35,57 ---- #/** ! # Sets the character data of the node that implements this interface. ! # @param the new character data ! #*/ ! sub setData { ! my ( $this, $data ) = @_; ! $this -> { m_data } = $data; ! } ! ! #/** ! # Gets the character data of the node that implements this interface. # @return the character data of the node that implements this # interface. #*/ ! sub getData { ! my ( $this ) = @_; $this -> { m_data }; } + + #/** # Returns the length of the character data in characters *************** *** 58,85 **** # @public #*/ ! sub length { my ($this) = @_; ! length( $this -> data() ); } #/** # Extracts a range of data from a node. ! # @param a hash reference containing the following key-value-pairs ! # offset - start offset of the substring to extract ! # count - the number of character units to extract #*/ sub substringData { ! my ($this, $paramsRef ) = @_; ! my %params = %{$paramsRef}; ! my $offset = $params{"offset"}; ! my $count = $params{"count"}; ! if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") - } ); $exc -> raise(); --- 59,81 ---- # @public #*/ ! sub getLength { my ($this) = @_; ! length( $this -> getData() ); } #/** # Extracts a range of data from a node. ! # @param start offset of the substring to extract ! # @param the number of character units to extract #*/ sub substringData { ! my ($this, $offset, $count ) = @_; ! if ($offset < 0 || $offset > $this -> getLength() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") ); $exc -> raise(); *************** *** 87,102 **** } ! substr( $this -> data(), $offset, $count ); } #/** # Append the string to the end of the character data of the node. ! # @param a hash reference containing the following key-value-pair ! # arg - the data to append. #*/ sub appendData { ! my ($this, $paramsRef ) = @_; ! my %params = %{$paramsRef}; ! $this -> data( { "data" => $this -> data().$params{"arg"} } ); undef; } --- 83,96 ---- } ! substr( $this -> getData(), $offset, $count ); } #/** # Append the string to the end of the character data of the node. ! # @param the data to append. #*/ sub appendData { ! my ($this, $data ) = @_; ! $this -> setData( $this -> getData().$data ); undef; } *************** *** 104,125 **** #/** # Remove a range of characters from the node. ! # @param a hash reference containing the following key-value-pairs ! # offset - the offset from which to start removing ! # count - the number of characters to be removed. #*/ sub deleteData { ! my ($this, $paramsRef ) = @_; ! my %params = %{$paramsRef}; ! ! my $offset = $params{"offset"}; ! my $count = $params{"count"}; ! if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") - } ); $exc -> raise(); --- 98,113 ---- #/** # Remove a range of characters from the node. ! # @param the offset from which to start removing ! # @param the number of characters to be removed. #*/ sub deleteData { ! my ($this, $offset, $count ) = @_; ! if ($offset < 0 || $offset > $this -> getLength() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") ); $exc -> raise(); *************** *** 127,133 **** } ! my $data = $this -> data(); substr($data, $offset, $count ) = ""; ! $this -> data( { "data" => $data } ); undef; } --- 115,121 ---- } ! my $data = $this -> getData(); substr($data, $offset, $count ) = ""; ! $this -> setData( $data ); undef; } *************** *** 135,152 **** #/** # Insert a string at the specified character offset. ! # @param a hash reference containing the following key-value-pairs ! # offset - the offset at which to insert ! # arg - the string to insert #*/ sub insertData { ! my ($this, $paramsRef ) = @_; ! my %params = %{$paramsRef}; ! my $offset = $params{"offset"}; ! if ($offset < 0 || $offset > $this -> length() ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ErrDesc => ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") - } ); $exc -> raise(); --- 123,136 ---- #/** # Insert a string at the specified character offset. ! # @param the offset at which to insert ! # @param the string to insert #*/ sub insertData { ! my ($this, $offset, $arg ) = @_; ! if ($offset < 0 || $offset > $this -> getLength() ) { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") ); $exc -> raise(); *************** *** 154,160 **** } ! my $data = $this -> data(); ! substr($data, $offset, 0 ) = $params{"arg"}; ! $this -> data( { "data" => $data } ); undef; } --- 138,144 ---- } ! my $data = $this -> getData(); ! substr($data, $offset, 0 ) = $arg; ! $this -> setData( $data); undef; } *************** *** 163,190 **** # Replace the characters starting at the specified offset with the # specified string. ! # @param a hash reference containing the following key-value-pairs ! # offset - the offset at which to start replacing ! # count - the number of characters to replace ! # arg - the string to replace. #*/ sub replaceData { ! my ($this, $paramsRef ) = @_; ! my %params = %{$paramsRef}; ! my $offset = $params{"offset"}; ! my $count = $params{"count"}; ! if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") - } ); $exc -> raise(); return undef; } ! my $data = $this -> data(); ! substr($data, $offset, $count) = $params{"arg"}; ! $this -> data( { "data" => $data } ); undef; } --- 147,169 ---- # Replace the characters starting at the specified offset with the # specified string. ! # @param the offset at which to start replacing ! # @param the number of characters to replace ! # @param the string to replace. #*/ sub replaceData { ! my ($this, $offset, $count, $arg ) = @_; ! if ($offset < 0 || $offset > $this -> getLength() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INDEX_SIZE_ERR, ! ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : "The offset is greater than the data length.") ); $exc -> raise(); return undef; } ! my $data = $this -> getData(); ! substr($data, $offset, $count) = $arg; ! $this -> setData( $data ); undef; } Index: Comment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Comment.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Comment.pm 2 Jun 2002 19:37:40 -0000 1.7 --- Comment.pm 8 Jun 2002 12:14:29 -0000 1.8 *************** *** 9,12 **** --- 9,15 ---- #-------------------------------------------------------- use strict; + #/** + # This class represents a comment. + #*/ package XML::DOM2::Comment; use base qw(XML::DOM2::CharacterData); *************** *** 29,33 **** my $class = ref( $proto ) || $proto;# get the Classname ! my $this = $proto -> SUPER::new(@_); return $this; } --- 32,36 ---- my $class = ref( $proto ) || $proto;# get the Classname ! my $this = $proto -> SUPER::new(); return $this; } *************** *** 38,44 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 41,47 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 49,55 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 52,58 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 60,66 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); --- 63,69 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); *************** *** 72,78 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! ErrDesc => "This node cannot have children." ! } ); $exc -> raise(); } --- 75,81 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ! "This node cannot have children." ! ); $exc -> raise(); } *************** *** 83,93 **** # @public #*/ ! sub nodeValue { my ($this) = @_; ! $this -> data(); } ! sub nodeType { ! my ($this) = @_; $XML::DOM2::Node::COMMENT_NODE; } --- 86,95 ---- # @public #*/ ! sub getNodeValue { my ($this) = @_; ! $this -> getData(); } ! sub getNodeType { $XML::DOM2::Node::COMMENT_NODE; } *************** *** 99,105 **** sub cloneNode { my ($this) = @_; ! my $newNode = $this -> ownerDocument() -> createComment( { ! data => $this -> data() ! } ); $newNode; } --- 101,106 ---- sub cloneNode { my ($this) = @_; ! my $newNode = $this -> getOwnerDocument() -> createComment( ! $this -> getData() ); $newNode; } Index: DOMException.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMException.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DOMException.pm 2 Jun 2002 19:37:40 -0000 1.9 --- DOMException.pm 8 Jun 2002 12:14:29 -0000 1.10 *************** *** 50,56 **** #/** # The constructor. Constructs a DOMException. ! # @param a hash reference containing the following key-value-pairs ! # ErrCode - the ErrorCode for this Exception ! # ErrDesc - an exact description why the error occured # @return an instance of XML::DOM2:DOMException #*/ --- 50,55 ---- #/** # The constructor. Constructs a DOMException. ! # @param the ErrorCode for this Exception ! # @param an exact description why the error occured # @return an instance of XML::DOM2:DOMException #*/ *************** *** 58,70 **** # These two lines help with inheritance and # allow this method to be called as object method. ! my ($proto, $argsRef) = @_; my $class = ref( $proto ) || $proto;# get the Classname - my %args = %{$argsRef}; # Create a Class using the Hash-As-An-Object-Idiom my $this = {}; bless( $this, $class ); # create Object ! $this -> { m_code } = $args{ErrCode}; # Exception Error code. ! $this -> { m_desc } = $args{ErrDesc}; # Exception description return $this; # return Object } --- 57,68 ---- # These two lines help with inheritance and # allow this method to be called as object method. ! my ($proto, $errCode, $errDesc) = @_; my $class = ref( $proto ) || $proto;# get the Classname # Create a Class using the Hash-As-An-Object-Idiom my $this = {}; bless( $this, $class ); # create Object ! $this -> { m_code } = $errCode; # Exception Error code. ! $this -> { m_desc } = $errDesc; # Exception description return $this; # return Object } Index: DOMImplementation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMImplementation.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DOMImplementation.pm 2 Jun 2002 19:37:40 -0000 1.7 --- DOMImplementation.pm 8 Jun 2002 12:14:29 -0000 1.8 *************** *** 62,78 **** # Creates an empty DocumentType node. # ! # @param a hash reference containing the following key-value-pairs ! # <ul><li>qualifiedName - the qualified name of the document type to be created.</li> ! # <li>publicId - the external subset public identifier.</li> ! # <li>systemId - the external subset system identifier.</li></ul> # @return an instance of XML::DOM2::DocumentType #*/ sub createDocumentType { ! my ($this, $paramRef) = @_; my $doctype = XML::DOM2::DocumentType -> new(); ! $doctype -> { m_name } = $paramRef -> { qualifiedName }; ! $doctype -> { m_publicId } = $paramRef -> { publicId }; ! $doctype -> { m_systemId } = $paramRef -> { systemId }; $doctype -> { m_ownerDocument } = undef; return $doctype; --- 62,77 ---- # Creates an empty DocumentType node. # ! # @param the qualified name of the document type to be created. ! # @param the external subset public identifier ! # @param the external subset system identifier. # @return an instance of XML::DOM2::DocumentType #*/ sub createDocumentType { ! my ($this, $qualifiedName, $publicId, $systemId ) = @_; my $doctype = XML::DOM2::DocumentType -> new(); ! $doctype -> { m_name } = $qualifiedName; ! $doctype -> { m_publicId } = $publicId; ! $doctype -> { m_systemId } = $systemId; $doctype -> { m_ownerDocument } = undef; return $doctype; *************** *** 82,102 **** #/** # Creates an an XML Document object. ! # @param a hash reference containing the following key-value-pairs ! # <ul><li>namespaceURI - the namespace URI of the document element to create.</li> ! # <li>qualifiedName - the qualified name of the document element ! # to be created</li> ! # <li>doctype - the type of document to be created or undef.</li></ul> # @return an instance of XML::DOM2::Document #*/ sub createDocument { ! my ($this, $paramRef) = @_; ! my $doctype = $paramRef -> { doctype }; if (defined($doctype)) { ! if ( defined($doctype -> ownerDocument()) ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ! ErrDesc => "The specified Doctype has been used with another document!" ! }); $exc -> raise(); return; --- 81,98 ---- #/** # Creates an an XML Document object. ! # @param the namespace URI of the document element to create. ! # @param the qualified name of the document element to be created ! # @param the type of document to be created or undef # @return an instance of XML::DOM2::Document #*/ sub createDocument { ! my ($this, $namespaceURI, $qualifiedName, $doctype) = @_; if (defined($doctype)) { ! if ( defined($doctype -> getOwnerDocument()) ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ! "The specified Doctype has been used with another document!" ! ); $exc -> raise(); return; *************** *** 106,113 **** my $doc = XML::DOM2::Document -> new(); $doc -> { m_implementation } = $this; ! $doc -> { m_doctype } = $paramRef -> { doctype }; $doc -> { m_ownerDocument } = $doc; ! my $rootElement = $doc -> createElementNS( $paramRef ); ! $doc -> appendChild( { newChild => $rootElement } ); if ( defined($doctype) ) { $doctype -> { m_ownerDocument } = $doc; --- 102,109 ---- my $doc = XML::DOM2::Document -> new(); $doc -> { m_implementation } = $this; ! $doc -> { m_doctype } = $doctype; $doc -> { m_ownerDocument } = $doc; ! my $rootElement = $doc -> createElementNS( $namespaceURI, $qualifiedName ); ! $doc -> appendChild( $rootElement ); if ( defined($doctype) ) { $doctype -> { m_ownerDocument } = $doc; Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DOMParser.pm 2 Jun 2002 19:37:40 -0000 1.5 --- DOMParser.pm 8 Jun 2002 12:14:29 -0000 1.6 *************** *** 56,67 **** # create new document $this -> { m_document } = ! $this -> { m_DOMImplementation } -> createDocument( { ! qualifiedName => "dummy", ! namespaceURI => "dummy" ! } ); # remove the dummy element. ! my $docEl = $this -> { m_document } -> documentElement(); ! $this -> { m_document } -> removeChild( { oldChild => $docEl } ); $this -> { m_contextElement } = $this -> { m_document }; --- 56,65 ---- # create new document $this -> { m_document } = ! $this -> { m_DOMImplementation } -> createDocument( ! "dummy", "dummy" ); # remove the dummy element. ! my $docEl = $this -> { m_document } -> getDocumentElement(); ! $this -> { m_document } -> removeChild( $docEl ); $this -> { m_contextElement } = $this -> { m_document }; *************** *** 89,94 **** #/** # Parses the given String. Returns the Document object. ! # @param a hash reference containing the following key-value-pairs: ! # string - a scalar holding the textual representation # of an XML Document. # @return an instance of XML::DOM2::Document, representing --- 87,91 ---- #/** # Parses the given String. Returns the Document object. ! # @param a scalar holding the textual representation # of an XML Document. # @return an instance of XML::DOM2::Document, representing *************** *** 97,102 **** #*/ sub parseString { ! my ($this, $paramRef) = @_; ! my $string = $paramRef -> { "string" }; $this -> { m_parser } -> parse( $string ); # return the parsed document --- 94,98 ---- #*/ sub parseString { ! my ($this, $string) = @_; $this -> { m_parser } -> parse( $string ); # return the parsed document *************** *** 139,150 **** my $prefix = $prefixMap{$namespaceURI}; ! $elementNode = $this -> { m_document } -> createElementNS( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); # get currently innermost open Element. # and append this element to it. my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( { newChild => $elementNode } ); # add any attributes --- 135,146 ---- my $prefix = $prefixMap{$namespaceURI}; ! $elementNode = $this -> { m_document } -> createElementNS( ! $namespaceURI, ! defined($prefix) ? $prefix.":".$element : $element ); ! # get currently innermost open Element. # and append this element to it. my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( $elementNode ); # add any attributes *************** *** 155,163 **** my $aPrefix = $prefixMap{$aNamespaceURI}; ! $elementNode -> setAttributeNS({ ! qualifiedName => defined($aPrefix) ? $aPrefix.":".$name : $name, ! namespaceURI => $aNamespaceURI, ! value => $value ! }); } --- 151,158 ---- my $aPrefix = $prefixMap{$aNamespaceURI}; ! $elementNode -> setAttributeNS( ! $aNamespaceURI, ! defined($aPrefix) ? $aPrefix.":".$name : $name, ! $value ); } *************** *** 179,183 **** # now it's quite easy, we put the parent of the contextElement # as new context element ! $this -> { m_contextElement } = $contextElement -> parentNode(); } --- 174,178 ---- # now it's quite easy, we put the parent of the contextElement # as new context element ! $this -> { m_contextElement } = $contextElement -> getParentNode(); } *************** *** 189,198 **** my ($this, $expat, $string) = @_; # first, create a text node ! my $textNode = $this -> { m_document } -> createTextNode( { ! data => $string ! }); # append it to the context element ! $this -> { m_contextElement } -> appendChild( { newChild => $textNode } ); } --- 184,191 ---- my ($this, $expat, $string) = @_; # first, create a text node ! my $textNode = $this -> { m_document } -> createTextNode( $string ); # append it to the context element ! $this -> { m_contextElement } -> appendChild( $textNode ); } *************** *** 205,215 **** my ($this, $expat, $target, $data) = @_; # first, create a processing instruction node ! my $procNode = $this -> { m_document } -> createProcessingInstruction( { ! target => $target, ! data => $data ! }); # append it to the context element ! $this -> { m_contextElement } -> appendChild( { newChild => $procNode } ); } --- 198,206 ---- my ($this, $expat, $target, $data) = @_; # first, create a processing instruction node ! my $procNode = $this -> { m_document } -> createProcessingInstruction( ! $target, $data ); # append it to the context element ! $this -> { m_contextElement } -> appendChild( $procNode ); } *************** *** 222,231 **** my ($this, $expat, $data) = @_; # first, create a text node ! my $commentNode = $this -> { m_document } -> createComment( { ! data => $data ! }); # append it to the context element ! $this -> { m_contextElement } -> appendChild( { newChild => $commentNode } ); } --- 213,221 ---- my ($this, $expat, $data) = @_; # first, create a text node ! my $commentNode = $this -> { m_document } -> createComment( ! $data ); # append it to the context element ! $this -> { m_contextElement } -> appendChild( $commentNode ); } *************** *** 237,244 **** my ($this, $expat) = @_; # no idea what happens here, CDATA is currently not supported. ! my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ! ErrDesc => "The DOMParser currently does not support CDATA sections." ! }); $exc -> raise(); } --- 227,234 ---- my ($this, $expat) = @_; # no idea what happens here, CDATA is currently not supported. ! my $exc = XML::DOM2::DOMException -> new( ! $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ! "The DOMParser currently does not support CDATA sections." ! ); $exc -> raise(); } *************** *** 251,258 **** my ($this, $expat) = @_; # no idea what happens here, CDATA is currently not supported. ! my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ! ErrDesc => "The DOMParser currently does not support CDATA sections." ! }); $exc -> raise(); } --- 241,248 ---- my ($this, $expat) = @_; # no idea what happens here, CDATA is currently not supported. ! my $exc = XML::DOM2::DOMException -> new( ! $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ! "The DOMParser currently does not support CDATA sections." ! ); $exc -> raise(); } Index: DOMWriter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriter.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DOMWriter.pm 2 Jun 2002 19:37:40 -0000 1.4 --- DOMWriter.pm 8 Jun 2002 12:14:29 -0000 1.5 *************** *** 36,48 **** #/** # Writes the given DOM to a string, using the given DOMWriterStyle ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>document - instance of XML::DOM2::Document</li> ! # <li>style - an instance of XML::DOM2::DOMWriterStyle or a subclass of it</li></ul> # @return the document as a string represenation. #*/ sub writeDOMToString { ! my ($this, $paramRef ) = @_; ! my $document = $paramRef -> { document }; ! my $style = $paramRef -> { style }; my @childrenList = ( $document ); my @elements = (); --- 36,45 ---- #/** # Writes the given DOM to a string, using the given DOMWriterStyle ! # @param instance of XML::DOM2::Document ! # @param an instance of XML::DOM2::DOMWriterStyle or a subclass of it # @return the document as a string represenation. #*/ sub writeDOMToString { ! my ($this, $document, $style ) = @_; my @childrenList = ( $document ); my @elements = (); *************** *** 58,62 **** } #check node type ! my $nodeType = $child -> nodeType(); $style -> processElement( $child ) if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE ); --- 55,59 ---- } #check node type ! my $nodeType = $child -> getNodeType(); $style -> processElement( $child ) if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE ); *************** *** 76,83 **** } ! my $childNodes = $child -> childNodes(); ! my $length = $childNodes -> length() - 1; for( 0..$length ){ ! unshift( @childrenList, $childNodes -> item( {index => $length - $_} ) ); } $child = shift( @childrenList ); --- 73,80 ---- } ! my $childNodes = $child -> getChildNodes(); ! my $length = $childNodes -> getLength() - 1; for( 0..$length ){ ! unshift( @childrenList, $childNodes -> item( $length - $_ ) ); } $child = shift( @childrenList ); *************** *** 88,100 **** #/** # Writes the given DOM to a file, using the given DOMWriterStyle ! # @param a hash reference containing the following key-value-pairs: ! # document - instance of XML::DOM2::Document ! # style - an instance of XML::DOM2::DOMWriterStyle or a subclass of it ! # file - the file to write the converted DOM to. (local file system,only) #*/ sub writeDOMToFile { ! my ($this, $paramRef ) = @_; ! my $result = $this -> writeDOMToString( $paramRef ); ! my $filename = $paramRef -> { file }; open( AFILE, ">$filename" ); print AFILE $result; --- 85,95 ---- #/** # Writes the given DOM to a file, using the given DOMWriterStyle ! # @param instance of XML::DOM2::Document ! # @param an instance of XML::DOM2::DOMWriterStyle or a subclass of it ! # @param the file to write the converted DOM to. (local file system,only) #*/ sub writeDOMToFile { ! my ($this, $document, $style, $filename ) = @_; ! my $result = $this -> writeDOMToString( $document, $style ); open( AFILE, ">$filename" ); print AFILE $result; Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Document.pm 2 Jun 2002 19:37:40 -0000 1.8 --- Document.pm 8 Jun 2002 12:14:29 -0000 1.9 *************** *** 53,57 **** # @public #*/ ! sub doctype { my ($this) = @_; $this -> { m_doctype }; --- 53,57 ---- # @public #*/ ! sub getDoctype { my ($this) = @_; $this -> { m_doctype }; *************** *** 63,67 **** # @public #*/ ! sub documentElement { my ($this) = @_; $this -> { m_documentElement }; --- 63,67 ---- # @public #*/ ! sub getDocumentElement { my ($this) = @_; $this -> { m_documentElement }; *************** *** 73,77 **** # @public #*/ ! sub implementation { my ($this) = @_; $this -> { m_implementation }; --- 73,77 ---- # @public #*/ ! sub getImplementation { my ($this) = @_; $this -> { m_implementation }; *************** *** 81,98 **** # Creates an Attr node of the given name. Note that the Attr instance # can then be set on an element using the setAttributeNode method. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>name - the name of the attribute.</li></ul> # @return an instance of XML::DOM2::Attr # @public #*/ sub createAttribute { ! my ($this, $paramRef) = @_; my $attr = XML::DOM2::Attr -> new(); $attr -> { m_ownerDocument } = $this; ! $attr -> { m_nodeName } = $paramRef -> { "name" }; $attr -> { m_localName } = undef; $attr -> { m_prefix } = undef; $attr -> { m_namespaceURI } = undef; ! $attr -> nodeValue( { "value" => ""} ); $attr; } --- 81,97 ---- # Creates an Attr node of the given name. Note that the Attr instance # can then be set on an element using the setAttributeNode method. ! # @param the name of the attribute. # @return an instance of XML::DOM2::Attr # @public #*/ sub createAttribute { ! my ($this, $name) = @_; my $attr = XML::DOM2::Attr -> new(); $attr -> { m_ownerDocument } = $this; ! $attr -> { m_nodeName } = $name; $attr -> { m_localName } = undef; $attr -> { m_prefix } = undef; $attr -> { m_namespaceURI } = undef; ! $attr -> setValue( "" ); $attr; } *************** *** 100,114 **** #/** # Creates an attribute of the given qualified name and namespace URI. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>namespaceURI - the namespace URI of the attribute</li> ! # <li>qualifiedName - the qualified name of the attribute</li></ul> # @return an instance of XML::DOM2::Attr # @public #*/ sub createAttributeNS { ! my ($this, $paramRef ) = @_; ! my ( $prefix, $localname ) = split(/:/, $paramRef -> { qualifiedName }); ! my $namespaceURI = $paramRef -> { namespaceURI }; if ( defined( $prefix ) && !defined($localname) ) { --- 99,111 ---- #/** # Creates an attribute of the given qualified name and namespace URI. ! # @param the namespace URI of the attribute ! # @param the qualified name of the attribute # @return an instance of XML::DOM2::Attr # @public #*/ sub createAttributeNS { ! my ($this, $namespaceURI, $qualifiedName ) = @_; ! my ( $prefix, $localname ) = split(/:/, $qualifiedName ); if ( defined( $prefix ) && !defined($localname) ) { *************** *** 118,125 **** if ( defined($prefix) && !defined($namespaceURI) ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" ! }); $exc -> raise(); return; --- 115,122 ---- if ( defined($prefix) && !defined($namespaceURI) ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The qualified name (".$qualifiedName.") has a prefix, but the namespace URI is undef!" ! ); $exc -> raise(); return; *************** *** 129,136 **** $namespaceURI ne "http://www.w3.org/XML/1998/namespace" ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" ! }); $exc -> raise(); } --- 126,133 ---- $namespaceURI ne "http://www.w3.org/XML/1998/namespace" ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" ! ); $exc -> raise(); } *************** *** 139,155 **** $namespaceURI ne "http://www.w3.org/2000/xmlns" ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" ! }); $exc -> raise(); } my $attr = XML::DOM2::Attr -> new(); $attr -> { m_ownerDocument } = $this; ! $attr -> { m_nodeName } = $paramRef -> { qualifiedName }; $attr -> { m_namespaceURI } = $namespaceURI; $attr -> { m_prefix } = $prefix; $attr -> { m_localName } = $localname; ! $attr -> nodeValue( { "value" => ""} ) ; $attr; } --- 136,152 ---- $namespaceURI ne "http://www.w3.org/2000/xmlns" ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" ! ); $exc -> raise(); } my $attr = XML::DOM2::Attr -> new(); $attr -> { m_ownerDocument } = $this; ! $attr -> { m_nodeName } = $qualifiedName; $attr -> { m_namespaceURI } = $namespaceURI; $attr -> { m_prefix } = $prefix; $attr -> { m_localName } = $localname; ! $attr -> setValue( "" ) ; $attr; } *************** *** 157,189 **** #/** # Creates a CDATASection node whose value is the specified String. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>data - the data for the CDATASection contents.</li></ul> # @return an instance of XML::DOM2::CDATASection # @public #*/ sub createCDATASection { ! my ($this, $paramRef) = @_; my $cdata = XML::DOM2::CDATASection -> new(); $cdata -> { m_ownerDocument } = $this; ! $cdata -> data( $paramRef ); $cdata; } #/** # Creates a Comment node given the specified String. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>data - the data for the node.</li></ul> # @return an instance of XML::DOM2::Comment # @public #*/ sub createComment { ! my ($this, $paramRef) = @_; my $comment = XML::DOM2::Comment -> new(); $comment -> { m_ownerDocument } = $this; ! $comment -> data( $paramRef ); $comment; } #/** # Creates an empty DocumentFragment object. --- 154,185 ---- #/** # Creates a CDATASection node whose value is the specified String. ! # @param the data for the CDATASection contents. # @return an instance of XML::DOM2::CDATASection # @public #*/ sub createCDATASection { ! my ($this, $data ) = @_; my $cdata = XML::DOM2::CDATASection -> new(); $cdata -> { m_ownerDocument } = $this; ! $cdata -> setData( $data ); $cdata; } #/** # Creates a Comment node given the specified String. ! # @param the data for the node. # @return an instance of XML::DOM2::Comment # @public #*/ sub createComment { ! my ($this, $data) = @_; my $comment = XML::DOM2::Comment -> new(); $comment -> { m_ownerDocument } = $this; ! $comment -> setData( $data ); $comment; } + #/** # Creates an empty DocumentFragment object. *************** *** 202,216 **** # Creates an element of the type specified. Attributes can be specified # directly on the returned object. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>tagName - the name of the element type to instantiate.</li></ul> # @return an instance of XML::DOM2::Element # @public #*/ sub createElement { ! my ($this, $paramRef) = @_; my $element = XML::DOM2::Element -> new(); $element -> { m_ownerDocument } = $this; ! $element -> { m_nodeName } = $paramRef -> { tagName }; $element -> { m_localName } = undef; $element -> { m_prefix } = undef; --- 198,211 ---- # Creates an element of the type specified. Attributes can be specified # directly on the returned object. ! # @param the name of the element type to instantiate. # @return an instance of XML::DOM2::Element # @public #*/ sub createElement { ! my ($this, $name) = @_; my $element = XML::DOM2::Element -> new(); $element -> { m_ownerDocument } = $this; ! $element -> { m_nodeName } = $name; $element -> { m_localName } = undef; $element -> { m_prefix } = undef; *************** *** 222,235 **** #/** # Creates an element of the given qualified name and namespaceURI ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>namespaceURI - the namespace URI of the element to create</li> ! # <li>qualifiedName - the qualified name of the element type to instantiate</li></ul> # @return an instance of XML::DOM2::Element # @public #*/ sub createElementNS { ! my ($this, $paramRef) = @_; ! my ( $prefix, $localname ) = split(/:/, $paramRef -> { qualifiedName }); ! my $namespaceURI = $paramRef -> { namespaceURI }; if ( defined( $prefix ) && !defined($localname) ) { --- 217,228 ---- #/** # Creates an element of the given qualified name and namespaceURI ! # @param the namespace URI of the element to create ! # @param the qualified name of the element type to instantiate # @return an instance of XML::DOM2::Element # @public #*/ sub createElementNS { ! my ($this, $namespaceURI, $qualifiedName ) = @_; ! my ( $prefix, $localname ) = split(/:/, $qualifiedName); if ( defined( $prefix ) && !defined($localname) ) { *************** *** 239,246 **** if ( defined($prefix) && !defined($namespaceURI) ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The qualified name (".$paramRef->{ qualifiedName }.") has a prefix, but the namespace URI is undef!" ! }); $exc -> raise(); return; --- 232,239 ---- if ( defined($prefix) && !defined($namespaceURI) ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The qualified name (".$qualifiedName.") has a prefix, but the namespace URI is undef!" ! ); $exc -> raise(); return; *************** *** 250,257 **** $namespaceURI ne "http://www.w3.org/XML/1998/namespace" ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" ! }); $exc -> raise(); } --- 243,250 ---- $namespaceURI ne "http://www.w3.org/XML/1998/namespace" ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" ! ); $exc -> raise(); } *************** *** 260,267 **** $namespaceURI ne "http://www.w3.org/2000/xmlns" ) { ! my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ! ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" ! }); $exc -> raise(); } --- 253,260 ---- $namespaceURI ne "http://www.w3.org/2000/xmlns" ) { ! my $exc = XML::DOM2::DOMException -> new ( ! $XML::DOM2::DOMException::NAMESPACE_ERR, ! "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" ! ); $exc -> raise(); } *************** *** 271,279 **** $element -> { m_ownerDocument } = $this; ! $element -> { m_nodeName } = $paramRef -> { qualifiedName }; $element -> { m_namespaceURI } = $namespaceURI; $element -> { m_prefix } = $prefix; $element -> { m_localName } = $localname; ! $element -> { m_tagName } = $paramRef -> { qualifiedName }; $element; } --- 264,272 ---- $element -> { m_ownerDocument } = $this; ! $element -> { m_nodeName } = $qualifiedName; $element -> { m_namespaceURI } = $namespaceURI; $element -> { m_prefix } = $prefix; $element -> { m_localName } = $localname; ! $element -> { m_tagName } = $qualifiedName; $element; } *************** *** 283,288 **** # known, the child list of the EntityReference node is made the same as that # of the corresponding Entity node. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li> name - the name of the entity to reference.</li></ul> # @return an instance of XML::DOM2::EntityReference # @public --- 276,280 ---- # known, the child list of the EntityReference node is made the same as that # of the corresponding Entity node. ! # @param the name of the entity to reference. # @return an instance of XML::DOM2::EntityReference # @public *************** *** 294,298 **** #*/ sub createEntityReference { ! my ($this, $paramRef) = @_; my $eref = XML::DOM2::EntityReference -> new(); $eref -> { m_ownerDocument } = $this; --- 286,290 ---- #*/ sub createEntityReference { ! my ($this, $name) = @_; my $eref = XML::DOM2::EntityReference -> new(); $eref -> { m_ownerDocument } = $this; *************** *** 303,319 **** # Creates a processing instruction node given the specified # name and data strings. ! # @param a hash reference containing the following key-value-pairs: ! # <ul><li>target - the target part of the processing instruction</li> ! # <li>data - the data for the node</li></ul> # @return an instance of XML::DOM2::ProcessingInstruction # @public #*/ sub createProcessingInstruction { ! my ($this, $paramRef) = @_; my $pi = XML::DOM2::ProcessingInstruction -> new(); $pi -> { m_ownerDocument } = $this; ! $pi -> target( $paramRef ); ! $pi -> data( $paramRef ); $pi; } --- 295,310 ---- # Creates a processing instruction node given the specified # name and data strings. ! # @param the target part of the processing instruction ! # @param the data for the node # @return an instance of XML::DOM2::ProcessingInstruction # @public #*/ sub createProcessingInstruction { ! my ($this, $target, $data) = @_; my $pi = XML::DOM2::ProcessingInstruction -> new(); $pi -> { m_... [truncated message content] |
From: Jan T. <de...@us...> - 2002-06-08 12:10:50
|
Update of /cvsroot/net-script/netscript2/docs/xmldom2 In directory usw-pr-cvs1:/tmp/cvs-serv2763 Removed Files: CHANGELOG Log Message: --- CHANGELOG DELETED --- |
From: Jan T. <de...@us...> - 2002-06-08 12:08:06
|
Update of /cvsroot/net-script/netscript2/docs/xmldom2 In directory usw-pr-cvs1:/tmp/cvs-serv2115 Added Files: CHANGELOG Log Message: --- NEW FILE: CHANGELOG --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Change Log. # $Id: CHANGELOG,v 1.1 2002/06/08 12:08:03 derkork Exp $ # # 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... #-------------------------------------------------------- --------------------------------------------------------- Version 0.1.3alpha --------------------------------------------------------- * rewrote the complete interface, should be much faster and easier to use now --------------------------------------------------------- Version 0.1.2alpha --------------------------------------------------------- * fixed some small bugs * added limited support for node cloning and importing --------------------------------------------------------- Version 0.1.1alpha --------------------------------------------------------- * added a DOMParser, which enables the user to parse an XML document into a DOM. * fixed tons of bugs --------------------------------------------------------- Version 0.1alpha --------------------------------------------------------- * initial public version |
From: Jan T. <de...@us...> - 2002-06-08 12:01:50
|
Update of /cvsroot/net-script/netscript2/docs/xmldom2 In directory usw-pr-cvs1:/tmp/cvs-serv693 Modified Files: TODO.html Added Files: CHANGELOG.html Log Message: --- NEW FILE: CHANGELOG.html --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Change Log. # $Id: CHANGELOG.html,v 1.1 2002/06/08 12:01:47 derkork Exp $ # # 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... #-------------------------------------------------------- --------------------------------------------------------- Version 0.1.3alpha --------------------------------------------------------- * rewrote the complete interface, should be much faster and easier to use now --------------------------------------------------------- Version 0.1.2alpha --------------------------------------------------------- * fixed some small bugs * added limited support for node cloning and importing --------------------------------------------------------- Version 0.1.1alpha --------------------------------------------------------- * added a DOMParser, which enables the user to parse an XML document into a DOM. * fixed tons of bugs --------------------------------------------------------- Version 0.1alpha --------------------------------------------------------- * initial public version Index: TODO.html =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/xmldom2/TODO.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TODO.html 31 May 2002 19:08:10 -0000 1.1 --- TODO.html 8 Jun 2002 12:01:47 -0000 1.2 *************** *** 16,19 **** --- 16,21 ---- * DOMParser - DTD-stuff + * NodeList + - NodeLists generated by getElementsByTagName are not live Other * lots of sanity checks ( e.g you cannot insert an attr |
From: Jan T. <de...@us...> - 2002-06-08 12:01:30
|
Update of /cvsroot/net-script/netscript2/docs/xmldom2 In directory usw-pr-cvs1:/tmp/cvs-serv617 Modified Files: wipeout.project Log Message: Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/docs/xmldom2/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:45 -0000 1.2 --- wipeout.project 8 Jun 2002 12:01:26 -0000 1.3 *************** *** 1,193 **** b ! C DmDictionary 0 1edc1 8 ! c 0 1ee3b 9 ! C Category 1 16931 ! c 0 1ee6f 4 ! C DmString 2 1ee76 2 e3 ! c 2 1ee75 a defaultExe ! C DmSet 3 1ee78 1 ! c 2 16943 2 e3 ! L 16943 ! c 2 1ee77 b executables ! c 3 1ee73 3 ! c 2 16939 3 *.C ! L 16939 ! c 2 1693b 4 *.cc ! L 1693b ! c 2 1693d 5 *.cpp ! L 1693d ! c 2 1ee72 a extensions ! c 2 1ee71 a CPP_source ! c 2 1ee70 4 name ! c 2 1ee3d a CPP_source ! c 1 16947 ! c 0 1eeb5 4 ! c 2 1eebc 2 e3 ! c 2 1eebb a defaultExe ! c 3 1eebe 1 ! c 2 16955 2 e3 ! L 16955 ! c 2 1eebd b executables ! c 3 1eeb9 1 ! c 2 1694f 3 *.c ! L 1694f ! c 2 1eeb8 a extensions ! c 2 1eeb7 8 C_source ! c 2 1eeb6 4 name ! c 2 1ee3e 8 C_source ! c 1 16959 ! c 0 1eeef 4 ! c 2 1eef6 2 e3 ! c 2 1eef5 a defaultExe ! c 3 1eef8 1 ! c 2 16967 2 e3 ! L 16967 ! c 2 1eef7 b executables ! c 3 1eef3 1 ! c 2 16961 3 *.e ! L 16961 ! c 2 1eef2 a extensions ! c 2 1eef1 6 Eiffel ! c 2 1eef0 4 name ! c 2 1ee3f 6 Eiffel ! c 1 1696b ! c 0 1ef29 4 ! c 2 1ef30 2 e3 ! c 2 1ef2f a defaultExe ! c 3 1ef32 1 ! c 2 1697f 2 e3 ! L 1697f ! c 2 1ef31 b executables ! c 3 1ef2d 4 ! c 2 16973 3 *.F ! L 16973 ! c 2 16975 3 *.f ! L 16975 ! c 2 16977 5 *.for ! L 16977 ! c 2 16979 5 *.fpp ! L 16979 ! c 2 1ef2c a extensions ! c 2 1ef2b 7 Fortran ! c 2 1ef2a 4 name ! c 2 1ee40 7 Fortran ! c 1 16983 ! c 0 1ef6f 4 ! c 2 1ef76 2 e3 ! c 2 1ef75 a defaultExe ! c 3 1ef78 1 ! c 2 16993 2 e3 ! L 16993 ! c 2 1ef77 b executables ! c 3 1ef73 2 ! c 2 1698b 3 *.H ! L 1698b ! c 2 1698d 3 *.h ! L 1698d ! c 2 1ef72 a extensions ! c 2 1ef71 6 Header ! c 2 1ef70 4 name ! c 2 1ee41 6 Header ! c 1 16997 ! c 0 1efad 4 ! c 2 1efb4 9 surfboard ! c 2 1efb3 a defaultExe ! c 3 1efb6 2 ! c 2 169a7 2 e3 ! L 169a7 ! c 2 169a9 9 surfboard ! L 169a9 ! c 2 1efb5 b executables ! c 3 1efb1 2 ! c 2 1699f 5 *.htm ! L 1699f ! c 2 169a1 6 *.html ! L 169a1 ! c 2 1efb0 a extensions ! c 2 1efaf 4 Html ! c 2 1efae 4 name ! c 2 1ee42 4 Html ! c 1 169ad ! c 0 1efef 4 ! c 2 1eff6 2 e3 ! c 2 1eff5 a defaultExe ! c 3 1eff8 1 ! c 2 169bb 2 e3 ! L 169bb ! c 2 1eff7 b executables ! c 3 1eff3 1 ! c 2 169b5 6 *.java ! L 169b5 ! c 2 1eff2 a extensions ! c 2 1eff1 4 Java ! c 2 1eff0 4 name ! c 2 1ee43 4 Java ! c 1 169bf ! c 0 1f029 4 ! c 2 1f030 2 e3 ! c 2 1f02f a defaultExe ! c 3 1f032 1 ! c 2 169cd 2 e3 ! L 169cd ! c 2 1f031 b executables ! c 3 1f02d 1 ! c 2 169c7 5 *.tex ! L 169c7 ! c 2 1f02c a extensions ! c 2 1f02b 5 Latex ! c 2 1f02a 4 name ! c 2 1ee44 5 Latex ! c 1 169d1 ! c 0 1f063 4 ! c 2 1f06a 2 e3 ! c 2 1f069 a defaultExe ! c 3 1f06c 1 ! c 2 169dc 2 e3 ! L 169dc ! c 2 1f06b b executables ! c 3 1f067 0 ! c 2 1f066 a extensions ! c 2 1f065 5 Other ! c 2 1f064 4 name ! c 2 1ee45 5 Other ! c 2 1ee3a a categories ! c 0 1ee47 1 ! C ProjectDir 4 169fd ! c 2 169fe 18 netscript2/docs/xmldom2/ 11 81 ! c 2 169ff 0 0 ! c 2 1ee49 18 netscript2/docs/xmldom2/ ! c 2 1ee46 b directories ! C DmBag 5 1edcd 2 ! c 2 1ee03 dd b ! C DmDictionary 0 1edcf 3 ! C DmString 1 1ede1 39 b ! C DmSet 0 18fdc 1 ! C DmString 1 19136 5 Other ! L 19136 ! c 1 1ede0 a categories ! c 1 1edd1 4 TODO ! c 1 1edd0 4 name ! C DmInteger 2 1ede3 80000001 ! c 1 1ede2 9 substMode ! c 2 1ee38 da b ! C DmDictionary 0 1ee04 3 ! C DmString 1 1ee16 38 b ! C DmSet 0 1a94e 1 ! C DmString 1 1aab3 4 Html ! L 1aab3 ! c 1 1ee15 a categories ! c 1 1ee06 9 TODO.html ! c 1 1ee05 4 name ! C DmInteger 2 1ee18 1 ! c 1 1ee17 9 substMode ! c 2 1ee39 5 files ! c 2 1edc9 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 1edc8 6 launch ! c 2 1edc5 4 make ! c 2 1edc4 4 make ! c 2 1edc7 0 ! c 2 1edc6 8 makeFile ! c 5 1edca 0 ! c 2 1edcc 7 modules ! c 2 1edc3 7 xmldom2 ! c 2 1edc2 4 name --- 1,215 ---- b ! C DmDictionary 0 1a7d8 8 ! c 0 1a8bc 9 ! C Category 1 4339 ! c 0 1a8f0 4 ! C DmString 2 1a8f7 2 e3 ! c 2 1a8f6 a defaultExe ! C DmSet 3 1a8f9 1 ! c 2 4348 2 e3 ! L 4348 ! c 2 1a8f8 b executables ! c 3 1a8f4 3 ! c 2 434f 3 *.C ! L 434f ! c 2 4352 4 *.cc ! L 4352 ! c 2 4355 5 *.cpp ! L 4355 ! c 2 1a8f3 a extensions ! c 2 1a8f2 a CPP_source ! c 2 1a8f1 4 name ! c 2 1a8be a CPP_source ! c 1 436a ! c 0 1a936 4 ! c 2 1a93d 2 e3 ! c 2 1a93c a defaultExe ! c 3 1a93f 1 ! c 2 4377 2 e3 ! L 4377 ! c 2 1a93e b executables ! c 3 1a93a 1 ! c 2 437e 3 *.c ! L 437e ! c 2 1a939 a extensions ! c 2 1a938 8 C_source ! c 2 1a937 4 name ! c 2 1a8bf 8 C_source ! c 1 4393 ! c 0 1a970 4 ! c 2 1a977 2 e3 ! c 2 1a976 a defaultExe ! c 3 1a979 1 ! c 2 43a0 2 e3 ! L 43a0 ! c 2 1a978 b executables ! c 3 1a974 1 ! c 2 43a7 3 *.e ! L 43a7 ! c 2 1a973 a extensions ! c 2 1a972 6 Eiffel ! c 2 1a971 4 name ! c 2 1a8c0 6 Eiffel ! c 1 43bc ! c 0 1a9aa 4 ! c 2 1a9b1 2 e3 ! c 2 1a9b0 a defaultExe ! c 3 1a9b3 1 ! c 2 43c9 2 e3 ! L 43c9 ! c 2 1a9b2 b executables ! c 3 1a9ae 4 ! c 2 43d0 3 *.F ! L 43d0 ! c 2 43d3 3 *.f ! L 43d3 ! c 2 43d6 5 *.for ! L 43d6 ! c 2 43d9 5 *.fpp ! L 43d9 ! c 2 1a9ad a extensions ! c 2 1a9ac 7 Fortran ! c 2 1a9ab 4 name ! c 2 1a8c1 7 Fortran ! c 1 43ee ! c 0 1a9f0 4 ! c 2 1a9f7 2 e3 ! c 2 1a9f6 a defaultExe ! c 3 1a9f9 1 ! c 2 43fb 2 e3 ! L 43fb ! c 2 1a9f8 b executables ! c 3 1a9f4 2 ! c 2 4402 3 *.H ! L 4402 ! c 2 4405 3 *.h ! L 4405 ! c 2 1a9f3 a extensions ! c 2 1a9f2 6 Header ! c 2 1a9f1 4 name ! c 2 1a8c2 6 Header ! c 1 441a ! c 0 1aa2e 4 ! c 2 1aa35 9 surfboard ! c 2 1aa34 a defaultExe ! c 3 1aa37 2 ! c 2 4427 2 e3 ! L 4427 ! c 2 442a 9 surfboard ! L 442a ! c 2 1aa36 b executables ! c 3 1aa32 2 ! c 2 4431 5 *.htm ! L 4431 ! c 2 4434 6 *.html ! L 4434 ! c 2 1aa31 a extensions ! c 2 1aa30 4 Html ! c 2 1aa2f 4 name ! c 2 1a8c3 4 Html ! c 1 4449 ! c 0 1aa70 4 ! c 2 1aa77 2 e3 ! c 2 1aa76 a defaultExe ! c 3 1aa79 1 ! c 2 4456 2 e3 ! L 4456 ! c 2 1aa78 b executables ! c 3 1aa74 1 ! c 2 445d 6 *.java ! L 445d ! c 2 1aa73 a extensions ! c 2 1aa72 4 Java ! c 2 1aa71 4 name ! c 2 1a8c4 4 Java ! c 1 4472 ! c 0 1aaaa 4 ! c 2 1aab1 2 e3 ! c 2 1aab0 a defaultExe ! c 3 1aab3 1 ! c 2 447f 2 e3 ! L 447f ! c 2 1aab2 b executables ! c 3 1aaae 1 ! c 2 4486 5 *.tex ! L 4486 ! c 2 1aaad a extensions ! c 2 1aaac 5 Latex ! c 2 1aaab 4 name ! c 2 1a8c5 5 Latex ! c 1 449b ! c 0 1aae4 4 ! c 2 1aaeb 2 e3 ! c 2 1aaea a defaultExe ! c 3 1aaed 1 ! c 2 44a8 2 e3 ! L 44a8 ! c 2 1aaec b executables ! c 3 1aae8 0 ! c 2 1aae7 a extensions ! c 2 1aae6 5 Other ! c 2 1aae5 4 name ! c 2 1a8c6 5 Other ! c 2 1a8bb a categories ! c 0 1a8c8 1 ! C ProjectDir 4 44c5 ! c 2 44c6 18 netscript2/docs/xmldom2/ 11 81 ! c 2 44c7 0 0 ! c 2 1a8ca 18 netscript2/docs/xmldom2/ ! c 2 1a8c7 b directories ! C DmBag 5 1a7e4 4 ! c 2 1a81a db b ! C DmDictionary 0 1a7e6 3 ! C DmString 1 1a7f8 39 b ! C DmSet 0 18d22 1 ! C DmString 1 18e7c 5 Other ! L 18e7c ! c 1 1a7f7 a categories ! c 1 1a7e8 9 CHANGELOG ! c 1 1a7e7 4 name ! C DmInteger 2 1a7fa 1 ! c 1 1a7f9 9 substMode ! c 2 1a84f df b ! C DmDictionary 0 1a81b 3 ! C DmString 1 1a82d 38 b ! C DmSet 0 1a66f 1 ! C DmString 1 1a7d4 4 Html ! L 1a7d4 ! c 1 1a82c a categories ! c 1 1a81d e CHANGELOG.html ! c 1 1a81c 4 name ! C DmInteger 2 1a82f 1 ! c 1 1a82e 9 substMode ! c 2 1a884 da b ! C DmDictionary 0 1a850 3 ! C DmString 1 1a862 36 b ! C DmSet 0 44fd 1 ! C DmString 1 452b 5 Other ! L 452b ! c 1 1a861 a categories ! c 1 1a852 4 TODO ! c 1 1a851 4 name ! C DmInteger 2 1a864 80000001 ! c 1 1a863 9 substMode ! c 2 1a8b9 d7 b ! C DmDictionary 0 1a885 3 ! C DmString 1 1a897 35 b ! C DmSet 0 453c 1 ! C DmString 1 456a 4 Html ! L 456a ! c 1 1a896 a categories ! c 1 1a887 9 TODO.html ! c 1 1a886 4 name ! C DmInteger 2 1a899 1 ! c 1 1a898 9 substMode ! c 2 1a8ba 5 files ! c 2 1a7e0 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 1a7df 6 launch ! c 2 1a7dc 4 make ! c 2 1a7db 4 make ! c 2 1a7de 0 ! c 2 1a7dd 8 makeFile ! c 5 1a7e1 0 ! c 2 1a7e3 7 modules ! c 2 1a7da 7 xmldom2 ! c 2 1a7d9 4 name |
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv1943 Modified Files: Attr.pm CDATASection.pm CharacterData.pm Comment.pm DOMException.pm DOMImplementation.pm DOMParser.pm DOMParserStyle.pm DOMWriter.pm DOMWriterStyle.pm Document.pm DocumentFragment.pm DocumentType.pm Element.pm Entity.pm EntityReference.pm NamedNodeMap.pm Node.pm NodeList.pm Notation.pm ProcessingInstruction.pm Text.pm XMLDOMWriterStyle.pm Log Message: Index: Attr.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Attr.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Attr.pm 11 May 2002 13:10:23 -0000 1.6 --- Attr.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Attr # $Id$ # --- 1,4 ---- *************** *** 13,23 **** use base qw(XML::DOM2::Node); - use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; --- 12,17 ---- *************** *** 75,80 **** # that an XML processor would recognize as markup are instead treated # as literal text. ! # @param (optional) a hash reference containing the following key-value-pairs ! # value - the new value of the string. # @return the value of this attribute. #*/ --- 69,74 ---- # that an XML processor would recognize as markup are instead treated # as literal text. ! # @optional a hash reference containing the following key-value-pairs ! # <ul><li>value - the new value of the string.</li></ul> # @return the value of this attribute. #*/ *************** *** 182,186 **** if ( $deep ) { my $children = $this -> childNodes(); ! for ( 0..$children -> length() - 1 ) { $newNode -> appendChild( { newChild => $children -> --- 176,181 ---- if ( $deep ) { my $children = $this -> childNodes(); ! my $len = $children -> length() - 1; ! for ( 0.. $len ) { $newNode -> appendChild( { newChild => $children -> *************** *** 201,203 **** } ! --- 196,198 ---- } ! 1; # make require happy Index: CDATASection.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CDATASection.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CDATASection.pm 11 May 2002 13:10:23 -0000 1.6 --- CDATASection.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class CDATASection # $Id$ # --- 1,4 ---- *************** *** 16,24 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 15,18 ---- *************** *** 43,47 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 37,41 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 54,58 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 48,52 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 65,69 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 59,63 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 77,81 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 71,75 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 108,109 **** --- 102,105 ---- $newNode; } + + 1; # make require happy Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CharacterData.pm 11 May 2002 13:10:23 -0000 1.6 --- CharacterData.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class CharacterData # $Id$ # --- 1,4 ---- *************** *** 13,26 **** use base qw(XML::DOM2::Node); - use XML::DOM2::DOMException; #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 12,18 ---- *************** *** 85,89 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 77,81 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 125,129 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 117,121 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 153,157 **** if ($offset < 0 || $offset > $this -> length() ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") --- 145,149 ---- if ($offset < 0 || $offset > $this -> length() ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") *************** *** 183,187 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 175,179 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 198,199 **** --- 190,192 ---- } + 1; # make require happy Index: Comment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Comment.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Comment.pm 11 May 2002 13:10:23 -0000 1.6 --- Comment.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Comment # $Id$ # --- 1,4 ---- *************** *** 16,23 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; --- 15,18 ---- *************** *** 43,47 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 38,42 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 54,58 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 49,53 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 65,69 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 60,64 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 77,81 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 72,76 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 109,110 **** --- 104,107 ---- $newNode; } + + 1; # make require happy Index: DOMException.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMException.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DOMException.pm 11 May 2002 13:10:23 -0000 1.8 --- DOMException.pm 2 Jun 2002 19:37:40 -0000 1.9 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMException # $Id$ # --- 1,4 ---- *************** *** 17,21 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 16,20 ---- # Globals #-------------------------------------------------------- ! #-------------------------------------------------------- *************** *** 23,41 **** #-------------------------------------------------------- ! sub INDEX_SIZE_ERR { 1; } ! sub DOMSTRING_SIZE_ERR { 2; } ! sub HIERARCHY_REQUEST_ERR { 3; } ! sub WRONG_DOCUMENT_ERR { 4; } ! sub INVALID_CHARACTER_ERR { 5; } ! sub NO_DATA_ALLOWED_ERR { 6; } ! sub NO_MODIFICATION_ALLOWED_ERR { 7; } ! sub NOT_FOUND_ERR { 8; } ! sub NOT_SUPPORTED_ERR { 9; } ! sub INUSE_ATTRIBUTE_ERR { 10; } ! sub INVALID_STATE_ERR { 11; } ! sub SYNTAX_ERR { 12; } ! sub INVALID_MODIFICATION_ERR { 13; } ! sub NAMESPACE_ERR { 14; } ! sub INVALID_ACCESS_ERR { 15; } #-------------------------------------------------------- --- 22,46 ---- #-------------------------------------------------------- ! use vars qw( $INDEX_SIZE_ERR $DOMSTRING_SIZE_ERR $HIERARCHY_REQUEST_ERR ! $WRONG_DOCUMENT_ERR $INVALID_CHARACTER_ERR $NO_DATA_ALLOWED_ERR ! $NO_MODIFICATION_ALLOWED_ERR $NOT_FOUND_ERR $NOT_SUPPORTED_ERR ! $INUSE_ATTRIBUTE_ERR $INVALID_STATE_ERR $SYNTAX_ERR ! $INVALID_MODIFICATION_ERR $NAMESPACE_ERR $INVALID_ACCESS_ERR ); ! ! $INDEX_SIZE_ERR = 1; ! $DOMSTRING_SIZE_ERR = 2; ! $HIERARCHY_REQUEST_ERR = 3; ! $WRONG_DOCUMENT_ERR = 4; ! $INVALID_CHARACTER_ERR = 5; ! $NO_DATA_ALLOWED_ERR = 6; ! $NO_MODIFICATION_ALLOWED_ERR = 7; ! $NOT_FOUND_ERR = 8; ! $NOT_SUPPORTED_ERR = 9; ! $INUSE_ATTRIBUTE_ERR = 10; ! $INVALID_STATE_ERR = 11; ! $SYNTAX_ERR = 12; ! $INVALID_MODIFICATION_ERR = 13; ! $NAMESPACE_ERR = 14; ! $INVALID_ACCESS_ERR = 15; #-------------------------------------------------------- *************** *** 97,143 **** } ! if ($errCode == &DOMSTRING_SIZE_ERR) { return "The specified range of text does not fit into a DOMString."; } ! if ($errCode == &HIERARCHY_REQUEST_ERR ) { return "A node was inserted where it does not belong."; } ! if ($errCode == &INDEX_SIZE_ERR ) { return "Index or size is negative or greater than the allowed value."; } ! if ($errCode == &INUSE_ATTRIBUTE_ERR ) { return "An attempt was made to add an attribute that is already in use."; } ! if ($errCode == &INVALID_ACCESS_ERR ) { return "A parameter or an operation is not supported by the object."; } ! if ($errCode == &INVALID_CHARACTER_ERR ) { return "An invalid or illegal character was specified."; } ! if ($errCode == &INVALID_MODIFICATION_ERR ) { return "An attempt was made to modify the type of an underlying object."; } ! if ($errCode == &INVALID_STATE_ERR ) { return "An attempt was made to use an object that is not or no longer useable."; } ! if ($errCode == &NAMESPACE_ERR ) { return "An attempt was made to change or create an object in a way that is incorrect with regard to namespaces."; } ! if ($errCode == &NOT_FOUND_ERR ) { return "An attempt was made to reference a node in a context where it does not exist."; } ! if ($errCode == &NOT_SUPPORTED_ERR ) { return "The requested type or operation is not (yet) supported."; } ! if ($errCode == &NO_DATA_ALLOWED_ERR ) { return "Data was specified for a node which does not support data."; } ! if ($errCode == &NO_MODIFICATION_ALLOWED_ERR ) { return "An attempt was made to modify an object where no modification is allowed."; } ! if ($errCode == &SYNTAX_ERR ) { return "An invalid or illegal string was specified."; } ! if ($errCode == &WRONG_DOCUMENT_ERR ) { return "A node is used in a different document than the one that created it."; } --- 102,148 ---- } ! if ($errCode == $DOMSTRING_SIZE_ERR) { return "The specified range of text does not fit into a DOMString."; } ! if ($errCode == $HIERARCHY_REQUEST_ERR ) { return "A node was inserted where it does not belong."; } ! if ($errCode == $INDEX_SIZE_ERR ) { return "Index or size is negative or greater than the allowed value."; } ! if ($errCode == $INUSE_ATTRIBUTE_ERR ) { return "An attempt was made to add an attribute that is already in use."; } ! if ($errCode == $INVALID_ACCESS_ERR ) { return "A parameter or an operation is not supported by the object."; } ! if ($errCode == $INVALID_CHARACTER_ERR ) { return "An invalid or illegal character was specified."; } ! if ($errCode == $INVALID_MODIFICATION_ERR ) { return "An attempt was made to modify the type of an underlying object."; } ! if ($errCode == $INVALID_STATE_ERR ) { return "An attempt was made to use an object that is not or no longer useable."; } ! if ($errCode == $NAMESPACE_ERR ) { return "An attempt was made to change or create an object in a way that is incorrect with regard to namespaces."; } ! if ($errCode == $NOT_FOUND_ERR ) { return "An attempt was made to reference a node in a context where it does not exist."; } ! if ($errCode == $NOT_SUPPORTED_ERR ) { return "The requested type or operation is not (yet) supported."; } ! if ($errCode == $NO_DATA_ALLOWED_ERR ) { return "Data was specified for a node which does not support data."; } ! if ($errCode == $NO_MODIFICATION_ALLOWED_ERR ) { return "An attempt was made to modify an object where no modification is allowed."; } ! if ($errCode == $SYNTAX_ERR ) { return "An invalid or illegal string was specified."; } ! if ($errCode == $WRONG_DOCUMENT_ERR ) { return "A node is used in a different document than the one that created it."; } Index: DOMImplementation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMImplementation.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DOMImplementation.pm 11 May 2002 13:10:23 -0000 1.6 --- DOMImplementation.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMImplementation # $Id$ # --- 1,4 ---- *************** *** 15,22 **** use XML::DOM2::DOMException; use XML::DOM2::DocumentType; ! #-------------------------------------------------------- ! # Globals ! #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 14,18 ---- use XML::DOM2::DOMException; use XML::DOM2::DocumentType; ! #-------------------------------------------------------- *************** *** 100,104 **** if ( defined($doctype -> ownerDocument()) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The specified Doctype has been used with another document!" }); --- 96,100 ---- if ( defined($doctype -> ownerDocument()) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The specified Doctype has been used with another document!" }); *************** *** 120,124 **** } ! --- 116,120 ---- } ! 1; # make require happy Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DOMParser.pm 11 May 2002 13:10:23 -0000 1.4 --- DOMParser.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMParser # $Id$ # --- 1,4 ---- *************** *** 19,28 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 18,21 ---- *************** *** 59,62 **** --- 52,70 ---- $this -> { m_contextElement } = undef; $this -> { m_document } = undef; + + + # create new document + $this -> { m_document } = + $this -> { m_DOMImplementation } -> createDocument( { + qualifiedName => "dummy", + namespaceURI => "dummy" + } ); + + # remove the dummy element. + my $docEl = $this -> { m_document } -> documentElement(); + $this -> { m_document } -> removeChild( { oldChild => $docEl } ); + + $this -> { m_contextElement } = $this -> { m_document }; + return $this; } *************** *** 131,154 **** my $prefix = $prefixMap{$namespaceURI}; ! if ( !defined( $this -> { m_document } ) ) { ! # create new document ! $this -> { m_document } = ! $this -> { m_DOMImplementation } -> createDocument( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get the root node ! $elementNode = $this -> { m_document } -> documentElement(); ! } ! else { ! $elementNode = $this -> { m_document } -> createElementNS( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get currently innermost open Element. ! # and append this element to it. ! my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( { newChild => $elementNode } ); ! } # add any attributes while( @attrList ) { --- 139,151 ---- my $prefix = $prefixMap{$namespaceURI}; ! $elementNode = $this -> { m_document } -> createElementNS( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get currently innermost open Element. ! # and append this element to it. ! my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( { newChild => $elementNode } ); ! # add any attributes while( @attrList ) { *************** *** 241,245 **** # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => XML::DOM2::DOMException -> ERR_NOT_SUPPORTED(), ErrDesc => "The DOMParser currently does not support CDATA sections." }); --- 238,242 ---- # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ErrDesc => "The DOMParser currently does not support CDATA sections." }); *************** *** 255,259 **** # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => XML::DOM2::DOMException -> ERR_NOT_SUPPORTED(), ErrDesc => "The DOMParser currently does not support CDATA sections." }); --- 252,256 ---- # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ErrDesc => "The DOMParser currently does not support CDATA sections." }); *************** *** 318,319 **** --- 315,317 ---- } + 1; # make require happy Index: DOMParserStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParserStyle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DOMParserStyle.pm 11 May 2002 13:10:23 -0000 1.4 --- DOMParserStyle.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMParserStyle # $Id$ # --- 1,4 ---- *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! Index: DOMWriter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriter.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMWriter.pm 11 May 2002 13:10:23 -0000 1.3 --- DOMWriter.pm 2 Jun 2002 19:37:40 -0000 1.4 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMWriter # $Id$ # --- 1,4 ---- *************** *** 15,23 **** use XML::DOM2::Node; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 14,17 ---- *************** *** 108,111 **** } ! --- 102,105 ---- } ! 1; # make require happy Index: DOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriterStyle.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.2 --- DOMWriterStyle.pm 2 Jun 2002 19:37:40 -0000 1.3 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMWriterStyle # $Id$ # --- 1,4 ---- *************** *** 14,23 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 13,16 ---- *************** *** 110,112 **** } ! --- 103,105 ---- } ! 1; # make require happy Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Document.pm 11 May 2002 13:10:23 -0000 1.7 --- Document.pm 2 Jun 2002 19:37:40 -0000 1.8 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Document # $Id$ # --- 1,4 ---- *************** *** 25,33 **** - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 24,27 ---- *************** *** 125,129 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 119,123 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 136,140 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 130,134 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 146,150 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 140,144 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 246,250 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef->{ qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 240,244 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef->{ qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 257,261 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 251,255 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 267,271 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 261,265 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 457,461 **** if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot append." --- 451,455 ---- if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot append." *************** *** 489,493 **** if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot insert." --- 483,487 ---- if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot insert." *************** *** 512,514 **** } ! --- 506,508 ---- } ! 1; # make require happy Index: DocumentFragment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentFragment.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocumentFragment.pm 11 May 2002 13:10:23 -0000 1.4 --- DocumentFragment.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DocumentFragment # $Id$ # --- 1,4 ---- *************** *** 17,26 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 16,19 ---- *************** *** 58,60 **** $newNode; } ! --- 51,53 ---- $newNode; } ! 1; # make require happy Index: DocumentType.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentType.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocumentType.pm 11 May 2002 13:10:23 -0000 1.4 --- DocumentType.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DocumentType # $Id$ # --- 1,4 ---- *************** *** 18,27 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 17,20 ---- *************** *** 113,115 **** --- 106,109 ---- } + 1; # make require happy Index: Element.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Element.pm 11 May 2002 13:10:23 -0000 1.7 --- Element.pm 2 Jun 2002 19:37:40 -0000 1.8 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Element # $Id$ # --- 1,4 ---- *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 20,24 ---- # Globals #-------------------------------------------------------- ! *************** *** 171,175 **** # first search all own children. my $children = $this -> childNodes(); ! my $length -> $children -> length(); for ( 0..$length-1 ) { --- 170,174 ---- # first search all own children. my $children = $this -> childNodes(); ! my $length = $children -> length(); for ( 0..$length-1 ) { *************** *** 218,222 **** # first search all own children. my $children = $this -> childNodes(); ! my $length -> $children -> length(); for ( 0..$length-1 ) { --- 217,221 ---- # first search all own children. my $children = $this -> childNodes(); ! my $length = $children -> length(); for ( 0..$length-1 ) { *************** *** 326,330 **** else { my $exc = XML::DOM2::DOMException( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The attribute is no attribute of this element!" }); --- 325,329 ---- else { my $exc = XML::DOM2::DOMException( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The attribute is no attribute of this element!" }); *************** *** 387,391 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 386,390 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 398,402 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 397,401 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 408,412 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 407,411 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 444,448 **** if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The Attribute you were trying to add was created with a different document!" }); --- 443,447 ---- if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The Attribute you were trying to add was created with a different document!" }); *************** *** 453,457 **** my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => XML::DOM2::DOMException -> INUSE_ATTRIBUTE_ERR(), ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) --- 452,456 ---- my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => $XML::DOM2::DOMException::INUSE_ATTRIBUTE_ERR, ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) *************** *** 482,486 **** if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The Attribute you were trying to add was created with a different document!" }); --- 481,485 ---- if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The Attribute you were trying to add was created with a different document!" }); *************** *** 491,495 **** my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => XML::DOM2::DOMException -> INUSE_ATTRIBUTE_ERR(), ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) --- 490,494 ---- my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => $XML::DOM2::DOMException::INUSE_ATTRIBUTE_ERR, ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) *************** *** 566,570 **** #copy attributes my $attributes = $this -> attributes(); ! for ( 0..$attributes -> length() -1 ) { $newNode -> setAttributeNodeNS( { newAttr => $attributes -> item ( { index => $_ } ) -> cloneNode( { deep => 1 } ) --- 565,570 ---- #copy attributes my $attributes = $this -> attributes(); ! my $length = $attributes -> length() -1; ! for ( 0..$length ) { $newNode -> setAttributeNodeNS( { newAttr => $attributes -> item ( { index => $_ } ) -> cloneNode( { deep => 1 } ) *************** *** 575,579 **** if ( $deep ) { my $children = $this -> childNodes(); ! for ( 0..$children -> length() - 1 ) { $newNode -> appendChild( { newChild => $children -> --- 575,580 ---- if ( $deep ) { my $children = $this -> childNodes(); ! my $len = $children -> length() -1; ! for ( 0..$len ) { $newNode -> appendChild( { newChild => $children -> *************** *** 585,587 **** } ! --- 586,588 ---- } ! 1; # make require happy Index: Entity.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Entity.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Entity.pm 11 May 2002 13:10:23 -0000 1.4 --- Entity.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Entity # $Id$ # --- 1,4 ---- *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! Index: EntityReference.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/EntityReference.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EntityReference.pm 11 May 2002 13:10:23 -0000 1.4 --- EntityReference.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class EntityReference # $Id$ # --- 1,4 ---- *************** *** 16,24 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 15,18 ---- *************** *** 35,37 **** } ! --- 29,31 ---- } ! 1; # make require happy Index: NamedNodeMap.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NamedNodeMap.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NamedNodeMap.pm 11 May 2002 13:10:23 -0000 1.9 --- NamedNodeMap.pm 2 Jun 2002 19:37:40 -0000 1.10 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class NamedNodeMap # $Id$ # --- 1,4 ---- *************** *** 12,25 **** package XML::DOM2::NamedNodeMap; - - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - #-------------------------------------------------------- - # Constants - #-------------------------------------------------------- - #-------------------------------------------------------- # Methods --- 11,14 ---- *************** *** 198,200 **** $node -> localName() } = $node; } ! --- 187,189 ---- $node -> localName() } = $node; } ! 1; # make require happy Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Node.pm 11 May 2002 13:10:23 -0000 1.17 --- Node.pm 2 Jun 2002 19:37:40 -0000 1.18 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Node # $Id$ # --- 1,4 ---- *************** *** 12,16 **** # This class implements a DOM Node. Its the base class of most DOM # Interfaces. ! # @author Jan Thomä #*/ use strict; --- 11,15 ---- # This class implements a DOM Node. Its the base class of most DOM # Interfaces. ! # @author Jan Thomä (ko...@in...) #*/ use strict; *************** *** 20,43 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! our $ELEMENT_NODE = 1; ! our $ATTRIBUTE_NODE = 2; ! our $TEXT_NODE = 3; ! our $CDATA_SECTION_NODE = 4; ! our $ENTITY_REFERENCE_NODE = 5; ! our $ENTITY_NODE = 6; ! our $PROCESSING_INSTRUCTION_NODE = 7; ! our $COMMENT_NODE = 8; ! our $DOCUMENT_NODE = 9; ! our $DOCUMENT_TYPE_NODE = 10; ! our $DOCUMENT_FRAGMENT_NODE = 11; ! our $NOTATION_NODE = 12; #-------------------------------------------------------- --- 19,42 ---- #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! use vars qw( $ELEMENT_NODE $ATTRIBUTE_NODE $TEXT_NODE $CDATA_SECTION_NODE ! $ENTITY_REFERENCE_NODE $ENTITY_NODE $PROCESSING_INSTRUCTION_NODE ! $COMMENT_NODE $DOCUMENT_NODE $DOCUMENT_TYPE_NODE $DOCUMENT_FRAGMENT_NODE ! $NOTATION_NODE ); ! ! $ELEMENT_NODE = 1; ! $ATTRIBUTE_NODE = 2; ! $TEXT_NODE = 3; ! $CDATA_SECTION_NODE = 4; ! $ENTITY_REFERENCE_NODE = 5; ! $ENTITY_NODE = 6; ! $PROCESSING_INSTRUCTION_NODE = 7; ! $COMMENT_NODE = 8; ! $DOCUMENT_NODE = 9; ! $DOCUMENT_TYPE_NODE = 10; ! $DOCUMENT_FRAGMENT_NODE = 11; ! $NOTATION_NODE = 12; #-------------------------------------------------------- *************** *** 289,293 **** if ( ! defined( $namespaceURI ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The namespace URI of this node is UNDEF." } --- 288,292 ---- if ( ! defined( $namespaceURI ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The namespace URI of this node is UNDEF." } *************** *** 300,304 **** $this -> namespaceURI() ne "http://www.w3.org/XML/1998/namespace" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix \"xml\" can only be used, if the ". "namespace URI of this node is ". --- 299,303 ---- $this -> namespaceURI() ne "http://www.w3.org/XML/1998/namespace" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix \"xml\" can only be used, if the ". "namespace URI of this node is ". *************** *** 357,361 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 356,360 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 370,374 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot append." --- 369,373 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot append." *************** *** 426,430 **** sub cloneNode { my $exception = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NOT_SUPPORTED_ERR(), ErrDesc => "Cloning of this node type is not supported by this implementation." }); --- 425,429 ---- sub cloneNode { my $exception = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NOT_SUPPORTED_ERR, ErrDesc => "Cloning of this node type is not supported by this implementation." }); *************** *** 491,495 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 490,494 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 504,508 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot insert." --- 503,507 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot insert." *************** *** 518,522 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot insert." --- 517,521 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot insert." *************** *** 591,595 **** my ( $this ) = @_; my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_SUPPORTED_ERR(), ErrDesc => "Node normalization is not yet supported by this implementation." } --- 590,594 ---- my ( $this ) = @_; my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_SUPPORTED_ERR, ErrDesc => "Node normalization is not yet supported by this implementation." } *************** *** 620,624 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot remove." --- 619,623 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot remove." *************** *** 687,691 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 686,690 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 700,704 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot replace." --- 699,703 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot replace." *************** *** 714,718 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot replace." --- 713,717 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot replace." *************** *** 780,782 **** } ! --- 779,781 ---- } ! 1; # make require happy Index: NodeList.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NodeList.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NodeList.pm 11 May 2002 13:10:23 -0000 1.12 --- NodeList.pm 2 Jun 2002 19:37:40 -0000 1.13 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class NodeList # $Id$ # --- 1,4 ---- *************** *** 16,20 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 15,19 ---- # Globals #-------------------------------------------------------- ! #-------------------------------------------------------- *************** *** 60,66 **** my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => "The given index is not valid. ( 0 < ".$index." < ". $this -> length() ." )." --- 59,65 ---- my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } || $index eq "" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => "The given index is not valid. ( 0 < ".$index." < ". $this -> length() ." )." *************** *** 115,119 **** if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = X... [truncated message content] |
From: Jan T. <de...@us...> - 2002-06-02 19:31:48
|
Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Util In directory usw-pr-cvs1:/tmp/cvs-serv718/Util Modified Files: wipeout.project Log Message: * added library include facility * moved Wrappers to Engine * added emergency error page (if error page is missing) * changed configfilereader to be more generic * some performance improvements * overall bugfixing Index: wipeout.project =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Util/wipeout.project,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wipeout.project 29 May 2002 20:28:36 -0000 1.6 --- wipeout.project 2 Jun 2002 19:31:45 -0000 1.7 *************** *** 1,281 **** b ! C DmDictionary 0 d6a9 8 ! c 0 d8cb 9 ! C Category 1 5e94 ! c 0 d90b 4 ! C DmString 2 d912 2 e3 ! c 2 d911 a defaultExe ! C DmSet 3 d914 1 ! c 2 5ea3 2 e3 ! L 5ea3 ! c 2 d913 b executables ! c 3 d90f 3 ! c 2 5eaa 3 *.C ! L 5eaa ! c 2 5ead 4 *.cc ! L 5ead ! c 2 5eb0 5 *.cpp ! L 5eb0 ! c 2 d90e a extensions ! c 2 d90d a CPP_source ! c 2 d90c 4 name ! c 2 d8cd a CPP_source ! c 1 5ec5 ! c 0 d951 4 ! c 2 d958 2 e3 ! c 2 d957 a defaultExe ! c 3 d95a 1 ! c 2 5ed2 2 e3 ! L 5ed2 ! c 2 d959 b executables ! c 3 d955 1 ! c 2 5ed9 3 *.c ! L 5ed9 ! c 2 d954 a extensions ! c 2 d953 8 C_source ! c 2 d952 4 name ! c 2 d8ce 8 C_source ! c 1 5eee ! c 0 d98b 4 ! c 2 d992 2 e3 ! c 2 d991 a defaultExe ! c 3 d994 1 ! c 2 5efb 2 e3 ! L 5efb ! c 2 d993 b executables ! c 3 d98f 1 ! c 2 5f02 3 *.e ! L 5f02 ! c 2 d98e a extensions ! c 2 d98d 6 Eiffel ! c 2 d98c 4 name ! c 2 d8cf 6 Eiffel ! c 1 5f17 ! c 0 d9c5 4 ! c 2 d9cc 2 e3 ! c 2 d9cb a defaultExe ! c 3 d9ce 1 ! c 2 5f24 2 e3 ! L 5f24 ! c 2 d9cd b executables ! c 3 d9c9 4 ! c 2 5f2b 3 *.F ! L 5f2b ! c 2 5f2e 3 *.f ! L 5f2e ! c 2 5f31 5 *.for ! L 5f31 ! c 2 5f34 5 *.fpp ! L 5f34 ! c 2 d9c8 a extensions ! c 2 d9c7 7 Fortran ! c 2 d9c6 4 name ! c 2 d8d0 7 Fortran ! c 1 5f49 ! c 0 da0b 4 ! c 2 da12 2 e3 ! c 2 da11 a defaultExe ! c 3 da14 1 ! c 2 5f56 2 e3 ! L 5f56 ! c 2 da13 b executables ! c 3 da0f 2 ! c 2 5f5d 3 *.H ! L 5f5d ! c 2 5f60 3 *.h ! L 5f60 ! c 2 da0e a extensions ! c 2 da0d 6 Header ! c 2 da0c 4 name ! c 2 d8d1 6 Header ! c 1 5f75 ! c 0 da49 4 ! c 2 da50 9 surfboard ! c 2 da4f a defaultExe ! c 3 da52 2 ! c 2 5f82 2 e3 ! L 5f82 ! c 2 5f85 9 surfboard ! L 5f85 ! c 2 da51 b executables ! c 3 da4d 2 ! c 2 5f8c 5 *.htm ! L 5f8c ! c 2 5f8f 6 *.html ! L 5f8f ! c 2 da4c a extensions ! c 2 da4b 4 Html ! c 2 da4a 4 name ! c 2 d8d2 4 Html ! c 1 5fa4 ! c 0 da8b 4 ! c 2 da92 2 e3 ! c 2 da91 a defaultExe ! c 3 da94 1 ! c 2 5fb1 2 e3 ! L 5fb1 ! c 2 da93 b executables ! c 3 da8f 1 ! c 2 5fb8 6 *.java ! L 5fb8 ! c 2 da8e a extensions ! c 2 da8d 4 Java ! c 2 da8c 4 name ! c 2 d8d3 4 Java ! c 1 5fcd ! c 0 dac5 4 ! c 2 dacc 2 e3 ! c 2 dacb a defaultExe ! c 3 dace 1 ! c 2 5fda 2 e3 ! L 5fda ! c 2 dacd b executables ! c 3 dac9 1 ! c 2 5fe1 5 *.tex ! L 5fe1 ! c 2 dac8 a extensions ! c 2 dac7 5 Latex ! c 2 dac6 4 name ! c 2 d8d4 5 Latex ! c 1 5ff6 ! c 0 daff 4 ! c 2 db06 2 e3 ! c 2 db05 a defaultExe ! c 3 db08 1 ! c 2 6003 2 e3 ! L 6003 ! c 2 db07 b executables ! c 3 db03 0 ! c 2 db02 a extensions ! c 2 db01 5 Other ! c 2 db00 4 name ! c 2 d8d5 5 Other ! c 2 d8ca a categories ! c 0 d8d7 1 ! C ProjectDir 4 6020 ! c 2 6021 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 6022 0 0 ! c 2 d8d9 23 netscript2/src/perl/NetScript/Util/ ! c 2 d8d6 b directories ! C DmBag 5 d6b5 a ! c 2 d6eb d7 b ! C DmDictionary 0 d6b7 3 ! C DmString 1 d6c9 36 b ! C DmSet 0 c13b 1 ! C DmString 1 c2b5 5 Other ! L c2b5 ! c 1 d6c8 a categories ! c 1 d6b9 f ClassWrapper.pm ! c 1 d6b8 4 name ! C DmInteger 2 d6cb 1 ! c 1 d6ca 9 substMode ! c 2 d720 dc b ! C DmDictionary 0 d6ec 3 ! C DmString 1 d6fe 36 b ! C DmSet 0 6062 1 ! C DmString 1 6090 5 Other ! L 6090 ! c 1 d6fd a categories ! c 1 d6ee 13 ConfigFileParser.pm ! c 1 d6ed 4 name ! C DmInteger 2 d700 1 ! c 1 d6ff 9 substMode ! c 2 d755 df b ! C DmDictionary 0 d721 3 ! C DmString 1 d733 36 b ! C DmSet 0 60a1 1 ! C DmString 1 60cf 5 Other ! L 60cf ! c 1 d732 a categories ! c 1 d723 16 ConfigurationParser.pm ! c 1 d722 4 name ! C DmInteger 2 d735 1 ! c 1 d734 9 substMode ! c 2 d78a d9 b ! C DmDictionary 0 d756 3 ! C DmString 1 d768 36 b ! C DmSet 0 60e0 1 ! C DmString 1 610e 5 Other ! L 610e ! c 1 d767 a categories ! c 1 d758 10 FileRetriever.pm ! c 1 d757 4 name ! C DmInteger 2 d76a 1 ! c 1 d769 9 substMode ! c 2 d7bf db b ! C DmDictionary 0 d78b 3 ! C DmString 1 d79d 36 b ! C DmSet 0 cb13 1 ! C DmString 1 cc8d 5 Other ! L cc8d ! c 1 d79c a categories ! c 1 d78d 12 FunctionWrapper.pm ! c 1 d78c 4 name ! C DmInteger 2 d79f 1 ! c 1 d79e 9 substMode ! c 2 d7f4 d9 b ! C DmDictionary 0 d7c0 3 ! C DmString 1 d7d2 36 b ! C DmSet 0 d524 1 ! C DmString 1 d69e 5 Other ! L d69e ! c 1 d7d1 a categories ! c 1 d7c2 10 MemberWrapper.pm ! c 1 d7c1 4 name ! C DmInteger 2 d7d4 1 ! c 1 d7d3 9 substMode ! c 2 d829 dd b ! C DmDictionary 0 d7f5 3 ! C DmString 1 d807 36 b ! C DmSet 0 611f 1 ! C DmString 1 614d 5 Other ! L 614d ! c 1 d806 a categories ! c 1 d7f7 14 ObjectParserStyle.pm ! c 1 d7f6 4 name ! C DmInteger 2 d809 1 ! c 1 d808 9 substMode ! c 2 d85e de b ! C DmDictionary 0 d82a 3 ! C DmString 1 d83c 36 b ! C DmSet 0 615e 1 ! C DmString 1 618c 5 Other ! L 618c ! c 1 d83b a categories ! c 1 d82c 15 PropertyFileParser.pm ! c 1 d82b 4 name ! C DmInteger 2 d83e 1 ! c 1 d83d 9 substMode ! c 2 d893 d7 b ! C DmDictionary 0 d85f 3 ! C DmString 1 d871 36 b ! C DmSet 0 619d 1 ! C DmString 1 61cb 5 Other ! L 61cb ! c 1 d870 a categories ! c 1 d861 f UIDGenerator.pm ! c 1 d860 4 name ! C DmInteger 2 d873 1 ! c 1 d872 9 substMode ! c 2 d8c8 da b ! C DmDictionary 0 d894 3 ! C DmString 1 d8a6 36 b ! C DmSet 0 61dc 1 ! C DmString 1 620a 5 Other ! L 620a ! c 1 d8a5 a categories ! c 1 d896 11 XMLParserRelay.pm ! c 1 d895 4 name ! C DmInteger 2 d8a8 1 ! c 1 d8a7 9 substMode ! c 2 d8c9 5 files ! c 2 d6b1 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 d6b0 6 launch ! c 2 d6ad 4 make ! c 2 d6ac 4 make ! c 2 d6af 0 ! c 2 d6ae 8 makeFile ! c 5 d6b2 0 ! c 2 d6b4 7 modules ! c 2 d6ab 4 Util ! c 2 d6aa 4 name --- 1,281 ---- b ! C DmDictionary 0 2ffe8 8 ! c 0 3020a 9 ! C Category 1 6fef ! c 0 3024a 4 ! C DmString 2 30251 2 e3 ! c 2 30250 a defaultExe ! C DmSet 3 30253 1 ! c 2 6ffe 2 e3 ! L 6ffe ! c 2 30252 b executables ! c 3 3024e 3 ! c 2 7005 3 *.C ! L 7005 ! c 2 7008 4 *.cc ! L 7008 ! c 2 700b 5 *.cpp ! L 700b ! c 2 3024d a extensions ! c 2 3024c a CPP_source ! c 2 3024b 4 name ! c 2 3020c a CPP_source ! c 1 7020 ! c 0 30290 4 ! c 2 30297 2 e3 ! c 2 30296 a defaultExe ! c 3 30299 1 ! c 2 702d 2 e3 ! L 702d ! c 2 30298 b executables ! c 3 30294 1 ! c 2 7034 3 *.c ! L 7034 ! c 2 30293 a extensions ! c 2 30292 8 C_source ! c 2 30291 4 name ! c 2 3020d 8 C_source ! c 1 7049 ! c 0 302ca 4 ! c 2 302d1 2 e3 ! c 2 302d0 a defaultExe ! c 3 302d3 1 ! c 2 7056 2 e3 ! L 7056 ! c 2 302d2 b executables ! c 3 302ce 1 ! c 2 705d 3 *.e ! L 705d ! c 2 302cd a extensions ! c 2 302cc 6 Eiffel ! c 2 302cb 4 name ! c 2 3020e 6 Eiffel ! c 1 7072 ! c 0 30304 4 ! c 2 3030b 2 e3 ! c 2 3030a a defaultExe ! c 3 3030d 1 ! c 2 707f 2 e3 ! L 707f ! c 2 3030c b executables ! c 3 30308 4 ! c 2 7086 3 *.F ! L 7086 ! c 2 7089 3 *.f ! L 7089 ! c 2 708c 5 *.for ! L 708c ! c 2 708f 5 *.fpp ! L 708f ! c 2 30307 a extensions ! c 2 30306 7 Fortran ! c 2 30305 4 name ! c 2 3020f 7 Fortran ! c 1 70a4 ! c 0 3034a 4 ! c 2 30351 2 e3 ! c 2 30350 a defaultExe ! c 3 30353 1 ! c 2 70b1 2 e3 ! L 70b1 ! c 2 30352 b executables ! c 3 3034e 2 ! c 2 70b8 3 *.H ! L 70b8 ! c 2 70bb 3 *.h ! L 70bb ! c 2 3034d a extensions ! c 2 3034c 6 Header ! c 2 3034b 4 name ! c 2 30210 6 Header ! c 1 70d0 ! c 0 30388 4 ! c 2 3038f 9 surfboard ! c 2 3038e a defaultExe ! c 3 30391 2 ! c 2 70dd 2 e3 ! L 70dd ! c 2 70e0 9 surfboard ! L 70e0 ! c 2 30390 b executables ! c 3 3038c 2 ! c 2 70e7 5 *.htm ! L 70e7 ! c 2 70ea 6 *.html ! L 70ea ! c 2 3038b a extensions ! c 2 3038a 4 Html ! c 2 30389 4 name ! c 2 30211 4 Html ! c 1 70ff ! c 0 303ca 4 ! c 2 303d1 2 e3 ! c 2 303d0 a defaultExe ! c 3 303d3 1 ! c 2 710c 2 e3 ! L 710c ! c 2 303d2 b executables ! c 3 303ce 1 ! c 2 7113 6 *.java ! L 7113 ! c 2 303cd a extensions ! c 2 303cc 4 Java ! c 2 303cb 4 name ! c 2 30212 4 Java ! c 1 7128 ! c 0 30404 4 ! c 2 3040b 2 e3 ! c 2 3040a a defaultExe ! c 3 3040d 1 ! c 2 7135 2 e3 ! L 7135 ! c 2 3040c b executables ! c 3 30408 1 ! c 2 713c 5 *.tex ! L 713c ! c 2 30407 a extensions ! c 2 30406 5 Latex ! c 2 30405 4 name ! c 2 30213 5 Latex ! c 1 7151 ! c 0 3043e 4 ! c 2 30445 2 e3 ! c 2 30444 a defaultExe ! c 3 30447 1 ! c 2 715e 2 e3 ! L 715e ! c 2 30446 b executables ! c 3 30442 0 ! c 2 30441 a extensions ! c 2 30440 5 Other ! c 2 3043f 4 name ! c 2 30214 5 Other ! c 2 30209 a categories ! c 0 30216 1 ! C ProjectDir 4 717b ! c 2 717c 23 netscript2/src/perl/NetScript/Util/ 11 81 ! c 2 717d 0 0 ! c 2 30218 23 netscript2/src/perl/NetScript/Util/ ! c 2 30215 b directories ! C DmBag 5 2fff4 a ! c 2 3002a e5 b ! C DmDictionary 0 2fff6 3 ! C DmString 1 30008 36 b ! C DmSet 0 71c3 1 ! C DmString 1 71f1 5 Other ! L 71f1 ! c 1 30007 a categories ! c 1 2fff8 f ClassWrapper.pm ! c 1 2fff7 4 name ! C DmInteger 2 3000a 80000001 ! c 1 30009 9 substMode ! c 2 3005f e3 b ! C DmDictionary 0 3002b 3 ! C DmString 1 3003d 36 b ! C DmSet 0 7202 1 ! C DmString 1 7230 5 Other ! L 7230 ! c 1 3003c a categories ! c 1 3002d 13 ConfigFileParser.pm ! c 1 3002c 4 name ! C DmInteger 2 3003f 1 ! c 1 3003e 9 substMode ! c 2 30094 e6 b ! C DmDictionary 0 30060 3 ! C DmString 1 30072 36 b ! C DmSet 0 7241 1 ! C DmString 1 726f 5 Other ! L 726f ! c 1 30071 a categories ! c 1 30062 16 ConfigurationParser.pm ! c 1 30061 4 name ! C DmInteger 2 30074 1 ! c 1 30073 9 substMode ! c 2 300c9 e0 b ! C DmDictionary 0 30095 3 ! C DmString 1 300a7 36 b ! C DmSet 0 7280 1 ! C DmString 1 72ae 5 Other ! L 72ae ! c 1 300a6 a categories ! c 1 30097 10 FileRetriever.pm ! c 1 30096 4 name ! C DmInteger 2 300a9 1 ! c 1 300a8 9 substMode ! c 2 300fe e9 b ! C DmDictionary 0 300ca 3 ! C DmString 1 300dc 36 b ! C DmSet 0 72bf 1 ! C DmString 1 72ed 5 Other ! L 72ed ! c 1 300db a categories ! c 1 300cc 12 FunctionWrapper.pm ! c 1 300cb 4 name ! C DmInteger 2 300de 80000001 ! c 1 300dd 9 substMode ! c 2 30133 e7 b ! C DmDictionary 0 300ff 3 ! C DmString 1 30111 36 b ! C DmSet 0 72fe 1 ! C DmString 1 732c 5 Other ! L 732c ! c 1 30110 a categories ! c 1 30101 10 MemberWrapper.pm ! c 1 30100 4 name ! C DmInteger 2 30113 80000001 ! c 1 30112 9 substMode ! c 2 30168 e4 b ! C DmDictionary 0 30134 3 ! C DmString 1 30146 36 b ! C DmSet 0 733d 1 ! C DmString 1 736b 5 Other ! L 736b ! c 1 30145 a categories ! c 1 30136 14 ObjectParserStyle.pm ! c 1 30135 4 name ! C DmInteger 2 30148 1 ! c 1 30147 9 substMode ! c 2 3019d e5 b ! C DmDictionary 0 30169 3 ! C DmString 1 3017b 36 b ! C DmSet 0 737c 1 ! C DmString 1 73aa 5 Other ! L 73aa ! c 1 3017a a categories ! c 1 3016b 15 PropertyFileParser.pm ! c 1 3016a 4 name ! C DmInteger 2 3017d 1 ! c 1 3017c 9 substMode ! c 2 301d2 de b ! C DmDictionary 0 3019e 3 ! C DmString 1 301b0 36 b ! C DmSet 0 73bb 1 ! C DmString 1 73e9 5 Other ! L 73e9 ! c 1 301af a categories ! c 1 301a0 f UIDGenerator.pm ! c 1 3019f 4 name ! C DmInteger 2 301b2 1 ! c 1 301b1 9 substMode ! c 2 30207 e1 b ! C DmDictionary 0 301d3 3 ! C DmString 1 301e5 36 b ! C DmSet 0 73fa 1 ! C DmString 1 7428 5 Other ! L 7428 ! c 1 301e4 a categories ! c 1 301d5 11 XMLParserRelay.pm ! c 1 301d4 4 name ! C DmInteger 2 301e7 1 ! c 1 301e6 9 substMode ! c 2 30208 5 files ! c 2 2fff0 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 2ffef 6 launch ! c 2 2ffec 4 make ! c 2 2ffeb 4 make ! c 2 2ffee 0 ! c 2 2ffed 8 makeFile ! c 5 2fff1 0 ! c 2 2fff3 7 modules ! c 2 2ffea 4 Util ! c 2 2ffe9 4 name |