Andreas

I agree that we can do this with extensibility, and require users to
use a new namespace for extensions that aren't part of
org.apache.synapse codebase. I wasn't very clear in what I meant.... I
agree its completely possible. I think it just discouraged us!

+1 for creating an XSD and making it part of the Synapse documentation
adn release.

Paul

On Mon, Jun 16, 2008 at 2:38 PM, Andreas Veithen
<[EMAIL PROTECTED]> wrote:
> I think that having an XSD for the Synapse config files would be very
> useful, even if they don't provide complete validation. This would enable
> autocompletion when using an advanced XML editor (e.g. Eclipse) and avoid
> stupid mistakes when writing these files by hand.
>
> @Ruwan: please contribute what you already have; I'm very interested.
> @Paul: the fact that you have an XSD doesn't exclude extensibility; however
> it requires that every extension package defines its own XML namespace.
> @Wayne: I had a quick look at the document about context sensitive grammars
> in XSD. Unfortunately I think that this approach doesn't provide a complete
> solution for our problem.
>
> Andreas
>
> On 14 juin 08, at 17:42, Ruwan Linton wrote:
>
>> Hi Wayne,
>>
>> Thanks for the input, and I must agree that I was trying to build up a CSG
>> in XSD, I think that is what we need from the POV of the IDE integration
>> of
>> the language and validating the language. Not just a schema, isn't it?
>>
>> I will have a look and give it a try once again. :-)
>>
>> Thanks,
>> Ruwan
>>
>> On Sat, Jun 14, 2008 at 8:02 PM, Wayne Keenan <[EMAIL PROTECTED]>
>> wrote:
>>
>>> 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/
>>>>
>>>
>>
>>
>>
>> --
>> Ruwan Linton
>> http://wso2.org - "Oxygenating the Web Services Platform"
>> http://ruwansblog.blogspot.com/
>
>



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

Reply via email to