RE: Listener Methods
"Ozben Evren" <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <5FEE5D408ACA5C4FBCC43F32FEC7EE6F0300C9@exchange> |
Hi everyone, A couple of weeks ago or so, I sent out an e-mail regarding something related to this, but it seems it didn't make it. Rather than adding such functionality (and others) directly into swixML, why not add namespace & namespace processing support? I have implemented a prototype of this, and I believe the performance impact would be quite small (Two conditionals for checking namespaces for each object, if no namespace is used). This allows anybody to extend SwixML anyway they like, without changing the SwixML core. The code I wrote also has a nice side-effect: if it does not know how to process a namespace, just ignores it. This way, it is possible to render a swixml file "normally" even if it has lots of attributes/elements with namespaces. Additions to SwixML that will be required are: - A NamespaceProcessor interface that will be implemented by the processors - A namespace-to-processor map in SwixEngine (with adder/getter methods) - Two conditional checks for checking namespace attributes/child elements I have a basic implementation of such a system, along with an example NamespaceProcessor that uses "events" to wire UI components (Enable/disable components, when radiobuttons are selected etc.).