You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by mayra <ch...@ngc.com> on 2007/08/17 02:51:37 UTC

Re: doesn't work ? (Xpath router)

I seem to be getting the same end of file warning with both forward and
invoke.  It actually completes the transformation, it just gives me the
"fatal error".  Was this issue ever resolved?  Below is my xsl, seems pretty
basic: 

- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:jbi="xalan://org.apache.servicemix.components.xslt.XalanExtension"
extension-element-prefixes="jbi" xmlns:foo="http://servicemix.org/demo/"
version="1.0">
- <xsl:template match="/*">
- <xsl:choose>
- <!--  lets forward the inbound message to a service 
  --> 
- <xsl:when test="@id = '1'">
  <jbi:forward service="foo:fileSender1" /> 
  </xsl:when>
- <xsl:otherwise>
  <jbi:forward service="foo:fileSender2" /> 
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>
  </xsl:stylesheet>


Gert Vanthienen wrote:
> 
> L.S.,
> 
> I don't see anything wrong with this XSL.  Can you try to set the log 
> level to DEBUG and retry this to see if that gives us any useful 
> information?
> 
> Regards,
> 
> Gert
> 
> Bummer wrote:
>> Following is my router.xsl which was deployed inside xslt SU file.
>> =================
>>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> 	
>> xmlns:jbi="xalan://org.apache.servicemix.components.xslt.XalanExtension"
>> 		extension-element-prefixes="jbi"
>> 		xmlns:xpathrouting="http://servicemix.apache.org/samples/xpathrouting"
>> 		version="1.0">
>>    
>>    <xsl:template match="/*">
>>       <xsl:choose>
>> 	 <xsl:when test="@id = '4'">
>> 	    <!-- lets forward the inbound message to a service        -->
>> 	    <!-- forward doesn't seem to work !! use invoke instead   -->
>> 	    <!-- <jbi:forward service="xpathrouting:trace"/>          -->
>> 	    <jbi:invoke service="xpathrouting:trace">
>> 	       <jbi:copyProperties/>
>> 	       <xsl:copy-of select="/" />
>> 	    </jbi:invoke>
>> 	 </xsl:when>
>>
>> 	 <!-- lets generate the output XML to use as input, 
>> 	      copy the input properties and define some new propertes -->
>> 	 <xsl:when test="@id = '12'">
>> 	    <jbi:invoke service="xpathrouting:trace">
>> 	       <jbi:copyProperties/>
>> 	       <jbi:setOutProperty name="foo" select="@sent"/>
>> 	       <cheese code="{@id}">
>> 		  <description>This is some content generated from the routing
>> XSL</description>
>> 	       </cheese>
>> 	    </jbi:invoke>
>> 	 </xsl:when>
>> 	 
>> 	 <xsl:when test="@id != '2'">
>> 	    <jbi:forward service="xpathrouting:trace"/>
>> 	 </xsl:when>
>> 	 
>> 	 <xsl:otherwise>
>> 	    <jbi:forward service="xpathrouting:trace"/>
>> 	 </xsl:otherwise>
>>       </xsl:choose>
>>    </xsl:template>
>>    
>> </xsl:stylesheet>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%3Cjbi%3Afoward-...%3E-doesn%27t-work----%28Xpath-router%29-tf3771463s12049.html#a12192020
Sent from the ServiceMix - User mailing list archive at Nabble.com.