XSLT is designed primarily for processing XML, but it can also be used (as here) for converting non-XML (or "almost-XML") formats into well-formed XML. In XSLT 2.0 you can read your input using unparsed-text(), you can split it into pieces using tokenize(), and you can write each piece to a separate file using xsl:result-document.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|