[Home] [By Thread] [By Date] [Recent Entries]


m batsis wrote,
> Speaking of object hierarchies, I noticed the declaration
>
> Element foo = ...
>
> Which means you either need hooks to the host language constructors,
> or you have a conflict. Any other way to attach this to a host PL?

Not sure I follow. Apart from the fact that I was helping myself to a 
language feature that won't be present in Java until 1.5 (concise array 
literals) that *was* plain Java.

Without concise array literals you'd have,

  Element e =
    new Element(
      "html/("+
        "head/("+
          "title/text(%0),"+
          "link[@rel='stylesheet',@type='text/css',@href=%1]),"+
        "body/text(%2))",
      new Object[] { "Example 3", "/ss/style.css", "Hello World" } );

which isn't much uglier, and, given a suitable a base library, would 
work with any Java compiler right the way back to 1.0.

Cheers,


Miles

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member