Help, tied up by the chain
Ruan Strydom
ruan at jcell.co.za
Tue May 18 21:02:26 UTC 2010
Thanks Niko, when nobody replied I though I upset someone J ;) (I almost
downloaded qt creator, I will start another thread about this though ...)
> what element doesn't need an open tag?
All elements need an open tag but DTD defines it, ie "- - , - O" ;) but I
really don't need to store open optional.
> and what is contentType?
I could use an enum but it is: EMPTY, CDATA, PCDATA etc.
To be honest I have not put too much thought into what to store but rather how
to store it, since I am not too sure how the chain works/solves etc exactly.
Learn a little bit as I go along. (probably the wrong bits)
> yes, please commit somewhere, I would be interested on how the parser
> uses the DTD.
When you have time have a look at DUChainDTDHelper the DTDHelper facade. It is
not complete since I am not sure how to store the info in the duchain.
I need to know things like is the element EMPTY or is it CDATA. Is the close
tag required etc. These must be accessible through the chain.
Also the DTD parser/builders is experimental. It does not parse documents like
docbook since this defines tons of entities and includes them everywhere. But
it works on html svg and others dtd's. There is an ugly hack in the dtd
tokenizer in that if it comes across an entity reference it will tokenize it
there and then. This makes declaration and context ranges jump all over the
show. The worst is external entities is not parsed, and this is the problem
with docbook.
If you could help me with the following it would be much appreciated and I
will hack on happily until the next stumbling block:
1) How/where should I store attributes? Elements is already members of an
parent class.
2) How/where should I save info about an element like EMPTY, CDATA, close tag
optional?
ps1: Also have a look at the catalog (CatalogHelper), it is used to find
included files ie dtd's xsd's etc.
ps2: This is a long mail...
ps3: I think your CSS plugin and mine is clashing a bit here and there.
Thanks
More information about the KDevelop-devel
mailing list