On Fri, Mar 28, 2008 at 1:44 PM, James Strachan <[EMAIL PROTECTED]> wrote:
> On 28/03/2008, David Siefert <[EMAIL PROTECTED]> wrote: > > Hello, > > > > Is there an example of using an XSLT in the Spring XML configuration? > > Yes I've just added one here... > > http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java > > the XML is linked below... > > > > I have something like the following: > > > > <route> > > <from uri="..." /> > > <to uri="xslt:..." /> > > <!-- *but now what?* --> > > if you have an InOut route (e.g. a WS invocation, a request response > over JMS using a JMSReplyTo or via a HTTP POST) then you're done, the > result is returned. > > If you are doing one-way messaging, just add another destination for > the result. e.g. another <to/> > > > </route> > > > > The XML Schema says I can only have one <to />. > > I don't think it does (or rather maybe thats an old XSD you're looking > at?) > > e.g. see the test XML.. > > http://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/XsltTest-context.xml > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://open.iona.com > I am using Camel 1.2.0, here is the schema snippet: <xs:complexType name="routeType"> <xs:complexContent> <xs:extension base="tns:processorType"> <xs:sequence> <xs:element ref="tns:interceptor" maxOccurs="unbounded" minOccurs="0"/> <xs:element ref="tns:from" maxOccurs="unbounded" minOccurs="0"/> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:element ref="tns:aggregator"/> <xs:element ref="tns:bean"/> <xs:element ref="tns:catch"/> <xs:element ref="tns:choice"/> <xs:element ref="tns:when"/> <xs:element ref="tns:otherwise"/> <xs:element ref="tns:delayer"/> <xs:element ref="tns:onException"/> <xs:element ref="tns:filter"/> <xs:element ref="tns:finally"/> <xs:element ref="tns:idempotentConsumer"/> <xs:element ref="tns:intercept"/> <xs:element ref="tns:marshal"/> <xs:element ref="tns:multicast"/> <xs:element ref="tns:policy"/> <xs:element ref="tns:proceed"/> <xs:element ref="tns:process"/> <xs:element ref="tns:recipientList"/> <xs:element ref="tns:resequencer"/> <xs:element ref="tns:route"/> <xs:element ref="tns:splitter"/> <xs:element ref="tns:thread"/> <xs:element ref="tns:throttler"/> <xs:element ref="tns:to"/> <xs:element ref="tns:try"/> <xs:element ref="tns:unmarshal"/> </xs:choice> </xs:sequence> <xs:attribute name="group" type="xs:string"/> </xs:extension> </xs:complexContent> </xs:complexType> It looks right to me (or I could be rusty on my XML Schema skills). I guess its just NetBeans misinterpretation (it says "to [1..1]" for child elements of route). Sure enough validation passes... figures! :) Thanks James! -David
