DOM guide: Resolving SIDs: Difference between revisions

From COLLADA Public Wiki
Jump to navigation Jump to search
Elf (talk | contribs)
m DOM SID resolver system moved to DOM guide: Resolving SIDs: better name for content
Elf (talk | contribs)
convert to somewhat guidey format
Line 1: Line 1:
Notes about the [[COLLADA DOM]] '''SID Resolver''' {{editor | what=  Andy says to put in the user guide--maybe merge.}}
In [[COLLADA]], some elements are identified with an ''sid''. In the [[COLLADA DOM]], <code>daeSIDResolver</code> is a helper class to resolve these COLLADA address syntax targets. It can also be used to do “sidRef” type of lookups (used a lot in [[COLLADA FX]] and [[COLLADA Physics]]).


<code>daeSIDResolver</code> is a helper class to resolve COLLADA address syntax targets. It can also be used to do “sidRef” type of lookups (used a lot in [[CFX]] and [[CPhysics]]).
To resolve a normal/absolute COLLADA ''sid'' target (for example, in <animation>/<channel> elements), pass it:
* The containing element (same concept as in <code>daeURI</code>); this can actually be any element that belongs to the same document because the document [[URI]] is the only piece of data it requires.
* The target string
* Optionally, the profile to look into (defaults to use COMMON profile)


To resolve a normal/absolute COLLADA sid target (like in animation channel elements), you need to pass in the containing element (same concept as in <code>daeURI</code>), the target string, and optionally the profile to look into (defaults to use COMMON profile).
To “hack it” to do ''sid'' lookups used in COLLADA FX, you can pass in a relative target string. This must be done programmatically because the documents specify “sid refs” by ''sid'' alone and not in relative COLLADA addressing syntax. For example, <code>SomeSID</code> would become <code>./SomeSID</code>. Then the container would be where to start the look from.
 
With normal/absolute target resolving, the container can actually be any element that belongs to the same document since the document URI is the only piece of data it requires.
 
To “hack it” to do sid lookups used in CFX, you can pass in a relative target string. This will need to be made programmatically since the documents specify “sid refs” by sid alone and not in relative COLLADA addressing syntax. An example, <code>SomeSID</code> would become <code>./SomeSID</code>. Then the container would be where to start the look from.


{{DOM navigation}}
{{DOM navigation}}


[[Category:DOM subsystems|SID resolver system]]
[[Category:DOM guide|Resolving SIDs]]

Revision as of 19:54, 25 May 2007

In COLLADA, some elements are identified with an sid. In the COLLADA DOM, daeSIDResolver is a helper class to resolve these COLLADA address syntax targets. It can also be used to do “sidRef” type of lookups (used a lot in COLLADA FX and COLLADA Physics).

To resolve a normal/absolute COLLADA sid target (for example, in <animation>/<channel> elements), pass it:

  • The containing element (same concept as in daeURI); this can actually be any element that belongs to the same document because the document URI is the only piece of data it requires.
  • The target string
  • Optionally, the profile to look into (defaults to use COMMON profile)

To “hack it” to do sid lookups used in COLLADA FX, you can pass in a relative target string. This must be done programmatically because the documents specify “sid refs” by sid alone and not in relative COLLADA addressing syntax. For example, SomeSID would become ./SomeSID. Then the container would be where to start the look from.


COLLADA DOM - Version 2.4 Historical Reference
List of main articles under the DOM portal.
User Guide chapters:  • Intro  • Architecture  • Setting up  • Working with documents  • Creating docs  • Importing docs  • Representing elements  • Working with elements  • Resolving URIs  • Resolving SIDs  • Using custom COLLADA data  • Integration templates  • Error handling

Systems:  • URI resolver  • Meta  • Load/save flow  • Runtime database  • Memory • StringRef  • Code generator
Additional information:  • What's new  • Backward compatibility  • Future work
Terminology categories:  • COLLADA  • DOM  • XML