camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r563215 - in /activemq/camel/trunk/components/camel-msv: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/camel/ src/main/java/org/apache/camel/component/ src/main/java/org/apache/camel/...
Date Mon, 06 Aug 2007 18:24:02 GMT
Author: jstrachan
Date: Mon Aug  6 11:24:00 2007
New Revision: 563215

URL: http://svn.apache.org/viewvc?view=rev&rev=563215
Log:
added an MSV component for CAMEL-88 to be able to use RelaxNG validation

Added:
    activemq/camel/trunk/components/camel-msv/
    activemq/camel/trunk/components/camel-msv/pom.xml   (with props)
    activemq/camel/trunk/components/camel-msv/src/
    activemq/camel/trunk/components/camel-msv/src/main/
    activemq/camel/trunk/components/camel-msv/src/main/java/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/
    activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java
  (with props)
    activemq/camel/trunk/components/camel-msv/src/main/resources/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/
    activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/relaxng
    activemq/camel/trunk/components/camel-msv/src/test/
    activemq/camel/trunk/components/camel-msv/src/test/java/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/
    activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java
  (with props)
    activemq/camel/trunk/components/camel-msv/src/test/resources/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rnc
    activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rng
    activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties   (with
props)
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml
  (with props)
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc
  (with props)
    activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng
  (with props)

Added: activemq/camel/trunk/components/camel-msv/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/pom.xml?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/pom.xml (added)
+++ activemq/camel/trunk/components/camel-msv/pom.xml Mon Aug  6 11:24:00 2007
@@ -0,0 +1,110 @@
+<?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.
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-parent</artifactId>
+    <version>1.1-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-msv</artifactId>
+  <name>Camel :: MSV</name>
+  <description>Camel MSV support</description>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.iso_relax.verifier.jaxp.validation</groupId>
+      <artifactId>isorelax-jaxp-bridge</artifactId>
+      <version>1.0</version>
+    </dependency>
+    <dependency>
+      <groupId>msv</groupId>
+      <artifactId>isorelax</artifactId>
+      <version>20050913</version>
+    </dependency>
+    <dependency>
+      <groupId>msv</groupId>
+      <artifactId>msv</artifactId>
+      <version>20050913</version>
+    </dependency>
+    <dependency>
+      <groupId>com.sun.msv.datatype.xsd</groupId>
+      <artifactId>xsdlib</artifactId>
+      <version>20060615</version>
+    </dependency>
+
+
+    <!-- for testing -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <repositories>
+    <!-- repo for isorelax / msv stuff -->
+    <repository>
+      <id>maven-java.net</id>
+      <name>Maven java.net Repository</name>
+      <url>http://repo1.maven.org/maven-java.net</url>
+      <layout>legacy</layout>
+    </repository>
+    <!-- for maven jaxb plugin -->
+    <repository>
+      <id>java.net</id>
+      <name>java.net Maven Repository</name>
+      <url>http://download.java.net/maven/1</url>
+      <!--<url>https://maven-repository.dev.java.net/nonav/repository</url>-->
+      <layout>legacy</layout>
+    </repository>
+  </repositories>
+</project>

Propchange: activemq/camel/trunk/components/camel-msv/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java
(added)
+++ activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,50 @@
+/**
+ *
+ * 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.
+ */
+package org.apache.camel.component.validator.relaxng;
+
+import org.apache.camel.component.validator.ValidatorComponent;
+import org.apache.camel.component.validator.SpringValidator;
+import org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl;
+import org.iso_relax.verifier.VerifierConfigurationException;
+
+import javax.xml.XMLConstants;
+import java.util.Map;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class RelaxNGComponent extends ValidatorComponent {
+    private RELAXNGSchemaFactoryImpl schemaFactory;
+
+    public RELAXNGSchemaFactoryImpl getSchemaFactory() throws VerifierConfigurationException
{
+        if (schemaFactory == null) {
+            schemaFactory = new RELAXNGSchemaFactoryImpl();
+        }
+        return schemaFactory;
+    }
+
+    public void setSchemaFactory(RELAXNGSchemaFactoryImpl schemaFactory) {
+        this.schemaFactory = schemaFactory;
+    }
+
+    protected void configureValidator(SpringValidator validator, String uri, String remaining,
Map parameters) throws Exception {
+        validator.setSchemaLanguage(XMLConstants.RELAXNG_NS_URI);
+        validator.setSchemaFactory(schemaFactory);
+        super.configureValidator(validator, uri, remaining, parameters);
+    }
+}

