Difference between revisions of "Talk:DOM guide: Working with elements"

From COLLADA Public Wiki
Jump to navigation Jump to search
(→‎Belonging to a document: further questions)
Line 6: Line 6:
 
*What is a domCOLLADA element and why is it important to know whether you can assume it?
 
*What is a domCOLLADA element and why is it important to know whether you can assume it?
 
[[User:Elf|Elf]] 11:16, 23 March 2007 (PDT)
 
[[User:Elf|Elf]] 11:16, 23 March 2007 (PDT)
 +
 +
hmm. Being able do know that the element is a domCOLLADA isn't really important. The domCOLLADA element is the root of a COLLADA Document. So root nodes have no parents, hence the being able to assume so. It is possible to create element trees that aren't part of a document and aren't inserted in the database. I don't know of anyone who does that but it is possible. In that case though the root node of the tree is not necessarily a domCOLLADA it could be any element.
 +
Calling getDocument or getDocumentURI would work as a test if it is in a document or not. A return value of NULL would mean it isn't in a document.
 +
[[User:Alorino|Alorino]] 11:34, 23 March 2007 (PDT)
  
 
==Terminology questions==
 
==Terminology questions==
Line 15: Line 19:
  
 
[[User:Elf|Elf]] 11:08, 23 March 2007 (PDT)
 
[[User:Elf|Elf]] 11:08, 23 March 2007 (PDT)
 +
#COLLADA DOM is the whole API. The COLLADA Object Model is the element tree, essentially all of the dom* classes. Its what is talked about in the [[DOM Guide: Object Model]] page.
 +
#Its part of the COLLADA DOM
 +
#Yes. I think Reflective Object Model and Reflective Object System can be used interchangably. In the existing programming guide it was called ROS. In my notes I might have called it ROM. I think I prefer ROS.
 +
[[User:Alorino|Alorino]] 11:34, 23 March 2007 (PDT)

Revision as of 18:34, 23 March 2007

Belonging to a document

Andy, you said: "If the element belongs to a document"--how do you know if it does? By using getDocumentURI? The preceding paragraph seems to imply that you will always get a result using get..URI; but this sentence seems to imply that sometimes it won't. When would it not belong to a document and what would get..URI do in that case? Elf 11:02, 23 March 2007 (PDT)

The complete sentence is "If the element belongs to a document then it is safe to assume that the element is a domCOLLADA element.":

  • This sentence is in the paragraph discussing parent elements, and it's not clear how this info is related to the parent.
  • What is a domCOLLADA element and why is it important to know whether you can assume it?

Elf 11:16, 23 March 2007 (PDT)

hmm. Being able do know that the element is a domCOLLADA isn't really important. The domCOLLADA element is the root of a COLLADA Document. So root nodes have no parents, hence the being able to assume so. It is possible to create element trees that aren't part of a document and aren't inserted in the database. I don't know of anyone who does that but it is possible. In that case though the root node of the tree is not necessarily a domCOLLADA it could be any element. Calling getDocument or getDocumentURI would work as a test if it is in a document or not. A return value of NULL would mean it isn't in a document. Alorino 11:34, 23 March 2007 (PDT)

Terminology questions

  • Is "COLLADA Object Model" the same as "COLLADA DOM"?
  • Is "Reflective Object System" a component of COLLADA, or of COLLADA DOM?

Elf 11:08, 23 March 2007 (PDT)

  1. COLLADA DOM is the whole API. The COLLADA Object Model is the element tree, essentially all of the dom* classes. Its what is talked about in the DOM Guide: Object Model page.
  2. Its part of the COLLADA DOM
  3. Yes. I think Reflective Object Model and Reflective Object System can be used interchangably. In the existing programming guide it was called ROS. In my notes I might have called it ROM. I think I prefer ROS.

Alorino 11:34, 23 March 2007 (PDT)