Hadrian,
If we do that then we will have to make sure it is consistent across
the board. i can see several mediator's whose syntax has
source="xpath"
<transform xslt|xquery="url" [source="xpath"]>
<switch source="xpath">
<validate schema="url" [source="xpath"]>
-- dims
On 7/12/06, Hadrian Zbarcea <[EMAIL PROTECTED]> wrote:
+1.
May I suggest changing @source with something imho more self explanatory
like @test or @match?
Thanks
Hadrian
On 7/12/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
>
Let me try another variation to see if folks like it:
Syntax:
<filter source="xpath" [regex="string"]>
mediator+
</filter>
Explanation:
If the regular expression is present then the <filter> mediator
matches the evaluation result of a source xpath expression against the
given regular expression. If the regex is absent, then the mediator
tests the given source xpath expression as a boolean expression. In
either case, If the test succeeds, the filter mediator will execute
the enclosed mediators in sequence.
Is this any clearer than the text and syntax on the wiki page? [1] or
am i way off base again?
thanks,
dims
[1]
http://wiki.apache.org/incubator/Synapse/SynapseConfigurationLanguage
On 7/12/06, Sanjiva Weerawarana < [EMAIL PROTECTED]> wrote:
> So you come from the XML Schema validation is a good thing camp I
> see ;-).
>
> So I'm generally, always, -1 on changing the language syntax to make the
> syntax schema validatable. Personally I don't give a damn about that ..
> let the language do what is best and if XSD can validate, great. If not
> too bad. In any case, XSD validation is not a really sufficient
> condition - its just a necessary condition and we can easily write a
> schema that is more relaxed than the original to make it pass.
>
> This particular change is ugly IMO .. the use of "@source" is to
> (optionally) identify the source data and xpath vs. regex was the
> pattern that must match.
>
> I think we need to maintain the principle that we design the language
> syntax to be as natural as we can get an ugly XML syntax .. and not
> worry about XSD validation, except if there's a minor tweak that can be
> done to make something work.
>
> Sanjiva.
>
> On Wed, 2006-07-12 at 18:23 +0530, Asankha C. Perera wrote:
> > Before I post this on the Wiki or proceed any further, I would like your
> > comments on the following..:
> >
> > The problem is around the existing language syntax which does not allow
> > us to properly validate a configuration through a schema. Let me take
> > the filter mediator as an example, and our configuration language states
> > the following :
> >
> > <filter (source="xpath" regex="string") | xpath="xpath"> mediator+
> > </filter>
> >
> > Shall we change this to
> >
> > <filter xpath="xpath" [regex="string"]> mediator+ </filter> instead, so
> > that the schema provided for this mediator could be used to validate a
> > config using it?
> >
> > The same goes for a few mediators as shown in the attached schema, and a
> > sample file which shows some examples with the proposed syntax.
> >
> > asankha
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]