Propchange: activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/relaxng/RelaxNGComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/relaxng
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/relaxng?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/relaxng
(added)
+++ activemq/camel/trunk/components/camel-msv/src/main/resources/META-INF/services/org/apache/camel/component/relaxng
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.apache.camel.component.validator.relaxng.RelaxNGComponent
\ No newline at end of file

Added: activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,93 @@
+/**
+ *
+ * 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.
+ */
+package org.apache.camel.component.validator.relaxng;
+
+import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.processor.validation.SchemaValidationException;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class RelaxNGRouteTest extends SpringTestSupport {
+    public void testValidMessageUsingRelaxNG() throws Exception {
+        assertValidMessage("direct:rng");
+    }
+
+    public void testInvalidMessageUsingRelaxNG() throws Exception {
+        assertInvalidMessage("direct:rng");
+    }
+
+/*
+    public void testValidMessageUsingRelaxNGCompactSyntax() throws Exception {
+        assertValidMessage("direct:rnc");
+    }
+
+    public void testInvalidMessageUsingRelaxNGCompactSyntax() throws Exception {
+        assertInvalidMessage("direct:rnc");
+    }
+
+*/
+
+    protected void assertValidMessage(String endpointUri) throws Exception {
+        String body = "<mail xmlns='http://foo.com/bar'><subject>Hey</subject><body>Hello
world!</body></mail>";
+        try {
+            template.sendBody(endpointUri, body);
+        }
+        catch (Throwable e) {
+            log.error(e, e);
+            fail("Caught: " + e);
+        }
+    }
+
+    protected void assertInvalidMessage(String endpointUri) throws Exception {
+        String body = "<mail xmlns='http://foo.com/bar'><body>Hello world!</body></mail>";
+        try {
+            template.sendBody(endpointUri, body);
+        }
+
+        // TODO ideally we'd not have to wrap validation exceptions!
+        // TODO should we expose checked exceptions on CamelTemplate
+        // or should we make validation errors be runtime exceptions?
+        catch (RuntimeCamelException e) {
+            Throwable cause = e.getCause();
+            if (cause instanceof SchemaValidationException) {
+                log.debug("Caught expected schema validation exception: " + e, e);
+            }
+            else {
+                log.error(e, e);
+                fail("Not a SchemaValidationException: " + e);
+            }
+        }
+        catch (Throwable e) {
+            log.error(e, e);
+            fail("Caught: " + e);
+        }
+    }
+
+    protected int getExpectedRouteCount() {
+        // TODO why zero?
+        return 0;
+    }
+
+    protected ClassPathXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/component/validator/relaxng/camelContext.xml");
+    }
+}
+

Propchange: activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/relaxng/RelaxNGRouteTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rnc
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rnc?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rnc
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rnc
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.apache.camel.component.validator.relaxng.RelaxNGComponent
\ No newline at end of file

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rng
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rng?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rng
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/META-INF/services/org/apache/camel/component/rng
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+class=org.apache.camel.component.validator.relaxng.RelaxNGComponent
\ No newline at end of file

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties (added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties Mon Aug
 6 11:24:00 2007
@@ -0,0 +1,30 @@
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see debug output on the console.
+#
+log4j.rootLogger=INFO, out
+
+log4j.logger.org.apache.camel=DEBUG
+log4j.logger.org.springframework=WARN
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n

Propchange: activemq/camel/trunk/components/camel-msv/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,36 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+    ">
+
+  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
+    <route>
+      <from uri="direct:rng"/>
+      <to uri="rnc:org/apache/camel/component/validator/relaxng/schema.rng"/>
+    </route>
+    <route>
+      <from uri="direct:rnc"/>
+      <to uri="rnc:org/apache/camel/component/validator/relaxng/schema.rnc"/>
+    </route>
+  </camelContext>
+
+</beans>

Propchange: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/camelContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,6 @@
+default namespace = "http://foo.com/bar"
+
+element mail {
+  element subject { text },
+  element body { text }
+}
\ No newline at end of file

Propchange: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rnc
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng?view=auto&rev=563215
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng
(added)
+++ activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng
Mon Aug  6 11:24:00 2007
@@ -0,0 +1,8 @@
+<element xmlns="http://relaxng.org/ns/structure/1.0" ns="http://foo.com/bar" name="mail">
+  <element name="subject">
+    <text/>
+  </element>
+  <element name="body">
+    <text/>
+  </element>
+</element>

Propchange: activemq/camel/trunk/components/camel-msv/src/test/resources/org/apache/camel/component/validator/relaxng/schema.rng
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message