Results 1 to 3 of 3

Thread: geometry id uniqueness

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    4

    geometry id uniqueness

    I am implementing some collada .dae import functionality to an OpenGL application.

    Referring to the collada spec version 1.5, pg 5-42 of the http://www.khronos.org/files/collada_spec_1_5.pdf, under geometry id it says
    A text string containing the unique identifier of the <geometry> element. This value must be unique within the instance document. Optional.
    From the perspective of the import module, can it be assumed that each geometry element under library_geometries will have a unique id attribute, or do I need to assert that it does by searching previously read geometry id's?

    It would seem that I can make the assumption that each geometry id I read is going to be unique, but I would like to be certain.

    Thank you,
    Charles

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: geometry id uniqueness

    Quote Originally Posted by cg_chas
    From the perspective of the import module, can it be assumed that each geometry element under library_geometries will have a unique id attribute, or do I need to assert that it does by searching previously read geometry id's?
    For the document to be valid (by a validating XML parser) this assertion must be true yes.
    Quote Originally Posted by cg_chas
    It would seem that I can make the assumption that each geometry id I read is going to be unique, but I would like to be certain.
    Is XML validation part of your tool chain?

    If not, then you must guard against invalid documents where the id attributes in the document are not all unique. Using a map [ id, element ] is one way to implement that on a per document basis.

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    4

    Re: geometry id uniqueness

    Is XML validation part of your tool chain?
    Not as of yet, but it will be.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •