public XmlAttributeDescriptor getAttributeDescriptor(String attributeName, final XmlTag context) { String caseSensitiveAttributeName = !myCaseSensitive ? attributeName.toLowerCase() : attributeName; XmlAttributeDescriptor descriptor = super.getAttributeDescriptor(caseSensitiveAttributeName, context); if (descriptor == null) descriptor = RelaxedHtmlFromSchemaElementDescriptor.getAttributeDescriptorFromFacelets( attributeName, context); if (descriptor == null) { String prefix = XmlUtil.findPrefixByQualifiedName(attributeName); if ("xml" .equals( prefix)) { // todo this is not technically correct dtd document references namespaces // but we should handle it at least for xml stuff XmlNSDescriptor nsdescriptor = context.getNSDescriptor(XmlUtil.XML_NAMESPACE_URI, true); if (nsdescriptor instanceof XmlNSDescriptorImpl) { descriptor = ((XmlNSDescriptorImpl) nsdescriptor) .getAttribute( XmlUtil.findLocalNameByQualifiedName(caseSensitiveAttributeName), XmlUtil.XML_NAMESPACE_URI, context); } } } if (descriptor == null && HtmlUtil.isHtml5Context(context)) { descriptor = myDelegate.getAttributeDescriptor(attributeName, context); } return descriptor; }
public XmlAttributeDescriptor getAttributeDescriptor(String attributeName, final XmlTag context) { final XmlAttributeDescriptor descriptor = myDelegate.getAttributeDescriptor(attributeName.toLowerCase(), context); if (descriptor != null) return descriptor; return RelaxedHtmlFromSchemaElementDescriptor.getAttributeDescriptorFromFacelets( attributeName, context); }
public XmlElementDescriptor getElementDescriptor(XmlTag childTag, XmlTag contextTag) { XmlElementDescriptor elementDescriptor = myDelegate.getElementDescriptor(childTag, contextTag); if (elementDescriptor == null) { return RelaxedHtmlFromSchemaElementDescriptor.getRelaxedDescriptor(this, childTag); } return elementDescriptor; }
public XmlElementDescriptor getElementDescriptor(XmlTag element, XmlTag contextTag) { String name = element.getName(); if (!myCaseSensitive) name = name.toLowerCase(); XmlElementDescriptor xmlElementDescriptor = getElementDescriptor(name, element); if (xmlElementDescriptor == null && myRelaxed) { xmlElementDescriptor = RelaxedHtmlFromSchemaElementDescriptor.getRelaxedDescriptor(this, element); } return xmlElementDescriptor; }
public XmlAttributeDescriptor[] getAttributesDescriptors(final XmlTag context) { return RelaxedHtmlFromSchemaElementDescriptor.addAttrDescriptorsForFacelets( context, super.getAttributesDescriptors(context)); }