<cPIA>, XML Macro Processing in C
     /|\ a SourceForge project

OK, before you ask, that little ascii-art logo is supposed to resemble a cuttlefish, which is what sepia ink comes from. ``Sepia'' is pronounced the same as the name of our project, cPIA, and is roughly the same color as the background of this page.

cPIA, on the other hand, is a macro-expansion engine for XML. You define tags as macros. Any tags you don't define get passed through. A limited number of tags (about 20 main ones) are predefined as ``primitives,'' giving you a Turing-complete programming language with XML syntax.

Unlike most macro processors, you have a choice: you can define your macros inline, in the document being processed, or you can define them in a separate file which we call a ``tagset.'' Defining macros inline or in include files is what macro processors like m4 and cpp do; defining them in a separate file is what stylesheet processors like XSLT implementations do.

cPIA is particularly useful for web applications, and can either be used offline, M4-style, or on a web server, JSP-style. Having a complete language around means that you can create entire applications out of nothing but XML -- there's no extension language to learn. And because it's all written in C, adding your own primitive tags is easy.

Internally, cPIA uses a simplified form of the Document Object Model as its representation for document parse trees. This means that you can use tagsets to process almost any kind of document, as long as you have a parser that produces cPIA's parse trees. The same goes for output. In particular, cPIA comes with a parser that's perfectly happy handling sloppy HTML of the sort commonly found in web pages -- you're not stuck with XHTML unless you want to be.

cPIA is a port from Java to C of the document-processing subsystem of PIA (Platform for Information Applications), which is available (also as open source) from <RiSource.org/PIA>.

                  Logo <cPIA>, XML macro processing in C
     /|\ a SourceForge project
For some great pictures of cuttlefish, see The Cephalopod Page (TCP) by Dr. James B. Wood © (ceph@is.dal.ca) at Dalhousie University.
This page was processed with cPIA using a tagset that, among other things, redefines the <p> tag as a table that contains a single cell with a white background. Similarly, the <note> tag generates italicized text on a sepia background.

$Id: index.html,v 2001/08/24 21:58:27 ssavitzky Exp $