Using URIs in COLLADA: Difference between revisions

From COLLADA Public Wiki
Jump to navigation Jump to search
Elf (talk | contribs)
stubby article just to show what one could do.
 
Elf (talk | contribs)
move text from DOM guide: Loading and saving documents to this waiting spot
Line 1: Line 1:
This article describes the meaning and format of '''URIs''' in [[COLLADA]].
'''URIs''' in [[COLLADA]] must be of the correct standard format to work correctly.


''Fill in information here''
A common mistake is to pass a Windows or Linux file path to the <code>DAE::load</code> or <code>DAE::save</code> methods. Like COLLADA itself, the DOM uses [http://en.wikipedia.org/wiki/Uniform_Resource_Identifier URIs] exclusively to reference resources or files. A file path needs to be converted to a [http://en.wikipedia.org/wiki/URI_scheme file scheme] URI before being passed to the COLLADA DOM. Below are some examples of converting a file path to a URI.
 
'''Example Description'''    '''File Path'''                        '''URI'''
Windows absolute path  C:\folder\file.dae              file:///C:/folder/file.dae
Windows relative path  ..\folder\file.dae              ../folder/file.dae
UNC path              \\remoteMachine\folder\file.dae  file://///remoteMachine/folder/file.dae
Linux absolute path    /folder/file.dae                file:///folder/file.dae
Linux relative path    ../folder/file.dae              ../folder/file.dae


[[Category:COLLADA terminology]]
[[Category:COLLADA terminology]]

Revision as of 20:11, 21 May 2007

URIs in COLLADA must be of the correct standard format to work correctly.

A common mistake is to pass a Windows or Linux file path to the DAE::load or DAE::save methods. Like COLLADA itself, the DOM uses URIs exclusively to reference resources or files. A file path needs to be converted to a file scheme URI before being passed to the COLLADA DOM. Below are some examples of converting a file path to a URI.

Example Description    File Path                        URI
Windows absolute path  C:\folder\file.dae               file:///C:/folder/file.dae
Windows relative path  ..\folder\file.dae               ../folder/file.dae
UNC path               \\remoteMachine\folder\file.dae  file://///remoteMachine/folder/file.dae
Linux absolute path    /folder/file.dae                 file:///folder/file.dae
Linux relative path    ../folder/file.dae               ../folder/file.dae