code: public String normalizeInlineXML(String xml, int transContext) {
          if (transContext == AS_IS) {
              return xml;
          }
          if (transContext == DOTranslationUtility.DESERIALIZE_INSTANCE) {
              // MAKE ABSOLUTE REPO URLs
              return makeAbsoluteURLs(xml);
          } else if (transContext == DOTranslationUtility.SERIALIZE_EXPORT_PUBLIC) {
              // MAKE ABSOLUTE REPO URLs
              return makeAbsoluteURLs(xml);
          } else if (transContext == DOTranslationUtility.SERIALIZE_EXPORT_MIGRATE) {
              // MAKE FEDORA LOCAL REPO URLs
              return makeFedoraLocalURLs(xml);
          } else if (transContext == DOTranslationUtility.SERIALIZE_STORAGE_INTERNAL) {
              // MAKE FEDORA LOCAL REPO URLs
              return makeFedoraLocalURLs(xml);
          } else if (transContext == DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE) {
              // MAKE FEDORA LOCAL REPO URLs
              return makeFedoraLocalURLs(xml);
          }
          return xml;
      }
docs: Utility method to normalize a chunk of inline XML depending on the
  translation context. This is mainly to deal with certain inline XML
  datastreams found in Service Deployment objects that may contain a
  service URL that references the host:port of the local Fedora server.
  This method will usually only ever be called to check WSDL and
  SERVICE_PROFILE inline XML datastream, but is of general utility for
  dealing with any datastreams that may contain URLs that reference the
  local Fedora server. However, it this method should be used sparingly,
  and only on inline XML datastreams where the impact of the conversions is
  well understood.
  
  @param xml
  a chunk of XML that's contents of an inline XML datastream
  @param transContext
  Integer value indicating the serialization or deserialization
  context. Valid values are defined as constants in
  org.fcrepo.server.storage.translation.DOTranslationUtility:
  0=DOTranslationUtility.DESERIALIZE_INSTANCE
  1=DOTranslationUtility.SERIALIZE_EXPORT_PUBLIC
  2=DOTranslationUtility.SERIALIZE_EXPORT_MIGRATE
  3=DOTranslationUtility.SERIALIZE_STORAGE_INTERNAL
  4=DOTranslationUtility.SERIALIZE_EXPORT_ARCHIVE
  @return the inline XML contents with appropriate conversions.