Author: ruwan
Date: Sat Jul 10 22:47:25 2010
New Revision: 962937

URL: http://svn.apache.org/viewvc?rev=962937&view=rev
Log:
Adding the validate mediator schema

Added:
    synapse/trunk/java/repository/schema/mediators/core/validate.xsd
Modified:
    synapse/trunk/java/repository/schema/mediators/mediators.xsd
    synapse/trunk/java/repository/schema/misc/common.xsd

Added: synapse/trunk/java/repository/schema/mediators/core/validate.xsd
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/repository/schema/mediators/core/validate.xsd?rev=962937&view=auto
==============================================================================
--- synapse/trunk/java/repository/schema/mediators/core/validate.xsd (added)
+++ synapse/trunk/java/repository/schema/mediators/core/validate.xsd Sat Jul 10 
22:47:25 2010
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  ~  Licensed to the Apache Software Foundation (ASF) under one
+  ~  or more contributor license agreements.  See the NOTICE file
+  ~  distributed with this work for additional information
+  ~  regarding copyright ownership.  The ASF licenses this file
+  ~  to you under the Apache License, Version 2.0 (the
+  ~  "License"); you may not use this file except in compliance
+  ~  with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~  Unless required by applicable law or agreed to in writing,
+  ~  software distributed under the License is distributed on an
+  ~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~  KIND, either express or implied.  See the License for the
+  ~  specific language governing permissions and limitations
+  ~  under the License.
+  -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified"
+           targetNamespace="http://synapse.apache.org/ns/2010/04/configuration";
+           xmlns="http://synapse.apache.org/ns/2010/04/configuration";>
+
+    <xs:include schemaLocation="../mediators.xsd"/>
+    <xs:include schemaLocation="../../misc/common.xsd"/>
+
+    <xs:element name="validate">
+        <xs:annotation>
+            <xs:documentation source="description">
+                Validate mediator to validate the messages over a given schema
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="schema" minOccurs="1" maxOccurs="1">
+                    <xs:annotation>
+                        <xs:documentation>
+                            The schema configuration over which the message is 
validated
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:attribute name="key" type="xs:string" 
use="required"/>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element name="on-fail" minOccurs="0" maxOccurs="1">
+                    <xs:annotation>
+                        <xs:documentation>
+                            When the schema validation fail the validate 
mediator executes the
+                            on-fail sequence, while it continues the execution 
if it is successful
+                        </xs:documentation>
+                    </xs:annotation>
+                    <xs:complexType>
+                        <xs:group ref="mediatorList" minOccurs="1" 
maxOccurs="unbounded"/>
+                    </xs:complexType>
+                </xs:element>
+                <xs:element ref="feature" minOccurs="0" maxOccurs="unbounded"/>
+            </xs:sequence>
+            <xs:attribute name="source" type="xs:string" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+
+</xs:schema>
\ No newline at end of file

Modified: synapse/trunk/java/repository/schema/mediators/mediators.xsd
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/repository/schema/mediators/mediators.xsd?rev=962937&r1=962936&r2=962937&view=diff
==============================================================================
--- synapse/trunk/java/repository/schema/mediators/mediators.xsd (original)
+++ synapse/trunk/java/repository/schema/mediators/mediators.xsd Sat Jul 10 
22:47:25 2010
@@ -29,6 +29,7 @@
     <xs:include schemaLocation="core/log.xsd"/>
     <xs:include schemaLocation="core/property.xsd"/>
     <xs:include schemaLocation="core/drop.xsd"/>
+    <xs:include schemaLocation="core/validate.xsd"/>
 
     <xs:group name="mediatorList">
         <xs:annotation>
@@ -54,6 +55,7 @@
             <xs:element ref="log"/>
             <xs:element ref="property"/>
             <xs:element ref="drop"/>
+            <xs:element ref="validate"/>
         </xs:choice>
     </xs:group>
 

Modified: synapse/trunk/java/repository/schema/misc/common.xsd
URL: 
http://svn.apache.org/viewvc/synapse/trunk/java/repository/schema/misc/common.xsd?rev=962937&r1=962936&r2=962937&view=diff
==============================================================================
--- synapse/trunk/java/repository/schema/misc/common.xsd (original)
+++ synapse/trunk/java/repository/schema/misc/common.xsd Sat Jul 10 22:47:25 
2010
@@ -54,6 +54,19 @@
         </xs:complexType>
     </xs:element>
 
+    <xs:element name="feature">
+        <xs:annotation>
+            <xs:documentation source="description">
+                This is a feature, with a name value pair as its configuration
+                and mainly used in the validate mediator
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:attribute name="name" type="xs:string" use="required"/>
+            <xs:attribute name="value" type="xs:boolean" use="required"/>
+        </xs:complexType>
+    </xs:element>
+
     <xs:group name="inlineWsdl">
         <xs:choice>
             <xs:element ref="wsdl11:definitions" minOccurs="0" maxOccurs="1"/>


Reply via email to