diff --git a/collada_urdf/src/collada_to_urdf.cpp b/collada_urdf/src/collada_to_urdf.cpp
index 3a4d6e6..982f3bf 100644
--- a/collada_urdf/src/collada_to_urdf.cpp
+++ b/collada_urdf/src/collada_to_urdf.cpp
@@ -508,6 +508,7 @@ void printTreeXML(boost::shared_ptr<const Link> link, string name, string file)
   os << "<?xml version=\"1.0\"?>" << endl;
   os << "<robot name=\"" << name << "\"" << endl;
   os << "       xmlns:xi=\"http://www.w3.org/2001/XInclude\"" << endl;
+#if GAZEBO_1_0 // old style, do not match gazebo 4.1
   os << "       xmlns:gazebo=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#gz\"" << endl;
   os << "       xmlns:model=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#model\"" << endl;
   os << "       xmlns:sensor=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor\"" << endl;
@@ -518,8 +519,9 @@ void printTreeXML(boost::shared_ptr<const Link> link, string name, string file)
   os << "       xmlns:rendering=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering\"" << endl;
   os << "       xmlns:renderable=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#renderable\"" << endl;
   os << "       xmlns:controller=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#controller\"" << endl;
-  os << "       xmlns:physics=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#physics\">" << endl;
-
+  os << "       xmlns:physics=\"http://playerstage.sourceforge.net/gazebo/xmlschema/#physics\"" << endl;
+#endif
+  os << "       >" << endl;
   addChildLinkNamesXML(link, os);
 
   addChildJointNamesXML(link, os);
