APISonar


org.thymeleaf.templatemode.TemplateMode.XML

> org > thymeleaf > templatemode > TemplateMode > XML
org APIs thymeleaf APIs templatemode APIs TemplateMode APIs XML APIs

Example 1
public Set<IProcessor> getProcessors(String dialectPrefix) {
		final Set<IProcessor> processors = new LinkedHashSet<IProcessor>();
		processors.add(new ConnectedAttrProcessor(TemplateMode.HTML, SOCIAL_DIALECT_PREFIX));
		processors.add(new ConnectedAttrProcessor(TemplateMode.XML, SOCIAL_DIALECT_PREFIX));
		return processors;
	}
Example 2
private Text computeWhiteSpacePrecedingIteration(final ElementName iteratedElementName) {
        if (this.secondToLastEvent == null || !(this.secondToLastEvent instanceof IText)) {
            return null;
        }
        if (this.templateMode == TemplateMode.XML ||
                (this.templateMode == TemplateMode.HTML && ITERATION_WHITESPACE_APPLICABLE_ELEMENT_NAMES.contains(iteratedElementName))) {
            final Text lastEngineText = Text.asEngineText((IText) this.secondToLastEvent);
            if (lastEngineText.isWhitespace()) {
                return lastEngineText;
            }
        }
        return null;
    }
Example 3
public static MatchingAttributeName forAttributeName(final TemplateMode templateMode, final AttributeName matchingAttributeName) {
        Validate.notNull(templateMode, "Template mode cannot be null");
        Validate.notNull(matchingAttributeName, "Matching attribute name cannot be null");
        if (templateMode == TemplateMode.HTML && !(matchingAttributeName instanceof HTMLAttributeName)) {
            throw new IllegalArgumentException("Attribute names for HTML template mode must be of class " + HTMLAttributeName.class.getName());
        } else if (templateMode == TemplateMode.XML && !(matchingAttributeName instanceof XMLAttributeName)) {
            throw new IllegalArgumentException("Attribute names for XML template mode must be of class " + XMLAttributeName.class.getName());
        } else if (templateMode.isText() && !(matchingAttributeName instanceof TextAttributeName)) {
            throw new IllegalArgumentException("Attribute names for any text template modes must be of class " + TextAttributeName.class.getName());
        }
        return new MatchingAttributeName(templateMode, matchingAttributeName, null, false);
    }