+ /**
+ * The common (fully qualified) representation of this name, as defined in
+ * {@link QName#toString()}. This should be used when a fully qualified
+ * representation is required, as subclasses of {@link QName} may override the
+ * {@link QName#toString()} method.
+ *
+ * @see ContentName#toString()
+ */
+ public static String toFullyQualified(QName name) {
+ if (name.getNamespaceURI().equals(XMLConstants.NULL_NS_URI)) {
+ return name.getLocalPart();
+ } else {
+ return "{" + name.getNamespaceURI() + "}" + name.getLocalPart();
+ }
+
+ }
+