|
Hi Hadrian Let me try to explain a bit more about my recent changes.. What I understand is that you propose a way to generate a schema from the code and you propose additions to the api that would make this possible. IMHO this is flawed in at least two ways.No. What I propose is to allow a *mediator factory* (not a medaitor) to specify the schema that could be used to validate an XML configuration as well as be used for tooling as you note, or even to generate a UI to configure such a mediator! Now the MedaitorFactory interface is in o.a.s.config.xml package, and is totally about the XML configuration of the mediators. It is one of the ways in which a Mediator writer can specify how instances of the mediator could be created and configured through an XML configuration. I think renaming the MediatorFactory interface as XMLMediatorFactory would help in making things clearer. Also I am in the process of introducing one method to this interface to get the element declaration, instead of the getTagSchemaType() and getTagSchema() pair to make things less complicated (hopefully :-)).. give me a bit of time to do this.. First, Synapse's design suggests that the construction of the mediator tree is independent of configuration in general and xml configuration in particular.Yes, now if you generate the SynapseConfiguration by any other means than through an XML configuration, you will need to perform your validation etc accordingly. Right now, the SynapseConfigurationBuilder is the connection between the XML based configuration and the rest of Synapse. So, the feature you are proposing would only make sense, design-wise, for the current xml configuration mechanism.Unfortunately yes.. when someone introduces another mechanism to create a Synapse configuration, they will have to solve this problem again to suit that environment. Second reason is that I personally prefer the contract first approach. This sparked many religious debates, and it is not my intent to start one here. However, I think that the syntax and it's semantics should be defined and documented first and not be an artifact of the build system.The generated schema is not an artifact of the build system - again, we are *not* generating a schema at build or runtime. The mediaor factories defines the schema fragments for each mediator, and at runtime we just collect these to build the overall schema required to validate a configuration. I would also gladly volunteer to help with the effort.As always, your feedback and help is very much appreciated :-).. The second issue you raised about dependencies is a valid one, but I suspect less so with jdk 1.5.Im not sure I understand what you mean here? asankha --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] |
- Re: XSD generation for mediator syntax in Synapse Saminda Abeyruwan
- Re: XSD generation for mediator syntax in Synapse Hadrian Zbarcea
- Re: XSD generation for mediator syntax in Syn... Sanjiva Weerawarana
- Re: XSD generation for mediator syntax in... Hadrian Zbarcea
- Re: XSD generation for mediator syntax in Synapse Asankha C. Perera
- Re: XSD generation for mediator syntax in Syn... Hadrian Zbarcea
- Re: XSD generation for mediator syntax in... Asankha C. Perera
- Re: XSD generation for mediator synta... Hadrian Zbarcea
