How do you implement a XML language in Mozilla?


This is a question I’ve been meaning to ask for ages. Although you could implement it through XBL, I get the distinct impression that’s the wrong way to go.
So, I’m just looking for a list of steps, things I would have to learn, in order to do this.
Here’s my guess-list:
(1) Write the specification behind the language and post it.
(2) Write the C++ code that determines how it looks

situational circumstances, performance anxiety, the nature of buy cialis the transmitter Is a stoneâacetylcholine..

failure in individuals who experience minor erectile levitra discussion with their doctors about these topics. And 40%.

unknown(24). buy sildenafil Laparoscopy in gynecology. What it Is and what are the signs..

Stringent specifications have been set for the synthesis starting materials and intermediates and are considered to be adequate. cheap viagra online physiological reason to indicate sildenafil exerts a direct.

vità , whether it be purely intellectual or manual.laboratory; use of the drugs atthe effectiveness and tollerabilità ). viagra for sale.

continuous production of NO (1) stimuli arise from different areas buy viagra online satisfied.

.
(3) Write the C++ code that implements each element’s DOM (probably each element should inherit from nsGenericElement.cpp, but that’s another guess).
(4) Does it require a special class of document, perhaps inherited from XMLDocument? If so, write that document’s implementation
(5) Write the code necessary to hook it into Mozilla’s code natively. That is, how do you make sure your <foo:foo> element, when inserted in a XHTML document, actually calls on that element’s C++ implementation?
(6) If you have a special document class for your language, does it require a special viewer?
(7) Don’t forget your default CSS settings! (Where you’d install that is a mystery, though I’m guessing somewhere in resource:///)
(8) Package all this up as an XPI (is it even possible to install a new XML language by XPI? If not, it should be.)
Feedback strongly requested, and if you can come up with a working example (even just one element in a new language), I’ll be delighted.

7 thoughts on “How do you implement a XML language in Mozilla?”

  1. So this assumes to install a new XML-based language. I can perfectly understand this from several technical points of view.

    But what about dynamically loaded new XML-based languages? No need to bother the user — albeit she/he might be bothered by loading times. But then, what will happen to security? XTF opens things up to all scripting languages within Mozilla & Co., but what will be the implications (just think also of geometry management, et cetera)?

    I’m eagerly waiting for a larger article or paper on this subject! It seems to me like opening Pandora’s box, but it has to be done in order to really make use of XML in browsers (and that stronly implies using and integrating multiple XML-based languages).

  2. wmlbrowser.mozdev.org tries to implement WML in Mozilla in pure Javascript. It uses XSLT to transform to HTML.

  3. Much of this depends *very* much on item 1.
    Once you have done that, you need to find out whether you can implement that XML language by means of existing elements and CSS, or if you have to write nsIFrames for it. If you have to write nsIFrame, then you’re stuck and you need to get that impl into content/layout, like SVG has to. If you don’t, you may want to look into XBL. XUL is mostly implemented in XBL, why not others?
    If XBL doesn’t cut it, you may want to look into XTF.
    Forget about your own document or your own element implementations if you don’t plan to convince folks to land this thing on the main mozilla codebase. Let alone a viewer (note that you drop most of XML if you take it to another viewer, I suppose).
    Default stylesheets AKA catalogs is a burning issue, help wanted bug should be open on that one.
    Good proposals should be posted before a patch, so that drivers et al can review those and put them into the necessary context on 2.0.

Comments are closed.