"Thierry Kormann" <[EMAIL PROTECTED]>
> > GREAT!
> >
> > elements created with createElement(..) aren't rendered, but those
> > created with createElementNS('http://www.w3.org/2000/svg','rect')
are,
> > it's an annoying bug, but not cripplingly so.
>
> This is not a bug. According to the DOM specification, you must use
> createElementNS if you are dealing with namespaces (as SVG does). Batik
has
> the correct behavior on both  createElement and createElementNS.

I'd like to make that a Feature Request then please.  SVG is often used
in a non-namespace aware enviroment, and ASV treats createElement here
analgous to it in HTML DOM - Can we have it as a configuration option?
The same as we have the option to not use a validating XML parser.

> > getBBox() doesn't work until the element has been added to the
document -
> > you get a nullpointer exception (this isn't surprising) but it's
> > different to ASV's which very usefully allows you to get the size of
an
> > element before rendering so you can then tweak the position based on
the
> > size.
>
> This is because I don't see how I can compute the bounding box of an
element
> when you have units or percentage and when the element is not yet added
to
> the DOM tree. I am curious to know what ASV returns on getBBox() with
<rect
> width="100%" height="100%" /> that is not attached. If you can let me
> know...

It returns 0,0 before adding to the tree, and the actual size after.  I
normally do it with text (to size other elements around the text.) and
here it gives the size of the text. (before any cascade of
css/attributes - you have to specify the font on the element you want to
size, not via css.)

At the very least I'd like something other than an error, I don't like
using try/catch because ECMAScript have provided no versioning mechanism
for me to protect older engines from that syntax error - Can you have it
return 0 or something?

Another thing I've just noticed (but not researched further) is my RDF
parser which uses parseXML generates a lot of java errors and kills the
viewer:

org.mozilla.javascript.EvaluatorException: invalid argument count
        at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(Unknown Sour
ce)
        at org.mozilla.javascript.Context.reportRuntimeError(Unknown
Source)
        at org.mozilla.javascript.Context.reportRuntimeError(Unknown
Source)
        at
org.apache.batik.script.rhino.WindowWrapper.jsFunction_parseXML(Unkno
wn Source)
        at inv3.invoke()
        at org.mozilla.javascript.FunctionObject.doInvoke(Unknown Source)
        at org.mozilla.javascript.FunctionObject.callVarargs(Unknown
Source)
        at org.mozilla.javascript.FunctionObject.call(Unknown Source)
        at org.mozilla.javascript.ScriptRuntime.call(Unknown Source)
        at org.mozilla.javascript.gen.c4.call(<SVG>:22)
        at
org.apache.batik.script.rhino.RhinoInterpreter.callHandler(Unknown So
urce)
        at
org.apache.batik.script.rhino.WindowWrapper$GetURLFunctionWrapper.get
URLDone(Unknown Source)
        at org.apache.batik.bridge.ScriptingEnvironment$7.run(Unknown
Source)
        at org.apache.batik.util.RunnableQueue.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

the parseXML has one argument, with the second either null, or the
SVGdocument, it makes no difference.
http://jibbering.com/rdf/codepiction-clientside.svg  is the page in
question.

I'll look further.

Cheers,

Jim.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to