PIXES - Processing Instructions in XML Executing SQL.

This document is a work-in-progress.
As of May 24 2007

©American Coders, Ltd. 2006-2007
Publish or Perish

Requires Java and Apache Log4J.

Programming SQL using XML tags.

This is not an XSLT processor or a replacement for it, though PIXES may be considered an alternative to XSLT. The files used by PIXES parser will not work with a XSLT processor and vice versa. PIXES does not support the concept of XML namespace.

PIXES is designed to work with with SQL databases.

As with XSLT, PIXES executes the code within the scope of a XML tag.

If the tag is not reachable then tags within the unreachable scope are not executed.

For example - if the PIXES process has a SQL select tag pulling data from a table
<select fields="*" table="product" where="prodid="12345678">...</select>
and the SQL processor returns some rows for the result set for the select statement then all of the data within the select tags are processed.

Some tags don't required inner tags, for instance <exit/> and <dumpVariables/>

Tag Types

The package provides for several types of tags

  1. SQL tags.
  2. Control processing tags.
  3. Simple math.
  4. Field level setting and getting.

External Requirements

  1. Java
  2. log4j from Apache
  3. SQL and JDBC libraries
      Tested against
    1. MySQL Version 4.0
    2. DB2 Personal Version 8.1

Files Used

  1. PIXES Processing File
  2. System.out File


Variables may be assigned by several methods.
  1. By assigning a value using the set tag
  2. By retrieving a SQL field using the select tag
  3. Computing a value using the compute tag
  4. Passing a value using a runtime parameter call
  5. Storing a name/value pair collection in a properties file

The package provides for an indexing mechanism using the [] (square brackets) to indicate an indexed name. Unlike formal programming languages predefining the size or number of index items is not possible. This is similar to the concept of Indexed Strings used in the NetRexx and Rexx languages.

Tags or Processing Instructions

  1. atEnd
  2. break
  3. commit
  4. compute
  5. connect
  6. continue
  7. delete
  8. dumpVariables
  9. exit
  10. for
  11. if
  12. insert
  13. leave
  14. log
  15. process
  16. rollback
  17. select
  18. set
  19. subroutine
  20. update