Text Parser Generator
The text parser generator parser a text file, which an specified grammar, and
generates a XML file from it.
-
Name : textparser
-
Class: org.apache.cocoon.generation.TextParserGenerator
-
Cacheable: yes - uses the last modification date of the text document and of the grammar file
for validation.
The location of the source xml document is specified in
the pipeline by the src attribute.
 |  |  |
 |
<map:generate src="example.txt" type="textparser">
<map:parameter name="grammar" value="example.grm"/>
<map:parameter name="includeignorabletokens" value="false"/>
</map:generate>
|  |
 |  |  |
The parameter to specify the grammar must be declared. The second paramter tells the parser
if it should include all obsolete tokens, and must not specified.
The explanation of function and the grammar format can be found at the howto section
|