On Friday, May 10, 2002, 5:00:32 PM, Jim wrote:

JL>  "Thierry Kormann" <[EMAIL PROTECTED]>
>> > GREAT!
>> >
>> > elements created with createElement(..) aren't rendered, but those
>> > created with createElementNS('http://www.w3.org/2000/svg','rect')
JL> 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
JL> has
>> the correct behavior on both  createElement and createElementNS.

JL> I'd like to make that a Feature Request then please.  SVG is often used
JL> in a non-namespace aware enviroment,

SVG is built on DOM Level 2, and Dom Level 2 is namespace aware. What
non-namespace-aware environment were you referring to?

JL>  and ASV treats createElement here
JL> analgous to it in HTML DOM - Can we have it as a configuration option?
JL> The same as we have the option to not use a validating XML parser.

Its not really the same, no. And the HTML DOM is, indeed, not
namespace aware but that is not a failing that should be propagated to
other specifications. Rather, its one that XHTML is fixing so it works
properly.


>> > getBBox() doesn't work until the element has been added to the
JL> 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
JL> an
>> > element before rendering so you can then tweak the position based on
JL> the
>> > size.
>>
>>  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...

JL> It returns 0,0 before adding to the tree,

How does that help you tweak it?

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

JL> At the very least I'd like something other than an error, I don't like
JL> using try/catch because ECMAScript have provided no versioning mechanism
JL> for me to protect older engines from that syntax error

Which versions of ECMAScript don't have try/catch?


-- 
 Chris                            mailto:[EMAIL PROTECTED]


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

Reply via email to