If you're not directly in the full view template and are instead in an included or embedded template, you have to use the global namespace $#DesignKeys. If that's not the problem, you might be using an older version of eZ Publish that might have a bug in the eZ XML output handler.