XmlElementDescriptor (XmlElementDescriptor base, final XmlTag childTag) { final String namespace = childTag.getNamespace(); final XmlExtension extension = XmlExtension.getExtensionByElement(childTag); if(!XmlUtil.XHTML_URI.equals(namespace) && ( base.getContentType() != XmlElementDescriptor.CONTENT_TYPE_EMPTY || (extension != null && extension.isCustomTagAllowed(childTag)) // allow custom tag ) ) { return new AnyXmlElementDescriptor(base,childTag.getNSDescriptor(namespace,true)); } return null; }