Josà AbÃlio Oliveira Matos <[EMAIL PROTECTED]> writes:

> 
> On Thu, Oct 14, 2004 at 11:52:50PM +0200, Andreas Vox wrote:
> > 
> > Something like a function "StringList getPossibleLayouts(LyXText & , 
> > LCursor)"
> > which would compare the current sequence of paragraphs around the cursor
> > position with allowed DTD productions.
> 
>   This would be on the fly support. It would be could but there other things
> that we can do first.
> 
> > A variant of this function could be used to check if a depth change is 
> > allowed
> > for a given paragraph.
> > 
> > Questions:
> > * What do you think of it ?
> 
>   The first time we talked about this was 1997. 

Great! Where is the code? ;-)

> 
> > * If this functions exists, would it be difficult to use it to prune 
> > the lists of layouts ?
> 
>   To make it dinamically, you mean?

Exactly.

> >   Are there problems with some frontends ?
> 
>   Jean-Marc can answer that. 
> 
> > If you like the idea, I would think about an algorithm to implement 
> > this function.
> 
>   I like the idea. Note that something easier that can be done now is to
> have a mode to validate the document. And then have a list of errors point
> to the real location in the lyx file.
> 
>   Something like what we have now in the latex backend.

Finding the first error would be easy. Avoiding followup errrrs and only
reporting genuine additional errors is a challenge. In this way the
dynamical approach is easier (just forbid any first error and you wont
have more than one at any time -- well, of course there is the paste action ...
And probably other ways to mess up the structure (includes? dtd changes?) )

I just brought it up at this time because it appears to be closely linked to 
1.  translation LyXBuffer -> XML
2.  Deeper/depth semantics .
So maybe it makes more sense to aim at a concept which can solve all
three problems.

Ciao
/Andreas

Reply via email to