code: private static void validatePrefixSubstitutionIsPossible(final String oldPrefix, final String newPrefix,
                                                               final SimpleNamespaceResolver currentResolver)
              throws MojoExecutionException {
          // Make certain the newPrefix does not exist already.
          if (currentResolver.getNamespaceURI2PrefixMap().containsValue(newPrefix)) {
              throw new MojoExecutionException(MISCONFIG + "Namespace prefix [" + newPrefix + "] is already in use."
                      + " Cannot replace namespace prefix [" + oldPrefix + "] with [" + newPrefix + "] in file ["
                      + currentResolver.getSourceFilename() + "].");
          }
      }
docs: Validates that the transformation from <code>oldPrefix</code> to <code>newPrefix</code> is possible, in that
  <code>newPrefix</code> is not already used by a schema file. This would corrupt the schema by assigning elements
  from one namespace to another.
  
  @param oldPrefix       The old/current namespace prefix.
  @param newPrefix       The new/future namespace prefix.
  @param currentResolver The currently active SimpleNamespaceResolver.
  @throws MojoExecutionException if any schema file currently uses <code>newPrefix</code>.