param_i IN VARCHAR, param_o OUT VARCHAR) AS BEGIN param_o := param_i; IF param_io IS NOT NULL THEN param_io := param_io + 1; ELSE param_io := -1000; END IF; END; *]]; The more interesting usage is the parameterized queries and updates. Queries and updates can be run directly or preparedly. db::prepare ins: INSERT INTO emp( emp_no, first_name, last_name, birth_date, salary ) VALUES( :empNo, :firstName, :lastName, :birthDate, :salary ) ; for row in rows { db::sql ins with @empNo:Integer = id++, @firstName = row[0], @lastName = row[1], @birthDate:Date = row[2], @salary:Number = row[3]; } Below is a query example. db::query qry: SELECT emp_no, first_name, last_name, birth_date, salary FROM emp ; println 'ID First-Name Last-Name Salary Birth-Date', nl, '--- ---------- ----------- -------- ----------'; while qry.next() { println qry[1].int() :<5, qry.first_name :<12, qry.last_name :<12, qry.salary :*7.1, ' ', qry.birth_date.fmtDate('yyyy-MM-dd'); } SGML and XML document processing SGML is the generic hypertext format that includes HTML and XML. There are two APIs for processing XML documents: Simple API for XML (or SAX), and Document Object Model (or DOM). SAX processing scans the whole text as a stream, and fires events for each encountered tag or text segment. Judoscript has a cute little statement that makes use of this feature effectively for XML and SGML data. The next example shows the essence of HTML scraping. With this, writing a web site crawler is not far from reality! do 'http://www.judoscript.org' as sgml { <a>: if $_.href != null { println 'Found a hyperlink:', $_.href; } <p>: println 'Found a paragraph tag.'; TEXT: println 'Found some text:', $_.length(); } The following example processes the XML data that is appended at the end of the script. do $$local as xml { <book>: println ($_.hardcover=='true')?"Hard":"Soft", '-cover Book ------------'; <date>TEXT: println ' Date: ', $_, ' (', $_.type, ')'; <title>TEXT: println ' Title: ', $_; <author>TEXT: println 'Author: ', $_; <isbn>TEXT: println ' ISBN: ', $_; } EndScript ------------------------------------------------------- <booklist> <book> <title> UNIX in a Nutshell </title> <author> Daniel Gilly </author> <publisher> O&apos;Reilly & Associates, Inc. </publisher> <isbn> 1-56592-001-5 </isbn> <date type="first edition"> 1986-12 </date> <date type="second edition"> 1992-06 </date> </book> <book hardcover="true"> <title> Advanced Programming in the UNIX Environment </title> <author> Richard Stevens </author> <publisher> Addison-Wesley </publisher> <isbn> 0-201-56317-7 </isbn> <date type="copyright"> 1993 </date> <date type="twelfth printing"> 1996-12 </date> </book> </booklist> Judoscript also supports DOM and XSLT processing of XML documents. Apache Ant scripting Apache Ant has been the build system