code: private boolean isExtension(final Attr attribute) {
  
          final Element parent = attribute.getOwnerElement();
  
          return XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(parent.getNamespaceURI())
                  && EXTENSION_ELEMENT_NAME.equalsIgnoreCase(parent.getLocalName())
                  && EXTENSION_BASE_ATTRIBUTE_NAME.equalsIgnoreCase(attribute.getName())
                  && attribute.getValue().startsWith(oldPrefix + ":");
      }
docs: Discovers if the provided attribute is a namespace reference to the oldPrefix namespace, on the form
  <p/>
  <pre>
  <code>&lt;xs:extension base="[oldPrefix]:importItem"&gt;</code>
  </pre>
  
  @param attribute the attribute to test.
  @return <code>true</code> if the provided attribute is named "extension" and starts with
  <code>[oldPrefix]:</code>, in which case it is a reference to the oldPrefix namespace.