DOM guide: Resolving URIs: Difference between revisions
more example text |
No edit summary |
||
Line 1: | Line 1: | ||
The <code>daeURI</code> class represents URI data types in the [[COLLADA DOM]]. The <code>daeURI</code> class provides an interface for accessing/manipulating the URI string and for resolving the URI reference. | |||
==Working with daeURI== | |||
== | ===Accessing URI Data=== | ||
===Resolving URIs=== | |||
===Creating URIs=== | |||
== | ==External URI References== | ||
By default, the COLLADA DOM will load additional COLLADA documents to resolve external URI references. I will be refering to these COLLADA documents as "external documents". Client applications may want or need finer control over which documents are loaded and when. | |||
The COLLADA DOM provides this functionality with daeURIResolver::setAutoLoadExternalDocuments and various methods of daeDocument class. To disable the DOM from implicitely loading documents when resolving URIs you must call | |||
daeURIResolver::setAutoLoadExternalDocuments( false ); | |||
sometime before you attempt to load a document. | |||
All URIs that reference elements in external documents will not be resolved. You will be returned the value uri_failed_external_document when querying the status of the URI by calling daeURI::getState. | |||
Use daeDocument::getReferencedDocuments to retrieve a list of all documents that the current document has external URI references to. | |||
Use daeDocument::getExternalURIs to retrieve a list of pointers to the daeURI objects that reference a specific document. | |||
When a new document is loaded into the COLLADA DOM, via DAE::load, the COLLADA DOM checks if any currently loaded documents contain any external references to the newly loaded document. If a document does contain an external reference to the newly loaded document the reference is resolved. | |||
[[Category:DOM project|Resolving URIs]] | [[Category:DOM project|Resolving URIs]] |
Revision as of 19:10, 26 March 2007
The daeURI
class represents URI data types in the COLLADA DOM. The daeURI
class provides an interface for accessing/manipulating the URI string and for resolving the URI reference.
Working with daeURI
Accessing URI Data
Resolving URIs
Creating URIs
External URI References
By default, the COLLADA DOM will load additional COLLADA documents to resolve external URI references. I will be refering to these COLLADA documents as "external documents". Client applications may want or need finer control over which documents are loaded and when.
The COLLADA DOM provides this functionality with daeURIResolver::setAutoLoadExternalDocuments and various methods of daeDocument class. To disable the DOM from implicitely loading documents when resolving URIs you must call
daeURIResolver::setAutoLoadExternalDocuments( false );
sometime before you attempt to load a document.
All URIs that reference elements in external documents will not be resolved. You will be returned the value uri_failed_external_document when querying the status of the URI by calling daeURI::getState.
Use daeDocument::getReferencedDocuments to retrieve a list of all documents that the current document has external URI references to.
Use daeDocument::getExternalURIs to retrieve a list of pointers to the daeURI objects that reference a specific document.
When a new document is loaded into the COLLADA DOM, via DAE::load, the COLLADA DOM checks if any currently loaded documents contain any external references to the newly loaded document. If a document does contain an external reference to the newly loaded document the reference is resolved.