How to create an URI?


The DOM guide suggests calling setElement(*target) and subsequently resolveURI() for creating an URI address. However, the first method has been removed from the class
The revision commentary called the method ‘mostly useless’, which I find odd, because there is no apparent alternative except explicit string concatenation by the developer, which kinda defeats the purpose of having a daeURI class. Am I missing something?

The workaroung I am currently using looks like this:

//Material is a domPhysics_material*, Location is a daeElement*
domInstance_physics_material* ipm = daeSafeCast<domInstance_physics_material>(Location->add("instance_physics_material"));
daeURI url(*(Location->getDocumentURI()),std::string("#").append(Material->getId()));
if (ipm->getDocument() == Material->getDocument()){
} else {

Is there a more elegant way?

In any case, the guide should be updated.

Sourceforge is the place to report things to the COLLADA DOM project tracker.