[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Problem with 'attributes'
Hi, I'd love to fix this problem in the draft and would like the group's opinion. Here's the problem, let us first consider the following CGM file: BEGAPS 'myId' 'grobject' STLIST; APSATTR 'name' "14 1 'myName'"; APSATTR 'screentip' "14 1 'This is a tip'"; APSATTR 'viewcontext' "16 4 126.6082 97.4197 471.8895 318.0822"; APSATTR 'linkuri' "14 3 'http://www.w3.org' 'W3C' ''"; BEGAPSBODY; ... and the following XML companion file: <companion> <grobject apsId="myId" wire:has-wire="true"> <wire:data type="22" color="green"/> </grobject> </companion> So let's assume that the XML companion file is applied, if I remember correctly, we agreed that the memory model would look like this after loading and applying the companion file: BEGAPS 'myId' 'grobject' STLIST; APSATTR 'screentip' "14 1 'This is a tip'"; APSATTR 'viewcontext' "16 4 126.6082 97.4197 471.8895 318.0822"; APSATTR 'linkuri' "14 3 'http://www.w3.org' 'W3C' ''"; APSATTR 'name' "14 1 'myName'"; APSATTR 'wire:has-wire' "14 1 'true'"; BEGAPSBODY; BEGAPS 'madeUpId' 'wire:data' STLIST; APSATTR 'type' "14 1 '22'"; APSATTR 'color' "14 1 'green'"; ... Given the current spec, a user can get access at: -screentip and viewcontext by calling getAppStructureAttr() on myId; -linkuri by calling getLinkuris() on myId; -name by calling getNames() on myId; -wire:has-wire by calling getAttributeNS() on myId; Correct? My question is... what should 'attributes' return when called on myId? Returning all five attributes (screentip, viewcontext, linkuri, name, wire:has-wire) as Attr nodes currently can't be done because a linkuri can't be expressed as a Attr Node; linkuri have their own interface; Hyperlink which doesn't derive from Node :-( Do people agree that it is unacceptable to return less than all 5 attributes? One possible approach for fixing the problem would be to make the 'value' attribute of the Attr interface a DOMStringList instead of a DOMString. That way we could remove the Hyperlink interface and state that a linkuri has to be expressed as a DOMStringList containing 3 strings. Thoughts? Or any other suggestions? Regards, -- Benoit mailto:benoit@itedo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]