Frank Herrmann wrote:
>
> Please find attached a gzipped tar file (techdoc.tgz) of our DTD and
> stylesheet and an XML instance (TechSheet.xml). The DTD and CSS paths in
> the instance refer to <XXE-home>/distrib (here:
> /tools/xxe-m12p3-src/distrib) where you can extract the tar file.
My diagnostic was right: the DTD has some content models XXE M1.2's
Jakarta regexp engine doesn't like.
For example:
<!ENTITY % listsect.m "(para|ce|xmp|listing
|beware|notesect|table|figure)*">
<!ELEMENT item (itext, (%listsect.m;|deflist|list)*)>
which expands to:
(itext,((para|ce|xmp|listing|beware|notesect|table|figure)*|deflist|list)*)
And the regexp engine does not like the ``((X)*)*'' part.
The funny thing is that M1.1 GNU regexp engine does not like these
content models too! In fact, you were using an XXE ***systematically
crashing*** each time you clicked on a list item (among other elements).
The following error message is displayed on the console by XXE M1.1 each
time it crashes:
xxe: internal error: java.lang.RuntimeException: internal error:
'^(?((?|?|Y|S|J|?|D|?)*|V|?)*)$' invalid RE: At position 26 in regular
expression pattern: repeated argument may be empty.
After that, XXE M1.1 was running in a weird semi-broken mode.
XXE M1.2 having a different regexp engine, has a different error message
and a more straigthforward behavior instead of running in the weird
semi-broken mode.
Therefore, I suspect that you use XXE on Windows (i.e. without a
console) and that you have a pretty fast machine.
This bug has already been found using the RSS DTD. See
http://www.xmlmind.com/xmleditor/changes.html October 1, 2001. At that
time, I just slightly modified the RSS DTD.
The way you have written your DTD seems pretty reasonable and I think
most people write DTDs the way you do. So now, it is really time to fix
this bug!
I've started backporting some XXE M2 code to XXE M1.2 and I'll hope to
release a Patch 4 in the next few days.