|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDialect
Interface for all Thymeleaf Dialects.
A Dialect must define:
IAttrProcessor
interface, that will be able to process and apply logic to attributes starting
with the specified prefix.ITagProcessor
interface, that will be able to process and apply logic to tags starting
with the specified prefix.IValueProcessor
interface that will be used by attribute and tag processors in order to
evaluate different kinds of expressions (e.g. externalized message expressions,
variable expressions...).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 tag/attribute 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).
Method Summary | |
---|---|
Set<IAttrProcessor> |
getAttrProcessors()
Returns the set of attribute processors. |
Set<IDocTypeResolutionEntry> |
getDocTypeResolutionEntries()
Returns the set of DOCTYPE resolution entries. |
Set<IDocTypeTranslation> |
getDocTypeTranslations()
Returns the set of DOCTYPE translations. |
String |
getPrefix()
Returns the default dialect prefix (the one that will be used if none is explicitly specified during dialect configuration). |
Set<ITagProcessor> |
getTagProcessors()
Returns the set of tag processors. |
Set<IValueProcessor> |
getValueProcessors()
Returns the set of value processors. |
boolean |
isLenient()
Returns whether the dialect is lenient or not. |
Method Detail |
---|
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 tag is considered processable by the processors in the dialect, 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.
boolean isLenient()
Returns whether the dialect is lenient or not. If the dialect is not lenient, then the existence of attributes or tags starting with the dialect prefix for which no attribute/tag processor exists is considered an error.
For non-lenient dialects, any xmlns:{prefix} attributes in the document root or any other element will be removed from output. These attributes will not be removed for lenient dialects.
When several dialects act on the same prefix, a prefix will be considered to be lenient if any of the dialects for that prefix is lenient.
Unless it is really required (for instance, in dialects with null prefix), dialects should be non-lenient.
Set<IAttrProcessor> getAttrProcessors()
Returns the set of attribute processors.
Set<ITagProcessor> getTagProcessors()
Returns the set of tag processors.
Set<IValueProcessor> getValueProcessors()
Returns the set of value processors.
Set<IDocTypeTranslation> getDocTypeTranslations()
Returns the set of DOCTYPE translations.
Set<IDocTypeResolutionEntry> getDocTypeResolutionEntries()
Returns the set of DOCTYPE resolution entries.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |