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
- SQL tags.
- Control processing tags.
- Simple math.
- Field level setting and getting.
External Requirements
- Java
- log4j from Apache
- SQL and JDBC libraries
Tested against
- MySQL Version 4.0
- DB2 Personal Version 8.1
Files Used
- PIXES Processing File
- System.out File
Variables
Variables may be assigned by several methods.
- By assigning a value using the set tag
- By retrieving a SQL field using the select tag
- Computing a value using the compute tag
- Passing a value using a runtime parameter call
- 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
- atEnd
- break
- commit
- compute
- connect
- continue
- delete
- dumpVariables
- exit
- for
- if
- insert
- leave
- log
- process
- rollback
- select
- set
- subroutine
- update