OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [cgmo-webcgm] Re: Question: MAY versus MUST; Attr


At 10:28 AM 5/27/2005 -0400, Benoit Bezaire wrote:
>Friday, May 27, 2005, 9:42:57 AM, Lofton wrote:
>[...] If attributes are not
>a child, how can they have a parent?
>
>Also, I've never looked at the XPath specification to influence the
>definition of the WebCGM DOM. But note that the XPath specification
>says:
>"5.3 Attribute Nodes
>
>Each element node has an associated set of attribute nodes; the
>element is the parent of each of these attribute nodes; however, an
>attribute node is not a child of its parent element.

Yikes!  I didn't realize that subtlety in Xpath (I just hack away with XSLT).


>NOTE: This is different from the DOM, which does not treat the element
>bearing an attribute as the parent of the attribute (see [DOM])."

Right, understood now.

(To be clear ... I wasn't suggesting to not use the DOM model; rather, I 
was just explaining why I got confused -- XSLT/Xpath tree model is 
different, and that is what I have worked with more.)

>[...]
>LH> I guess you have applied the same principle to WebCGMAttr?
>Yes, the DOM spec has been successfully used since 1998, I don't see
>why we should diverge from it.

I completely agree.


>LH> Am I the only one to whom these points were not obvious in
>LH> Ch.5? (Both the structure of the document tree in terms of
>LH> parents/children, and the rules on the particular WebCGMNode
>LH> attributes like parentNode.)
>FYI, I had to read the DOM spec more than once to understand it to an
>acceptable level. I think that's typical for this type of
>specification.
>
>We could increase the Interface WebCGMAttr wording to include some of
>the clarifications that you've mentioned above. That would probably

It would certainly help me.  On the other hand, I'm a duffer / hacker on 
DOM-ish programming.  If we are targeting those with higher level of DOM 
expertise and experience, more wording might not be necessary.  If we want 
the likes of me to understand easily, perhaps more clarification would be good.

Cheers,
-Lofton.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]