OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] InnerXml is like printf (WAS: Underwhelmed)

[ Lists Home | Date Index | Thread Index ]

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




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS