Napa is a high-performance, progressive XSLT processor. In this first public release only the core of the XSLT specification is implemented but it is enough to perform simple transformations. A Windows EXE build is available here for you to try out.
This release of Napa has been benchmarked against a number of other XSLT processors. It’s currently running at about 2.5x quicker than its closest rival.
The processor is also completely progressive. The transform and associated XPath expressions demand load the XML input file. This feature is very useful when rendering large documents.
The basic command line is very simple, just,
napa <XSL File> <XML File> [<Output File>]
If you don’t specify the output file then it’s redirected to the console. When I indicate file here, that’s exactly what I mean. Currently Napa does not accept URL.
If you just want to use the XPath implementation then,
napa –p “XPath Expr” <XML File> [<Output File>]
This mode executes the XPath expression and prints all the results to the output.
You can perform multiple runs with timing by specifying the –n command line option as in,
napa –n 50 foo.xsl foo.xml foo.html
In this mode the stylesheet is loaded and compiled once but the XML file is re-loaded on each run.
I originally started work on Napa out of intellectual curiosity and a belief that current XSLT implementations were slower than they should be. Having satisfied the former and proved the later there is now a question over what should happen to the project. I would like to follow this work to completion but commercial pressures mean I have to start earning a living again. If you are interested in acquiring the C++ source code to Napa for a commercial venture or want to sponsor me through its completion or both drop me a line.
Currently Napa does not recognize when compatibility mode should be used. It will report all unknown elements as errors.
The following XSLT instructions are not implemented
The following XSLT instructions are partially implemented
Apart from the mentioned issues Napa is believed to be a conforming implementation of XSLT 1.0
The following functions are not currently supported.
The document function is complete but only loads files from the local file system. That is the path you supply should be a relative path from the base node set or the XML file provided on the command line.
Apart from the mentioned issues Napa is believed to be a conforming implementation of XPath 1.0
Kevin Jones
kjouk@yahoo.co.uk