From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5fc9b3bec63cb80b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-13 16:15:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3D30B475.2060902@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Any type, any type at all! References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 13 Jul 2002 23:15:34 GMT NNTP-Posting-Host: 12.86.35.178 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1026602134 12.86.35.178 (Sat, 13 Jul 2002 23:15:34 GMT) NNTP-Posting-Date: Sat, 13 Jul 2002 23:15:34 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:27075 Date: 2002-07-13T23:15:34+00:00 List-Id: chris.danx wrote: >>I've been reading through the proposed DOM Level 3 spec and was wondering >>how an implementation could handle some of the new requirements for core >>compliance. In particular the DOMUserData type (section 1.1.7) >> >>To quote: >> >> >>> Type Definition >>> >>> A DOMUserData represents a reference to an application object. >>> >>It can't be generic can it? That would mean you couldn't mix types within >>the DOM, which is from my interpretation, the intention of this type. >> >>I can think of one way involving (access to) classes, which makes it a tad >>ugly for simple types like Integers, Strings, etc, but to me it seems the >>only way. Any thoughts on how to handle this in Ada (from someone more >>experienced)? >> > > No comments? I'll try a comment. I hope it is on-topic. The definition of a DOMUserData specifies a reference to an object. My suspicion is that many languages will have difficulty with such a definition. In C you would make a DOMUserData a void pointer. You would then be stuck with figuring out what was really pointed to. In Java you would use an Object reference. You would then need to wrap primitive types in their corresponding wrapper classes. This could cause some problems on the receiving end if the language reading the XML data was not Java. In Ada you could create an abstract tagged type as the base type for all DOMUserData. You would then need to create a subtype of that abstract type to contain each actual data representation. Again, this would cause some problems when decoding or reading the DOMUserData by some other language. C# would have the easiest time representing the DOMUserData because even primitive types inherit from Object. Again, you will have a problem if the language reading the XML data is not C#. Unless consistent format for DOMUserData is defined similar to the definitions for CORBA, you will have inter-language interpretation issues. Jim Rogers