[relaxng-user] FW: Jing & Trang errors when processing RNC gr ammar

MURATA Makoto (FAMILY Given) EB2M-MRT at asahi-net.or.jp
Wed Apr 28 17:44:41 ICT 2004


>> Ok...why is this illegal?
>
>I'm not qualified to say _why_ it's illegal. I'm sure MURATA Makato 
>knows. I just wanted to help you find out for yourself what the issue 
>is. If you check the RELAX NG specification, you'll find, in section 
>7.1.2, a prohibition of the path:
>
>oneOrMore//group//attribute

>oneOrMore//group//attribute


Consider an illegal pattern

(element * {text}, attribute * {text})*

This means that the number of attributes and that of elements are 
equal.

Next, consider another illegal pattern

(attribute a:* {text}, attribute b:* {text})*

This means that the number of attributes in the namespace for the
prefix a is the same as the number of attributes in the namespace for
the prefix b.

To implement such patterns, we cannot use abstract machines having
*finite* states, since we need one state for each natural number.
Then, Bali and Miaou (which I should have finished long time ago) will
become impossible.

Jing constructs patterns (which are "states") lazily.  Thus, the above
patterns can be implemented actually.  However, there are some
malicious patterns which cause (an earlier version of) Jing to 
explode, because so many patterns have to be created during 
evaluation.

Hope this helps.

Cheers,

-- 
MURATA Makoto (FAMILY Given) <EB2M-MRT at asahi-net.or.jp>




More information about the relaxng-user mailing list