On 23-Oct-98 Jean-Marc Lasgouttes wrote:
>>>>>> "Jose" == Jose Abilio Oliveira Matos <[EMAIL PROTECTED]>
>>>>>> writes:
> 
> Jose>   My proposal regards the problem that we have deciding if some
> Jose> structure (inset) allows other insets as childs or not? Do you
> Jose> understand, now? (It was my fault if I was not clear before :)
>  
> Sorry, I only replied to one part of youer post. I really do not know
> much about dtd:s. So I cannot really tell whether they are
> easy/convenient to implement/use... In the same vein, we could replace
> textclasses with CSS. But this would require way too much work.
> 
> JMarc

 The comparison is fair, but as you notice our textclass already have a css
style, so why to change? :)

 We still miss the information about the struture, here you must agree with
me.

 Regarding how difficult it would be to construct the dtd parser, I have
asked that to Cees de Groot, SGML maintainer, his answer follows:

----------------------------------- begin answer -----------------------------
Hi Jose,

>   One answer is: read the dtd yourself. But howto do it in an automatic way?
>   That's one of my major concerns now, do you have any idea of how this is
> done in (professional) sgml editors?
>
Well, you need a DTD parser as you guessed. You may try to learn a bit of 
Elisp if you don't know it already and try to take psgml.el apart, because 
this does the same thing.

The long answer: use lex and yacc (or something else) to build a DTD parser. 
The parsed form would probably naturally fit in the format of a tree, and
then it's a matter of bookkeeping (keep note about where you are in the tree,
and make sure the user only selects tags from children of the current node).

--------------------------------- end answer --------------------------------

  Does this appeals to any of our parser experts? :)
  Probably with the advent of XML there will be more parsers like this.

--
Jos� Ab�lio de Oliveira Matos
Date: 23-Oct-98 : Time: 09:26:45 GMT
The early bird who catches the worm works for someone who comes in late
and owns the worm farm.
                -- Travis McGee

Reply via email to