[Kernow] Namespace bindings feature added to XQuery Sandbox
Brought to you by:
ajwelch
From: Florent G. <dar...@ya...> - 2007-06-26 23:14:17
|
Hi Andrew, I added a simple functionality, almost to discover Kernow internals and play a little bit with it. I added a button "namespaces" on the XQuery Sandbox panel. It launches a dialogue box (designed after the ParamsDiag class) that allow to add namespace bindings (pairs of String, prefixes and URIs). Bindings are saved to and loaded from the config file. That permits you to add permanently bindings for prefixes 'xsl', 'fo', 'h', and the like. I think that it could be worth having it in a XQuery Sandbox. After this first look, I have a couple of remarks. Mainly about the configuration. I saw Params.java uses static members. And I think Config.java is too monolithic and rather big and could be break down within a few classes. For example for the namespace bindings, I add a new class NamespaceBindings whose the only responsablity is to act as a container for bindings. You can then store it in the configuration, and pass it to the dialog box. The dialog box then never use the config singleton, so it is easier to reuse it later. Unfortunately, NetBeans changed a lot of files, mainly project and build related. It changed also generated code in TabbedView.java and TabbedView.form. So I'm not sure they are suitable to commit. You can instead find a patch and the new files there: http://www.fgeorges.org/tmp/kernow.diff http://www.fgeorges.org/tmp/kernow-simple.diff http://www.fgeorges.org/tmp/NamespaceBindings.java http://www.fgeorges.org/tmp/NamespacesDiag.form http://www.fgeorges.org/tmp/NamespacesDiag.java kernow-simple.diff is a simplification of the patch, with only relevant part in Java sources (that is, without administrative files, TabbedView.form, and without some part in generated code in TabbedView.java). Is that in accord with the way you are developing Kernow? Regards, --drkm _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail |