View Single Post
Old 12-01-2014, 05:36 PM   #55
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,961
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi,

Some points:

- Even Javascript requires a dom parser of some sort. Since javascript is typically embedded inside web pages, this is typically provided for it, not inherent. Something must create the dom it is wrapped around.

- BS4 is embeddable quite easily and will probably become part of the python 3 future of Sigil. Also embeddable quite easily is html5lib. Under python 3 built-in dom and xpath routines are quite powerful and fully unicode aware.

- most dom implementations like etree can easily be built from any tokenizer/parser including the built in quickparser.py support or html5lib or ... This is in fact what both BS3 and BS4 does.

So the real reason python was chosen over other languages for the first interface was that it is simple to learn, extremely powerful, easy to extend, and that has a ready flexible set of xml/xhtml processing libraries built in or easily addable.

Hope this helps,

KevinH

Last edited by KevinH; 12-01-2014 at 05:39 PM.
KevinH is offline   Reply With Quote