You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by sachin2008 <es...@gmail.com> on 2008/04/25 21:18:27 UTC

Xalan support in servicemix container

Hi , 
I want to use xalan Transfomer in a servicemix container. So I am passing  a
Xalan transformerImpl object as a memeber to the saxon endpoint definition.
I want to use this to parse the messages. 

If we pass a transformerImpl object,  servicemix-saxon component  use the
Xalan transformer for xslt processing.

Here, i am facing  small problem.After some processing logic, java program
is passing org.apache.servicemix.jbi.jaxp.staxsource(which  extends 
SAXSource) as a source object .  and StreamResult as Result object. 

But,the  XSL template is not getting any data.  When i use the following
statements an empty string is returning. 

<xsl:template match = "/"> 
<xsl:copy -of select = "." /> 
</xsl:template>

If i create any elements irrespective of the input(in the above created
template) these elements are being displayed correctly. 


Does both the  source and result objects needs to be od same type or it can
be any combination among  SAX, DOM, Stream parsers. 


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/Xalan-support--in-servicemix-container-tp16902818p16902818.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.


Re: Xalan support in servicemix container

Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Praveen.

sachin2008 <es...@gmail.com> wrote on 2008-04-25 03:18:27 PM:
> Here, i am facing  small problem.After some processing logic, java 
program
> is passing org.apache.servicemix.jbi.jaxp.staxsource(which  extends 
> SAXSource) as a source object .  and StreamResult as Result object. 
> 
> But,the  XSL template is not getting any data.  When i use the following
> statements an empty string is returning. 
> 
> <xsl:template match = "/"> 
> <xsl:copy -of select = "." /> 
> </xsl:template>
> 
> If i create any elements irrespective of the input(in the above created
> template) these elements are being displayed correctly. 
> 
> 
> Does both the  source and result objects needs to be od same type or it 
can
> be any combination among  SAX, DOM, Stream parsers. 

The short answer is that you can mix any sort of Source with any sort of 
Result.  You might want to try inserting an XMLFilter in the pipeline and 
print debugging output showing the SAX events that are being generated. 
That might help identify the cause of the immediate problem (an empty 
string).

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Toronto Lab   T/L 313-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com