1 #include "nspace.hh" 2 #include "namespacecollector.hh" 3 #include <sstream> 4 5 using std::string; 6 using std::stringstream; 7 get_unique_prefix(xmlNodePtr m,xmlNodePtr n)8string diffmark::get_unique_prefix(xmlNodePtr m, xmlNodePtr n) 9 { 10 string prefix("dm"); 11 12 NamespaceCollector col(prefix, nsurl); 13 int top = col.get_unused_number(m, n); 14 15 if (top != -1) { 16 stringstream s; 17 s << prefix << top; 18 prefix = s.str(); 19 } 20 21 return prefix; 22 } 23 24