W3C home > Mailing lists > Public > www-svg@w3.org > November 2002

Re: DOM SVGNumber and DOMString

From: Chris Lilley <chris@w3.org>
Date: Wed, 13 Nov 2002 11:45:51 +0100
Message-ID: <2061007390.20021113114551@w3.org>
To: www-svg@w3.org, "Sigurd Lerstad" <sigler@bredband.no>

Hello Sigurd, www-svg,

You wrote

> in the SVG spec, the interface SVGNumber is
> specified, and SVGNumberList contain pointers to these
> object types. And it's even stated that if an object is already in another
> list, it should be removed from that list first before being inserted in a
> new list.

Yes. That behavior is correct. It can't be in two places at once, even
for a short while.

> I'm just making sure that this is correct (which precludes me from just
> using double in C++ COM , but that I have to wrap it inside an
> object)
> Is that correct?

No, its not correct. The list behavior is the important thing. Whether
you choose to wrap it as an object or not in a given implementation is
up to you.

> But what about SVGStringList, which uses DOMString as it's object
> (but DOMString is not defined as an interface, but as
> sequence<unsigned short>, which would map to BSTR in C++ COM.

Yes, that would be a good mapping. DOM Strings are sequences of 16bit
quantities, which (for basic multilingual plane characters) are
characters and (for plane one to 16 characters) are one of a surrogate

> And there's also no way to create a DOMString, how can you then
> implement SVGStringList correctly, maybe there should be a SVGString
> that wraps a DOMString ?

All that is required is that the List behaviour is correct. If the
implementation wraps objects or uses pointers, that is an
implementation choice.

 Chris                          mailto:chris@w3.org
Received on Wednesday, 13 November 2002 05:45:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:54 UTC