camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-1605) Passing an xml fragment as a parameter to an xslt transformation fails
Date Tue, 12 May 2009 14:20:50 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-1605:
-------------------------------

    Fix Version/s:     (was: 2.0-M2)
                       (was: 1.6.1)
                   2.0.0
                   1.6.2

> Passing an xml fragment as a parameter to an xslt transformation fails
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-1605
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1605
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 1.6.0, 2.0-M1
>            Reporter: Gert-Jan van de Streek
>             Fix For: 1.6.2, 2.0.0
>
>         Attachments: TestXmlFragment-context.xml, TestXmlFragment.java, transform.xsl
>
>
> I pass an xml fragment to an xslt. I have the following code where the queue holds xml
messages
>        from("activemq:example.A")
>                .setHeader("agent.id", new XPathExpression("/"))
>                .process(new ReadLocalFile())
>                .to("xslt:transform.xsl")
> The xslt looks like:
>    ...
>    <xsl:param name="agent.xml"/>
> 	<xsl:template match="/">
> 		<xsl:value-of select="$agent.xml/agent/id" />
> I would expect the xml fragment to be available as a nodeset in the xsl, but I get the
following exception:
> javax.xml.transform.TransformerException: java.lang.RuntimeException: Invalid conversion
from 'com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList' to 'node-set'.
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:670)
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:300)
> 	at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:83)
>        ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message