[WebIDL] Java package mapping (was: Re: [Selectors-API] IDL namespace)

Lachlan Hunt:
> It seems from the Java bindings section of Web IDL that the way to  
> define modules and how they're mapped to Java packages isn't yet very  
> stable.

I’ve added a way to specify the Java package naming method now:

  http://dev.w3.org/2006/webapi/WebIDL/#JavaPackage

So in selectors-api you would write:

  [JavaPackage=org.w3c.dom]
  module dom {
    interface NodeSelector { … };
  }

I’d be open to having [JavaPackagePrefix=org.w3c] if the repetition of
“dom” is sufficiently unsightly.

Alternatively: is it worth hard coding a Java package prefix into the
spec, so that [JavaPackage] is not normally needed?  (This could map a
module called ‘dom’ to org.w3c.dom, and other modules at the top
level to org.w3c.dom.foo (for module events, module svg, etc.), unless
overridden.)  And would this make Web IDL too specific for use by W3C
specifications, and if it does, is that really a problem?

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Friday, 28 November 2008 10:42:54 UTC