[relax-ng] Re: Interleave and text

From
James Clark <>
Date
2001-10-13T00:31:05+00:00
ID
851836866.1002958140@[192.168.0.125]
Thread
[relax-ng] Re: Interleave and text
> residual(<text/>,CharacterToken) = <text/>.
>
> So even though there are two ways to consume it, the residual always
> remains the same regardless of matched <text/>.

The residual of <text/> wrt a character token is <text/>, but the residual 
of a pattern containing <text/> may not be equal to that pattern.  For 
example, if we have

X = (A | (text, B)) & (C | (text, D))

Then the residual of X wrt to a character token is

((text, B) & (C | (text, D)))
| ((A | (text, B)) & (text, D))

which is larger than X.  If taking a residual wrt text can cause expansion, 
then why can't it cause exponential expansion?

James