When an item is added to a project, for some languages (such as C#) the $rootnamespace$ parameter can change depending on where the item is added. For example, if an item is added as a child of the project node, then the namespace of the item will be the default namespace set within the project properties. However, if an item is added to a folder within that node, the name of the folder will be added to the project's default namespace.
For example, suppose an item is added to the MyFolder2 node in the following project, and the project's default namespace is MyNamespace:
MyProject
MyFolder1
MyFolder2
The namespace of the item added will be MyNamespace.MyFolder1.MyFolder2