html / xml language support

Ruan Strydom ruan at jcell.co.za
Sat Jan 23 08:13:46 UTC 2010


Sorry I just realized that I had a couple of random incorrect statements and 
questions thrown into one paragraph... here is a re-factored version, please 
ignore the other.

I will try to do DTD first since HTML use it. Schema's have inheritance and a 
more complex structure so I would have to keep it in mind while doing it. 
Perhaps I can pass a couple of diagrams past you guy's? 

Which leads to the question about the DUChain: are you certain that I should 
not use it, as  schema's follow a OO structure, there is inheritance, also 
schema define 'enums', etc which is similar to code (correction)? 

About implementing a tree like structure in the DUChain: it may go a couple of 
levels deep, but I do not think that it would be majorly excessive 
since humans type it? 

There is a lot of work that went into the DUChain and its synchronization 
(correction), making my own will just open a whole new can of worms. I 
suppose I could use aspects of the DUChain rather than using all of it?


On Saturday 23 January 2010 09:53:12 Ruan Strydom wrote:
> Thanks allot... more questions bellow and way bellow.....
> 
> On Friday 22 January 2010 09:24:21 Niko Sams wrote:
> > Hi,
> >
> > Great! Thanks for working on this - we really need it for Quanta.
> > (before that we can't
> > call Quanta Web Development IDE)
> 
> Well, I do not think that I am the best person for the job, I simply chose
>  to do it because it is easier than parsing java-script or python etc, and
>  it is more exciting than implementing  business logic in java. Also I get
>  to use the best OS in the world, for free (Linux of-coarse), so I have to
>  try and pay for its usage through contributing in some way.
> 
> > > 1) Would DTD and XSD have to parse to the same structure (q2 below) ?
> >
> > Makes sense to me. That way code completion would be the same for both.
> >
> > > 2) Would elements in (DTD and XSD) map to a declaration and its
> > > contents to a context, the attributes and their namespace's to
> > > properties in the declaration?
> >
> > Do you need that structure only internally for validating and code
> > completion? If so
> > I don't see a point in using DUChain, it just would complicate things I
> >  think. But you won't have neat features like saving-to-disk and need you
> > reparse them everytime.
> >
> > > 3) Do you parse the 'using file' (HTML or XML) since you do not declare
> > > anything? ie: only parse it to see where the user is for completion but
> > > not into the chain.
> >
> > That depends on what features you want to implement. For code completion
> >  you don't need duchain. For using the existing Outline you need
> > declarations in duchain.
> > However I don't know how this could work with a tree structure. Maybe
> > we could adapt
> > the DUChain to support tree structures?
> > Imho the first (and most useful) feature should be code completion.
> 
> I will try to do DTD first since HTML use it. XSD's have inheritance and a
> more complex structure so I would have to keep it in mind while doing it.
> Perhaps I can pass a couple of diagrams past you guy's? Which leads to the
> question about the DUChain: are you certain that I should not use it, as
> schema's follow a OO structure, there is inheritance/'enums' etc? It may go
>  a couple of levels deep, but I do not think that it would be majorly
>  excessive since humans type it? Also there is a lot of work that went in
>  to
> serialization, and making my own will just open a whole new can of worms. I
> suppose I could use aspects of it rather than using all of it?
> 
> > > 4) Should I use the KDevelop-PG QT lexer?
> >
> > kdev-pg-qt is a parser generator, not a lexer. The language plugins using
> > kdev-pg-qt have either a hand-written lexer or a flex lexer.
> 
> ;) ok that settles it then I'm not using  kdev-pg-qt  ;) (I don't even know
> what a 'parser generator' is supposed to do, more reading to do ...)
> 
> > > 5) Should I combine the two, HTML and XML?
> >
> > If it makes things easier for you and saves you from code duplication -
> > why not. Or you could create a library that is used by both.
> 
> Ok.
> 
> > > 6) ...... lots more .....
> > >
> > > ps: Nobody is working on an HTML formatter? Since I am trying to modify
> > > the one I did for XML?
> >
> > There is a html parser in quantacore afaik rewritten from scratch for
> > quanta4. But
> > it's not used.
> 
> I will have a look at it, and try it on XML.
> 
> > Niko
> 




More information about the KDevelop-devel mailing list