> SVG 1.1 doesn't really give concrete requirements for what should happen
> in the ECMAScript binding; the binding appendix is pretty high level.
> But I think even still, by not exposing those interfaces on the global
> object, you would get a non-conforming scripting environment.

Damn, I knew that seemed too easy to work... :-D



> Currently, the following packages are imported (see TO_BE_IMPORTED in
> http://svn.apache.org/repos/asf/xmlgraphics/batik/trunk/sources/org/apache/batik/script/rhino/RhinoInterpreter.java):
[...]
> For those DOM packages, we can inspect the JARs that contain the
> interfaces to find out which specific ones to import.
>  jet:~/work/svn/batik/trunk/lib $ for x in xml-apis.jar xml-apis-ext.jar; do 
> jar tf $x | egrep 
> '^org/w3c/dom/(css/|events/|smil/|stylesheets/|svg/|views/|xpath/)?[^/]*\.class'
>  | sed 's/\.class$//' | tr / .; done
[...]
> Plus, there are a few that are included in source form:
[...]

Wow, impressive! :-) Does this mean that to achieve a standard
ECMAScript binding this would be the class list? I can try to marsh up
a patch from this if it sounds useful...



> The java.lang import isn't needed for conformance to the spec,
> obviously.  I suspect that it is used most commonly for use of the
> System class, to allow code like:
>
>  <script>
>    System.out.println("whatever");
>  </script>
>
> instead of:
>
>  <script>
>    java.lang.System.out.println("whatever");
>  </script>
>
> or even:
>
>  <script>
>    Packages.java.lang.System.out.println("whatever");
>  </script>
>
> (I notice that some files under the samples/ directory use the System
> class.)

Humm... I'm not sure about this, but this sort of things would be tied
to a particular implementation (Batik, in this case), so I'd argue
that, for this sort of functionality, explicit "importPackage" calls
could become a requirement - this way, it would be obvious that an
implementation-specific feature (and not a standard ECMAScript
binding) was being used, potentially avoiding interoperability issues
that could raise from not knowing that... Would this behavior make
sense or am I missing something (such as breaking current
functionality or similar)?



Regards,

  Helder Magalhães

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to