If you use Content Porter to synchronize the schemas across environments, then yes the schemas will have the same namespace URI.
A commonly used alternative is to manually set the namespace URI when creating the schema. You would adhere to the common standards here and use something like http://www.somecompany.com/[BiggerPurpose]/[SchemaName]
or http://www.sdltridion.com/Metadata/FolderInfo
.
You do have to be careful when changing namespaces on a schema that is already in use, as this will invalidate existing content (content will not be valid according to schema).
My preferred approach anyway is to try to determine at runtime what the namespace is, and this can be done by reading the NamespaceUri
property of the Schema
(or SchemaData
) object in question.