You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Paul Brown <pr...@fivesight.com> on 2001/03/20 18:20:35 UTC

flat-file extensions for Xalan

I spent a couple of hours on the weekend looking over the current SQL
extensions and wrote a parallel extension for line-by-line access to an
InputStream (or file).  That is, you can apply a template to
"$foo/stream/line" and iterate over the lines in the stream.  (I also made
some trivial modifications to the fake document node to allow functions that
return a NodeSet (TEXT_NODEs only) to be run within it.)

Combined with a tokenizer that respects adjacent tokens (equivalent to
Benoit Cerrina's "tokenize" that ships with the current distribution but
with a different underlying tokenizer) and the XSLT substring() function,
the result is a simple command-line tool for mapping (multi-)delimited or
fixed-width files to XML.

GPL'd Java source (along with command-line executables) here:
http://www.fivesight.com/downloads/xsltflatfile.asp

Cheers,

Paul Brown
FiveSight Technologies, Inc.
prb@fivesight.com