[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Alternative algorithm to restrict use of data/string in patterns.
Your algorithm is a *lot* more complicated than the current (JTREX)
algorithm, which in your notation is simply:
function void check( pattern p ) {
switch( p ) {
case: p == <oneOrMore> p1 </oneOrMore>
if (p1 contains <data> or <string>)
this pattern is illegal!
case: p == <interleave> p1 p2 </interleave>
case: p == <group> p1 p2 </group>
check( p1 )
check( p2 )
if( p1 contains <data/> or <string/>,
&& p2 contains <data/>, <string/>, <anyString/> or <element />, or
viceversa)
this pattern is illegal!
case: p == <choice> p1 p2 </choice>
check( p1 )
check( p2 )
case: p == <anyString/>
case: p == <string> ... </string> or <data> ... </data>
case: p == <attribute /> or <element />
do nothing;
}
It's nice that your algorithm finds exactly the cases that cause a validator
problems, but is that useful? Are there are cases that your algorithm
allows and that the JTREX algorithm disallows that users might reasonably
want?
James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC