Re: parser in Quanta
Jens Herden <[email protected]>
| Newsgroups | gmane.comp.kde.devel.quanta |
|---|---|
| Organization | http://www.kdewebdev.org |
| Message-ID | <[email protected]> |
I move this to the list... > > My approach would be to have configuration files for the DTD with > > information about the valid special areas that can be inside of the > > document (like we have right now). So if the XML parser encounters > > the start of a special area (like <? ) it will change the mode to > > find the end of the special area. Of course this mode must know about > > strings etc. so that the "?>" is skipped and not detected as end of > > the special area. When the parsers find the end it can just signal > > the whole area as process instruction and let the builder create on > > node from it. > > Later we can parse the process instructions with another parser and > > create the nodes for the special areas. > > Shortly this is exactly what we do right now. Is it? I think that Quanta is currently analysing the document first and then starts the parsing. I would like to have a solution where we start the parsing and detect the begin of a special area, switch the parse modus and switch back when we detect the end of the special area. So one parser run should be enough to parse the HTML/XML and through out the special areas. Do you see any reason why this should not work? > > By the way do we handle Javascript already correctly in Quanta? > > We don't really handle. Luckily it is inside a tag (script), so it is > just not parsed. At least this is what I remember. So we could improve Quanta further if we would parse Javascript as well? Jens _______________________________________________ quanta-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/quanta-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDx5ojkYmIVB8IV+ARAtPPAJ9mq64X1sTL5FMHznD7hNbS4ZQYmACgsUCO gjSIn4ykkXS6QZU7z8E/Axk= =CaoC -----END PGP SIGNATURE-----