public interface IDialect
Interface for all Thymeleaf Dialects.
A Dialect must define:
IProcessor
interface, that will be able to process and apply logic to DOM nodes (mainly elements
and their attributes) starting with the specified prefix.IDocTypeTranslation
interface, which will be applied when processing templates.IDocTypeResolutionEntry
interface, that will be fed into the EntityResolver
of the XML parser
so that DTD files can be retrieved as (maybe local) resources – depending on the specific
implementation of the interface.A template engine can be specified more than one dialect (each with its processors). In that case, dialects are first checked for conflicts so that, for example, they do not declare DOCTYPE translations or resolution entries conflicting with the ones in other dialect/s (although they can be equal).
Modifier and Type | Method and Description |
---|---|
Set<IDocTypeResolutionEntry> |
getDocTypeResolutionEntries()
Returns the set of DOCTYPE resolution entries.
|
Set<IDocTypeTranslation> |
getDocTypeTranslations()
Returns the set of DOCTYPE translations.
|
Map<String,Object> |
getExecutionAttributes()
Returns the execution attributes that will be set during executions
of the template engine.
|
String |
getPrefix()
Returns the default dialect prefix (the one that will be used if none is explicitly
specified during dialect configuration).
|
Set<IProcessor> |
getProcessors()
Returns the set of processors.
|
String getPrefix()
Returns the default dialect prefix (the one that will be used if none is explicitly specified during dialect configuration).
If null is returned, then every attribute and/or element is considered processable by the processors in the dialect that apply to that kind of node (elements with their attributes), and not only those that start with a specific prefix.
Prefixes are not exclusive to a dialect: several dialects can declare the same prefix, effectively acting as an aggregate dialect.
Set<IProcessor> getProcessors()
Returns the set of processors.
Map<String,Object> getExecutionAttributes()
Returns the execution attributes that will be set during executions of the template engine.
If more than one dialect are set, all of their execution attributes will be added to the available execution attributes map.
Set<IDocTypeTranslation> getDocTypeTranslations()
Returns the set of DOCTYPE translations.
Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries()
Returns the set of DOCTYPE resolution entries.
Copyright © 2017 The THYMELEAF team. All rights reserved.