html / xml language support

Niko Sams niko.sams at gmail.com
Fri Jan 22 07:24:21 UTC 2010


Hi,

Great! Thanks for working on this - we really need it for Quanta.
(before that we can't
call Quanta Web Development IDE)

> 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.

> 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.

> 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.

>
> 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.


Niko




More information about the KDevelop-devel mailing list