code: private void parseNamespaceValidationElements(Element messageElement, XmlMessageValidationContext context) {
          //check for validate elements, these elements can either have script, xpath or namespace validation information
          //for now we only handle namespace validation
          Map<String, String> validateNamespaces = new HashMap<String, String>();
  
          List<?> validateElements = DomUtils.getChildElementsByTagName(messageElement, "validate");
          if (validateElements.size() > 0) {
              for (Iterator<?> iter = validateElements.iterator(); iter.hasNext();) {
                  Element validateElement = (Element) iter.next();
  
                  //check for namespace validation elements
                  List<?> validateNamespaceElements = DomUtils.getChildElementsByTagName(validateElement, "namespace");
                  if (validateNamespaceElements.size() > 0) {
                      for (Iterator<?> namespaceIterator = validateNamespaceElements.iterator(); namespaceIterator.hasNext();) {
                          Element namespaceElement = (Element) namespaceIterator.next();
                          validateNamespaces.put(namespaceElement.getAttribute("prefix"), namespaceElement.getAttribute("value"));
                      }
                  }
              }
              context.setControlNamespaces(validateNamespaces);
          }
      }
docs: Parses validation elements and adds information to the message validation context.
  
  @param messageElement the message DOM element.
  @param context the message validation context.