code: protected void initValidationRules(Element root, CmsXmlContentDefinition contentDefinition) throws CmsXmlException {
  
          List<Element> elements = new ArrayList<Element>(CmsXmlGenericWrapper.elements(root, APPINFO_RULE));
          elements.addAll(CmsXmlGenericWrapper.elements(root, APPINFO_VALIDATIONRULE));
          Iterator<Element> i = elements.iterator();
          while (i.hasNext()) {
              // iterate all "rule" or "validationrule" elements in the "validationrules" node
              Element element = i.next();
              String elementName = element.attributeValue(APPINFO_ATTR_ELEMENT);
              String regex = element.attributeValue(APPINFO_ATTR_REGEX);
              String type = element.attributeValue(APPINFO_ATTR_TYPE);
              if (type != null) {
                  type = type.toLowerCase();
              }
              String message = element.attributeValue(APPINFO_ATTR_MESSAGE);
              if ((elementName != null) && (regex != null)) {
                  // add a validation rule for the element
                  addValidationRule(
                      contentDefinition,
                      elementName,
                      regex,
                      message,
                      APPINFO_ATTR_TYPE_WARNING.equals(type));
              }
          }
      }
docs: Initializes the validation rules this content handler.<p>
  
  OpenCms always performs XML schema validation for all XML contents. However,
  for most projects in the real world a more fine-grained control over the validation process is
  required. For these cases, individual validation rules can be defined for the appinfo node.<p>
  
  @param root the "validationrules" element from the appinfo node of the XML content definition
  @param contentDefinition the content definition the validation rules belong to
  
  @throws CmsXmlException if something goes wrong