Open GoogleCodeExporter opened 9 years ago
It should output something like
_1 = element * - * { notAllowed }
(where * - * is a way of writing an empty name class). It won't simplify out
to notAllowed because of
http://www.oasis-open.org/committees/relax-ng/spec-20011203.html#notAllowed
Bug is in
comp.thaiopensource.relaxng.pattern.PatternDumper.NameClassDumper.visitNull()
Original comment by jjc.jclark.com
on 7 Apr 2011 at 6:34
Wouldn't
B = element B {notAllowed}
qualify as an unreachable define?
That could be removed according to the specs that you cite.
Original comment by taraAt...@gmail.com
on 7 Apr 2011 at 7:12
Sorry, I don't understand your point.
Original comment by jjc.jclark.com
on 7 Apr 2011 at 12:09
Yeah, on further thought, unreachable is no help in this situation.
But
element * - * { notAllowed }
is illegal (according to oXygen) - 'wildcard in except'
I may have to write a script to replace
element * {notAllowed} with notAllowed and then run the simplifier again.
Only problem is, this could generate more such patterns, so an iteration might
be required.
Wish the specs could be modified.
Original comment by taraAt...@gmail.com
on 9 Apr 2011 at 6:57
I had forgotten that the spec disallows element * - * { ... }. There's no way
to write a name class that matches no names.
This means that _1 is going to need to be defined as notAllowed. This would
make jing -s non-idempotent, which is rather ugly.
One possibility is to do an additional simplification stage after checking
constraints. But the possibility of recursion makes this non-trivial.
Original comment by jjc.jclark.com
on 10 Apr 2011 at 1:14
I am surprised you don't have to do recursion already. It would be guaranteed
to terminate, though.
Another possibility, although less desirable from my point of view, would be to
leave the line
B = element B {notAllowed}
unchanged. At least it would not produce invalid output.
Original comment by taraAt...@gmail.com
on 10 Apr 2011 at 8:26
In keeping with the initial example, that should be
C = element C {notAllowed}
Original comment by taraAt...@gmail.com
on 6 Feb 2012 at 8:46
Original issue reported on code.google.com by
taraAt...@gmail.com
on 7 Apr 2011 at 5:33