On Fri, 23 Oct 1998, Jose Abilio Oliveira Matos wrote:

> On 23-Oct-98 Allan Rae wrote:
> >
> > We could perhaps build a library of preparsed dtd's  then we wouldn't
> > actually need a dtd parser in LyX we instead link to an appropriate
> > library.  The dtd's don't change often (not any more than article.cls
> > would -- almost never) so this scheme should be okay for long term use.
> > 
> > We'd have reasonable speed then also.
> 
>   You have read my mind. :)
>   Is this doable? (Jean-Marc objections are valid)

What would be best is that the preparsed dtd's could be called with
simple parameters to decide retrieve a list of allowed contents or a
simple boolean question:

        isThisAllowed("LaTeX-Article", "tabular", "footnote")

this should return true. Or someting like:

        getWhatsAllowed("LaTeX-Article", "tabular")

which should return a vector<LString> for example.

Thus we could have a simple interface to solve all our problems.
All we'd need to know is what the current paragraph style is and what
style the user wants to add.

Allan. (ARRae)

Reply via email to