I think I must add something to Paul. I have tried to write a schema for the Synapse Configuration and ended up with part of it. Synapse Configuration Language is designed in a manner that is very easy to understand by a human. While we are trying to achieve the above we have missed the control of machine validatabality, because there are things in the Synapse CL which cannot be expressed using an XSD. For example;
<target endpoint="string"?> <endpoint ......./>? </target> In the above configuration target element can contain only one of the endpoint attribute or the endpoint child tag but not both. At the same time it is a must to have one of these. AFAIK, there is no mechanism to specify this constrain in an XSD. These two elements are there because, one can predefine the endpoint and refer it with an endpoint attribute or define it inline inside the endpoint child tag. I know it is good to have a XSD for the language, but we have considered this behavior is important than having a schema. We can provide a schema for the language after restricting some of the language features. For example endpoint to has to be defined and referred within target but cannot define inline. You can use the http://synapse.apache.org/Synapse_Configuration_Language as the verbal schema of the language :-), of course this has no value if you want this to be embedded into your XML IDE. Thanks, Ruwan On Sat, Jun 14, 2008 at 1:02 PM, Paul Fremantle <[EMAIL PROTECTED]> wrote: > One reason we don't have a config file XSD is that the config is > extensible. You can package up a mediator + config reader/writer so > that your own "Domain Specific" mediator config adds to the XML. > > Paul > > On Fri, Jun 13, 2008 at 8:43 PM, Asankha C. Perera <[EMAIL PROTECTED]> > wrote: > > Tanmay > >> > >> Then how does Synapse validate any configuration file? Do you have > >> something else instead of schema? > >> > > > > Yes, this is basically done by the package org/apache/synapse/config, > where > > a set of factory and serializer classes digest the given XML and create > the > > object tree, and the reverse. > > > > asankha > > > > > > -- > Paul Fremantle > Co-Founder and CTO, WSO2 > Apache Synapse PMC Chair > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com > -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/
