[Xsltforms-support] A new way for configuration and extensibility
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-12-28 13:58:50
|
Hello, Extensibility is now to be considered for XSLTForms. That's why, with the latest SVN version, it is now possible for other projects to integrate their own sources files without modifying XSLTForms files. The "messages_??.properties" files called from Javascript instructions mechanism is replaced by a similar mechanism, a "config.xsl" file called, of course, from XSLT instructions. XSLT templates can be added in the "config.xsl" file: for matching templates, priority use permits to replace XSLTForms genuine templates. Because named templates cannot be replaced, calling templates have to be changed too, but it would also be possible to test whether a similar named template, "ext-*" for example, is present in the "config.xsl" file. In the "config.xsl" file, the "config" named template allows to define options (<debug/>, <nocss/>) and localization values. It also allows to specify elements, such as <script> or <link> elements, to be added, in the HTML head element, just after xsltforms.js and xsltforms.css calls. Localization can now easily be based on a server-side treatment according to HTTP Accept-Language parameter but, as before, specifying "navigator" in the "config.xsl" file, will ask the Javascript part to, as before, load localization values according to the Javascript "navigator.language" value. Localization values are now stored in a dedicated instance, itself in a dedicated model: they can also be read with XPath and, eventually set by XForms actions or controls. These new features should be very useful for other projects (such as exsltforms : http://sourceforge.net/projects/exsltforms). Don't hesitate to contact me if this is causing problems with already operational use of XSLTForms. Thanks! -Alain |