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, 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,

For the document to be valid (by a validating XML parser) this assertion must be true yes.

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.

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

Thank you.