DOM guide: Resolving URIs: Difference between revisions

From COLLADA Public Wiki
Jump to navigation Jump to search
Elf (talk | contribs)
more example text
Alorino (talk | contribs)
No edit summary
Line 1: Line 1:
When your application encounters a [[URI]], it needs to resolve the actual location of the referenced item.  This page describes how to do this.
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.


:''Andy, here are some random headings that might or might not be what you need to talk about, but they give examples of phrasing.''
==Working with daeURI==


==Resolving full URLs==
===Accessing URI Data===


Some background blah blah
===Resolving URIs===


To resolve URLs:
===Creating URIs===
# first step
# second step
# third step


==Resolving internal references==
==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.


blah blah
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.


==Resolving external references==
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.


blah blah
Use daeDocument::getReferencedDocuments to retrieve a list of all documents that the current document has external URI references to.


==Related topics==
Use daeDocument::getExternalURIs to retrieve a list of pointers to the daeURI objects that reference a specific document.
*[[Creating valid URIs]]  ''(example of what a related topic might be)''
 
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.