blob: d8f430d811c80ed605ec30af582f128e6720eef7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
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"
attributeFormDefault="unqualified"
targetNamespace="http://activemq.apache.org/camel/schema/spring"
xmlns:c="http://activemq.apache.org/camel/schema/spring"
xmlns:s="http://www.springframework.org/schema/beans"
>
<xs:import namespace="http://www.springframework.org/schema/beans"/>
<xs:annotation>
<xs:documentation><![CDATA[
The Apache Camel XML Configuration Schema
Configurations usually start from the <camelContext/> element
]]></xs:documentation>
</xs:annotation>
<xs:element name="camelContext">
<xs:annotation>
<xs:documentation><![CDATA[
The root element of a camel configuration
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="s:identifiedType">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="1" ref="c:beanPostProcessor"/>
<xs:element minOccurs="0" maxOccurs="1" ref="c:endpoint"/>
<xs:element minOccurs="0" maxOccurs="1" ref="c:route"/>
</xs:choice>
<xs:attribute name="packages" type="xs:NMTOKEN"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="endpoint">
<xs:annotation>
<xs:documentation><![CDATA[
Defines an endpoint as a top level Spring bean that can then be injected into other beans
or shared across multiple routing expressions
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="s:identifiedType">
<xs:attribute name="uri" type="xs:anyURI"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="beanPostProcessor">
<xs:annotation>
<xs:documentation><![CDATA[
Enables the Camel bean post processor for auto-injecting Camel resources into
beans which have the Camel annotations on them as well as auto-activating
@MessageDriven POJOs
]]></xs:documentation>
</xs:annotation>
</xs:element>
<!--
<xs:element name="routes">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:route"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-->
<xs:element name="routeBuilder">
<xs:complexType>
<xs:complexContent>
<xs:extension base="s:identifiedType">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:route"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="route">
<xs:annotation>
<xs:documentation><![CDATA[
Defines a routing rule
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="c:from"/>
<xs:choice>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:filter"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:intercept"/>
</xs:choice>
<xs:choice minOccurs="0">
<xs:element ref="c:choice"/>
<xs:element ref="c:process"/>
<xs:element ref="c:recipientList"/>
</xs:choice>
<xs:element minOccurs="0" ref="c:splitter"/>
<xs:element minOccurs="0" ref="c:to"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="from">
<xs:annotation>
<xs:documentation><![CDATA[
Defines the from endpoint(s) in a routing rules
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="uri" type="xs:anyURI"/>
<xs:attribute name="ref" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="filter" type="c:predicate"/>
<xs:element name="intercept">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="c:interceptor"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="interceptor">
<xs:complexType>
<xs:attribute name="ref" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="choice">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="c:when"/>
<xs:element ref="c:otherwise"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="when">
<xs:complexType>
<xs:complexContent>
<xs:extension base="c:predicate">
<xs:sequence>
<xs:element ref="c:to"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="otherwise">
<xs:complexType>
<xs:sequence>
<xs:element ref="c:to"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="process">
<xs:complexType>
<xs:attribute name="ref" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="recipientList" type="c:recipients"/>
<xs:element name="splitter" type="c:recipients"/>
<xs:element name="idempotentConsumer">
<xs:complexType>
<!--<xs:attribute name="messageIdRepositoryRef" use="required"/>-->
</xs:complexType>
</xs:element>
<!-- Predicate expressions -->
<xs:complexType name="predicate">
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element ref="c:predicate"/>
<xs:element ref="c:xpath"/>
<xs:element ref="c:script"/>
<xs:element ref="c:javaScript"/>
<xs:element ref="c:groovy"/>
<xs:element ref="c:php"/>
<xs:element ref="c:python"/>
<xs:element ref="c:ruby"/>
</xs:choice>
</xs:complexType>
<xs:element name="predicate">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element ref="c:body"/>
<xs:element ref="c:header"/>
</xs:choice>
<xs:choice>
<xs:element ref="c:isEqualTo"/>
<xs:element ref="c:isNotEqualTo"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Expressions -->
<xs:element name="xpath">
</xs:element>
<xs:complexType name="scriptType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="resource" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:element name="javaScript" type="c:scriptType"/>
<xs:element name="groovy" type="c:scriptType"/>
<xs:element name="python" type="c:scriptType"/>
<xs:element name="php" type="c:scriptType"/>
<xs:element name="ruby" type="c:scriptType"/>
<xs:element name="script">
<xs:complexType>
<xs:complexContent>
<xs:extension base="c:scriptType">
<xs:attribute name="language" type="xs:string"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="isEqualTo">
<xs:complexType>
<xs:attribute name="value" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="isNotEqualTo">
<xs:complexType>
<xs:attribute name="value" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="to">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="c:endpoint"/>
</xs:sequence>
<xs:attribute name="ref" type="xs:string"/>
<xs:attribute name="uri" type="xs:anyURI"/>
</xs:complexType>
</xs:element>
<xs:complexType name="recipients">
<xs:sequence>
<xs:element ref="c:recipients"/>
</xs:sequence>
</xs:complexType>
<xs:element name="recipients">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="c:header"/>
<xs:element ref="c:bodyAs"/>
</xs:choice>
<xs:choice minOccurs="0">
<xs:element ref="c:body"/>
<xs:element ref="c:tokenize"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="bodyAs">
<xs:complexType>
<xs:attribute name="class" use="required" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="tokenize">
<xs:complexType>
<xs:attribute name="token" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="header">
<xs:complexType>
<xs:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="body">
<xs:complexType/>
</xs:element>
</xs:schema>