Registering Dialects Using Namespace

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Registering Dialects Using Namespace

Paul Wilson
Hi there,

So I sat down to write a dialect and expected to be able to register it with Thymeleaf by XML namespace (since I'd like page authors to choose the actual prefix, not me). I'm using XSD, not DOCTYPE -- is this possible?

Regards,
Paul
Reply | Threaded
Open this post in threaded view
|

Re: Registering Dialects Using Namespace

danielfernandez
Administrator
Hi,

The prefix to be used for a dialect's artifacts (attributes, tags) has to be specified when registering the dialect in the template engine with "addDialect(String prefix, IDialect dialect)".

Also, a prefix can be specified in the dialect class itself, which will be used as a default if no prefix is specified when adding it to the engine.

Currently there is no way to specify the dialect's prefix only in the XML file, I'm afraid...

Regards,
Daniel.