Re: Re: examples of application of interleave?
David Tolpin <[email protected]>
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <[email protected]> |
> > Sounds like you are trying to implement a RELAX NG processor, and if so, > I wonder what is the point in adopting an algorithm that is known to be > incapable of supporting full RELAX NG. > No, I am trying to use jing (actually, one modified for use with rng2srng just because relaxng/impl is good for walking the graph and is not public in the original jing) as a toolkit to parse schemas to build LR parser on top of a markup for a language where elements of original markup are symbols (and elements with no content or text-only content are terminals). I am therefore trying to develop algorithm that approximates a schema with a context-free grammar as close as possible. I realize that a new method can be developed to build an LR parsing algorithm for a language derived from the full RNG but this is beyond my domain of interest now. All markup schemas I looked at can either be trivially rewritten without interleave or use interleave with exactly one element in one of two branches. These cases require a much simpler implementation than the general case. I am now (with the examples brought) even more convinced that interleave as a language tool is a solution looking for a problem; it lets users define languages which are great for validation by RNG but significantly complicate certain other operations beyond the scope of validation. I will be trying to find a solution, but not too hard. Loosening the grammar just a bit will solve my problem and give me a good tool. David Tolpin http://davidashen.net/