problems processing grm file
Brought to you by:
benedikta
When I try to generate a XML grammar and a XML
lexicon with the Ant task the xgrm and xlex files
generated are not "XML". They contain a XML header
followed by a list of all the lexeme I declared in my grm
file and other things. I tried to use an other XSLT
processor (xalan as suggested in the documentation). It
works quite well except I can't declare the "end of line"
symbol $ in my grm file. Systematicaly an error is
returned. Here is the error returned if it can help in the
resolution : "[chaperon] BUILD FAILED:
file:D:/TestChaperon/build.xml:52: Failed to process
D:\TestChaperon\tmp\CA.tmp2 : Couldn't accept end of
document at file:/D:/TestChaperon/tmp/CA.tmp2:2:-1"
Logged In: YES
user_id=71774
Hi Jean-Louis,
I encountered the same problem generating XML grammar and
XML lexicon using Cocoon 2.1.4 (with xalan 2.6.0). The
Cocoon pipes to do this are quite lucid, so I was able to track
down the problem:
parameter 'flatten' (defaulted to false) does not function as it
should and I expect it was previously defaulted to true.
I added a small XSL step to the pipes that unwraps any
element in syntaxtree namespace when it has the same name
as the parent element.
I also noticed that the text4regexp.xsl states the wrong
syntaxtree namespace version. It mentions version 1.0, but
should mention 2.0.
I have the parsing proces working in Cocoon, but I cannot
really judge whether the output is correct now. It does look
sane to me, but I'm not an expert.
Grtz,
Geert
PS: the chaperon version that came with Cocoon 2.1.4 is
marked with the date '20040205'. Unfortunately, 3.0-final
does not seem to work with Cocoon 2.1.4. Haven't tested yet
against Cocoon 2.1.5.