HI,

What your after is to be able define a context sensitve grammar in XSD, not
something I would have thought possible but after a quick google it is
perhaps doable:  http://www.w3.org/2000/04/26-csrules.html

I've not studied the doc in any great depth, and the application of a CSG in
XSD is new to me. I'malso  unsure as to how it would apply to all of
Synapses config,  especially the config extesbility.  However, perhaps for
those extention points  a  xsd:anyType in the XSD may suffice? Or perhaps
'typedef'd as a XSD type, e.g.  synapsens:SynapseExtentionPoint.
Editor/tools would know not to iterperte the config at such points, unless
they were made aware of the custom extension's own XSD (should extations
writers have provided one)

Im sur eit would be dooable, and a cool/nifty feature for extarnal support,
but there is the trade off with maintenance, flexibility/agility,
testability, conformance...  blah blah...


regards
Wayne

On Sat, Jun 14, 2008 at 2:44 PM, Ruwan Linton <[EMAIL PROTECTED]>
wrote:

> 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_Languageas
> 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/
>

Reply via email to