You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/10/31 17:25:24 UTC
svn commit: r590732 - in /activemq/camel/trunk/components/camel-saxon/src:
main/java/org/apache/camel/builder/saxon/
main/java/org/apache/camel/component/
main/java/org/apache/camel/component/xquery/
main/resources/META-INF/services/org/apache/camel/co...
Author: jstrachan
Date: Wed Oct 31 09:25:10 2007
New Revision: 590732
URL: http://svn.apache.org/viewvc?rev=590732&view=rev
Log:
added a test case and implementation for https://issues.apache.org/activemq/browse/CAMEL-198
Added:
activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/
activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/
activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java (with props)
activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html (with props)
activemq/camel/trunk/components/camel-saxon/src/main/resources/META-INF/services/org/apache/camel/component/xquery
activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/
activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/
activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java
- copied, changed from r590680, activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/xslt/TestBean.java
activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java (with props)
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/camelContext.xml
- copied, changed from r590680, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/xslt/camelContext.xml
activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/transform.xquery
Modified:
activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java?rev=590732&r1=590731&r2=590732&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/builder/saxon/XQueryBuilder.java Wed Oct 31 09:25:10 2007
@@ -49,6 +49,7 @@
import org.apache.camel.Expression;
import org.apache.camel.Message;
import org.apache.camel.Predicate;
+import org.apache.camel.Processor;
import org.apache.camel.RuntimeExpressionException;
import org.apache.camel.converter.IOConverter;
import org.apache.camel.converter.jaxp.BytesSource;
@@ -65,7 +66,7 @@
*
* @version $Revision$
*/
-public abstract class XQueryBuilder<E extends Exchange> implements Expression<E>, Predicate<E>, NamespaceAware {
+public abstract class XQueryBuilder implements Expression<Exchange>, Predicate<Exchange>, NamespaceAware, Processor {
private static final transient Log LOG = LogFactory.getLog(XQueryBuilder.class);
private Configuration configuration;
private XQueryExpression expression;
@@ -82,7 +83,12 @@
return "XQuery[" + expression + "]";
}
- public Object evaluate(E exchange) {
+ public void process(Exchange exchange) throws Exception {
+ Object body = evaluate(exchange);
+ exchange.getOut(true).setBody(body);
+ }
+
+ public Object evaluate(Exchange exchange) {
try {
if (resultType != null) {
if (resultType.equals(String.class)) {
@@ -126,21 +132,21 @@
namespacePrefixes.putAll(namespaces);
}
- public List evaluateAsList(E exchange) throws Exception {
+ public List evaluateAsList(Exchange exchange) throws Exception {
return getExpression().evaluate(createDynamicContext(exchange));
}
- public Object evaluateAsStringSource(E exchange) throws Exception {
+ public Object evaluateAsStringSource(Exchange exchange) throws Exception {
String text = evaluateAsString(exchange);
return new StringSource(text);
}
- public Object evaluateAsBytesSource(E exchange) throws Exception {
+ public Object evaluateAsBytesSource(Exchange exchange) throws Exception {
byte[] bytes = evaluateAsBytes(exchange);
return new BytesSource(bytes);
}
- public Node evaluateAsDOM(E exchange) throws Exception {
+ public Node evaluateAsDOM(Exchange exchange) throws Exception {
DOMResult result = new DOMResult();
DynamicQueryContext context = createDynamicContext(exchange);
XQueryExpression expression = getExpression();
@@ -148,7 +154,7 @@
return result.getNode();
}
- public byte[] evaluateAsBytes(E exchange) throws Exception {
+ public byte[] evaluateAsBytes(Exchange exchange) throws Exception {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
Result result = new StreamResult(buffer);
getExpression().pull(createDynamicContext(exchange), result, properties);
@@ -156,7 +162,7 @@
return bytes;
}
- public String evaluateAsString(E exchange) throws Exception {
+ public String evaluateAsString(Exchange exchange) throws Exception {
StringWriter buffer = new StringWriter();
SequenceIterator iter = getExpression().iterator(createDynamicContext(exchange));
for (Item item = iter.next(); item != null; item = iter.next()) {
@@ -165,7 +171,7 @@
return buffer.toString();
}
- public boolean matches(E exchange) {
+ public boolean matches(Exchange exchange) {
try {
List list = evaluateAsList(exchange);
return matches(exchange, list);
@@ -175,7 +181,7 @@
}
}
- public void assertMatches(String text, E exchange) throws AssertionError {
+ public void assertMatches(String text, Exchange exchange) throws AssertionError {
try {
List list = evaluateAsList(exchange);
if (!matches(exchange, list)) {
@@ -189,94 +195,94 @@
// Static helper methods
//-------------------------------------------------------------------------
- public static <E extends Exchange> XQueryBuilder<E> xquery(final String queryText) {
- return new XQueryBuilder<E>() {
+ public static XQueryBuilder xquery(final String queryText) {
+ return new XQueryBuilder() {
protected XQueryExpression createQueryExpression(StaticQueryContext staticQueryContext) throws XPathException {
return staticQueryContext.compileQuery(queryText);
}
};
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(final Reader reader) {
- return new XQueryBuilder<E>() {
+ public static XQueryBuilder xquery(final Reader reader) {
+ return new XQueryBuilder() {
protected XQueryExpression createQueryExpression(StaticQueryContext staticQueryContext) throws XPathException, IOException {
return staticQueryContext.compileQuery(reader);
}
};
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(final InputStream in, final String characterSet) {
- return new XQueryBuilder<E>() {
+ public static XQueryBuilder xquery(final InputStream in, final String characterSet) {
+ return new XQueryBuilder() {
protected XQueryExpression createQueryExpression(StaticQueryContext staticQueryContext) throws XPathException, IOException {
return staticQueryContext.compileQuery(in, characterSet);
}
};
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(File file, String characterSet) throws FileNotFoundException {
+ public static XQueryBuilder xquery(File file, String characterSet) throws FileNotFoundException {
return xquery(IOConverter.toInputStream(file), characterSet);
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(URL url, String characterSet) throws IOException {
+ public static XQueryBuilder xquery(URL url, String characterSet) throws IOException {
return xquery(IOConverter.toInputStream(url), characterSet);
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(File file) throws FileNotFoundException {
+ public static XQueryBuilder xquery(File file) throws FileNotFoundException {
return xquery(IOConverter.toInputStream(file), ObjectHelper.getDefaultCharacterSet());
}
- public static <E extends Exchange> XQueryBuilder<E> xquery(URL url) throws IOException {
+ public static XQueryBuilder xquery(URL url) throws IOException {
return xquery(IOConverter.toInputStream(url), ObjectHelper.getDefaultCharacterSet());
}
// Fluent API
// -------------------------------------------------------------------------
- public XQueryBuilder<E> parameter(String name, Object value) {
+ public XQueryBuilder parameter(String name, Object value) {
parameters.put(name, value);
return this;
}
- public XQueryBuilder<E> namespace(String prefix, String uri) {
+ public XQueryBuilder namespace(String prefix, String uri) {
namespacePrefixes.put(prefix, uri);
return this;
}
- public XQueryBuilder<E> resultType(Class resultType) {
+ public XQueryBuilder resultType(Class resultType) {
setResultType(resultType);
return this;
}
- public XQueryBuilder<E> asBytes() {
+ public XQueryBuilder asBytes() {
setResultsFormat(ResultFormat.Bytes);
return this;
}
- public XQueryBuilder<E> asBytesSource() {
+ public XQueryBuilder asBytesSource() {
setResultsFormat(ResultFormat.BytesSource);
return this;
}
- public XQueryBuilder<E> asDOM() {
+ public XQueryBuilder asDOM() {
setResultsFormat(ResultFormat.DOM);
return this;
}
- public XQueryBuilder<E> asDOMSource() {
+ public XQueryBuilder asDOMSource() {
setResultsFormat(ResultFormat.DOMSource);
return this;
}
- public XQueryBuilder<E> asList() {
+ public XQueryBuilder asList() {
setResultsFormat(ResultFormat.List);
return this;
}
- public XQueryBuilder<E> asString() {
+ public XQueryBuilder asString() {
setResultsFormat(ResultFormat.String);
return this;
}
- public XQueryBuilder<E> asStringSource() {
+ public XQueryBuilder asStringSource() {
setResultsFormat(ResultFormat.StringSource);
return this;
}
@@ -365,7 +371,7 @@
/**
* Creates a dynamic context for the given exchange
*/
- protected DynamicQueryContext createDynamicContext(E exchange) throws Exception {
+ protected DynamicQueryContext createDynamicContext(Exchange exchange) throws Exception {
Configuration config = getConfiguration();
DynamicQueryContext dynamicQueryContext = new DynamicQueryContext(config);
@@ -425,7 +431,7 @@
configuration = null;
}
- protected boolean matches(E exchange, List results) {
+ protected boolean matches(Exchange exchange, List results) {
return ObjectHelper.matches(results);
}
}
Added: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java?rev=590732&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java (added)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java Wed Oct 31 09:25:10 2007
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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.xquery;
+
+import java.util.Map;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.saxon.XQueryBuilder;
+import org.apache.camel.component.ResourceBasedComponent;
+import org.apache.camel.impl.ProcessorEndpoint;
+import org.springframework.core.io.Resource;
+
+
+/**
+ * An <a href="http://activemq.apache.org/camel/xquery.html">XQuery Component</a>
+ * for performing transforming messages
+ *
+ * @version $Revision: 1.1 $
+ */
+public class XQueryComponent extends ResourceBasedComponent {
+
+ protected Endpoint<Exchange> createEndpoint(String uri, String remaining, Map parameters) throws Exception {
+ Resource resource = resolveMandatoryResource(remaining);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(this + " using schema resource: " + resource);
+ }
+ XQueryBuilder xslt = XQueryBuilder.xquery(resource.getURL());
+ configureXslt(xslt, uri, remaining, parameters);
+ return new ProcessorEndpoint(uri, this, xslt);
+ }
+
+ protected void configureXslt(XQueryBuilder xQueryBuilder, String uri, String remaining, Map parameters) throws Exception {
+ setProperties(xQueryBuilder, parameters);
+ }
+}
Propchange: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html?rev=590732&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html (added)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html Wed Oct 31 09:25:10 2007
@@ -0,0 +1,25 @@
+<!--
+ 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.
+-->
+<html>
+<head>
+</head>
+<body>
+
+The <a href="http://activemq.apache.org/camel/xquery.html">XQuery Component</a> for transforming messages with XQuery
+
+</body>
+</html>
Propchange: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/camel/trunk/components/camel-saxon/src/main/resources/META-INF/services/org/apache/camel/component/xquery
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/resources/META-INF/services/org/apache/camel/component/xquery?rev=590732&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/resources/META-INF/services/org/apache/camel/component/xquery (added)
+++ activemq/camel/trunk/components/camel-saxon/src/main/resources/META-INF/services/org/apache/camel/component/xquery Wed Oct 31 09:25:10 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.xquery.XQueryComponent
\ No newline at end of file
Copied: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java (from r590680, activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/xslt/TestBean.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java?p2=activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java&p1=activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/xslt/TestBean.java&r1=590680&r2=590732&rev=590732&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/xslt/TestBean.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java Wed Oct 31 09:25:10 2007
@@ -15,9 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.xslt;
+package org.apache.camel.component.xquery;
-import org.apache.camel.language.XPath;
+import org.apache.camel.builder.saxon.XQuery;
/**
* @version $Revision: 1.1 $
@@ -25,7 +25,7 @@
public class TestBean {
private String subject;
- public void onMethod(@XPath("/*/@subject")String subject) {
+ public void onMethod(@XQuery("/*/@subject")String subject) {
this.subject = subject;
System.out.println("Invoked with: [" + subject + "]");
}
@@ -33,4 +33,4 @@
public String getSubject() {
return subject;
}
-}
+}
\ No newline at end of file
Added: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java?rev=590732&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java (added)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java Wed Oct 31 09:25:10 2007
@@ -0,0 +1,60 @@
+/**
+ *
+ * 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.xquery;
+
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class XQueryEndpointTest extends SpringTestSupport {
+ public void testSendMessageAndHaveItTransformed() throws Exception {
+ MockEndpoint endpoint = getMockEndpoint("mock:result");
+ endpoint.expectedMessageCount(1);
+
+ template.sendBody("direct:start",
+ "<mail><subject>Hey</subject><body>Hello world!</body></mail>");
+
+ assertMockEndpointsSatisifed();
+
+ List<Exchange> list = endpoint.getReceivedExchanges();
+ Exchange exchange = list.get(0);
+ String xml = exchange.getIn().getBody(String.class);
+ System.out.println("Found: " + xml);
+ log.debug("Found: " + xml);
+
+ TestBean bean = getMandatoryBean(TestBean.class, "testBean");
+
+ // TODO - fixme when we allow XQuery injection to do proper type conversion
+ //assertEquals("bean.subject", "Hey", bean.getSubject());
+ }
+
+ protected int getExpectedRouteCount() {
+ // TODO why zero?
+ return 0;
+ }
+
+ protected ClassPathXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/component/xquery/camelContext.xml");
+ }
+}
\ No newline at end of file
Propchange: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/camelContext.xml (from r590680, activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/xslt/camelContext.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/camelContext.xml?p2=activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/camelContext.xml&p1=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/xslt/camelContext.xml&r1=590680&r2=590732&rev=590732&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/xslt/camelContext.xml (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/camelContext.xml Wed Oct 31 09:25:10 2007
@@ -26,7 +26,7 @@
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="direct:start"/>
- <to uri="xslt:org/apache/camel/component/xslt/transform.xsl"/>
+ <to uri="xquery:org/apache/camel/component/xquery/transform.xquery"/>
<multicast>
<bean ref="testBean"/>
<to uri="mock:result"/>
@@ -35,5 +35,5 @@
</camelContext>
<!-- END SNIPPET: example -->
- <bean id="testBean" class="org.apache.camel.component.xslt.TestBean" scope="singleton"/>
+ <bean id="testBean" class="org.apache.camel.component.xquery.TestBean" scope="singleton"/>
</beans>
Added: activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/transform.xquery
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/transform.xquery?rev=590732&view=auto
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/transform.xquery (added)
+++ activemq/camel/trunk/components/camel-saxon/src/test/resources/org/apache/camel/component/xquery/transform.xquery Wed Oct 31 09:25:10 2007
@@ -0,0 +1,3 @@
+<transformed subject="{/mail/subject}">
+{/mail}
+</transformed>
\ No newline at end of file