{
     std::string error;
     const xmlpp::Element* element(get_element_by_id(root, id));
-    // [RP:20071024]: use "demangled" attribute instead of "name" to cover nested namespaces:
-    if ((!element)||(!element->get_attribute("demangled"))) return error;
-    return element->get_attribute("demangled")->get_value();
+    // castxml does not support "demangled" attribute -> recursivly concat nested namespaces
+    if ((!element)||(element->get_attribute("name")->get_value() == "::")) return error;
+    else return get_namespace(root,element->get_attribute("context")->get_value() ) + element->get_attribute("name")->get_value() + "::";
 }
 
 //! procedure marked for export?
 bool is_marked(const std::string &attrs)
 {
     // todo: improve this
-    std::string to_match("gccxml(libt2n-");
+    std::string to_match("annotate(libt2n-");
     std::string::size_type p(attrs.find(to_match));
     return (p!=std::string::npos);
 }
     if (element->get_attribute("context"))
     {
         ret.name=get_namespace(root, element->get_attribute("context")->get_value());
-        if (ret.name!="::")
-            ret.name+="::";
-        else
-            // do not explicitely add ::
-            ret.name="";
     }
     ret.name+=element->get_attribute("name")->get_value();
     return ret;
         f.ret_type=get_type(root, returns->get_value());
         f.name=name->get_value();
         f.mangled=mangled->get_value();
-
         xmlpp::Node::NodeList list = node->get_children("Argument");
         for (xmlpp::Node::NodeList::iterator iter = list.begin(); iter != list.end(); ++iter)
         {
                 if(arg->get_attribute("attributes"))
                 {
                     std::string attr=arg->get_attribute("attributes")->get_value();
-                    const std::string look_for = "gccxml(libt2n-default-arg,";
+                    const std::string look_for = "annotate(libt2n-default-arg,";
 
                     if (attr.compare(0,look_for.size(),look_for) == 0)
                         a.defaultArg=attr.substr(look_for.size(),attr.size()-look_for.size()-1);