Yes, here is to agree with Łukasz.
XPath is not designed to generate XML documents. XPath let's you query
an existing document to retrieve specific parts of it.
You may want to create an XSLT identity transform to turn each
resulting Node into a proper document which can then include the XML
decla
Thank you for the explanation.
Chris
2012/1/27 Łukasz Dywicki
> Hey Chris,
> Let me try to explain what happens under the hood.
>
> XSLT transformation requires an instance of javax.xml.transform.Source
> [1]. The result from the splitter is a org.w3c.dom.Node (or something
> similar). By defau
Hey Chris,
Let me try to explain what happens under the hood.
XSLT transformation requires an instance of javax.xml.transform.Source [1]. The
result from the splitter is a org.w3c.dom.Node (or something similar). By
default your node will be wrapped in DOMSource [2]. The explicit type
conversio
Thank you guys. I added the converyBodyTo command instead of my crazy
setBody command and it seemed to work. I did have to change the attribute
to type vs javaType though.
I wish I could explain why that was needed though. It seems odd that split
would change the data into something not compatible
Excellent suggestion Łukasz!
Chris, have a look at
http://camel.apache.org/xslt.html#XSLT-NotesonusingXSLTandJavaVersions,
perhaps that will resolve your issue. For my quick unit test I'm using
openjdk 1.6.0_22 (ArchLinux-6.b22_1.10.5-1-x86_64) and xalan 2.6.0 was
already in my projects dependenci
I think you should not have any problems, the conversion is really simple.
After split statement you have a Node as body. For XSLT you need a Source. Try
adding this instead setBody
That should force conversion to document object and I belive fix your problem.
Best regards,
Łukasz Dywicki
--
Doug,
It doesn't make much sense to me either but I do know that with the setBody
command everything works and without it, it fails. If I run the XSLT
against the same XML (save the XML to a file from the flow after the split)
in netbeans it works fine without the but in camel it fails.
Could th
Chris,
I think the xml processing "fix" you've got there is a bit of red-herring.
The xml processing instruction should only be necessary if you are
converting the output of the xpath to a String prior to the xslt endpoint,
whether directly or indirectly. Without any explicit conversion, the outp
Sorry, 2.8.3.
On Wed, Jan 25, 2012 at 3:29 PM, Babak Vahdat
wrote:
> And what about the Camel version you use?
>
> Babak
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Splitting-on-XML-Documents-tp5431032p5431531.html
> Sent from the Camel - Users mailing list archive
And what about the Camel version you use?
Babak
--
View this message in context:
http://camel.465427.n5.nabble.com/Splitting-on-XML-Documents-tp5431032p5431531.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Yes, my xsl file already has that statement. When it comes out of the XSLT
transform it has the header, it's the split tasks that strips it off.
Chris
On Wed, Jan 25, 2012 at 2:59 PM, Babak Vahdat
wrote:
> Hi,
>
> Have you already specified the output method of your xsl file to be "xml"?
>
> om
Hi,
Have you already specified the output method of your xsl file to be "xml"?
Actually the default value of the omit-xml-declaration attribute is already
"no" but try this if it could help.
And what version of Camel do you use?
Babak
--
View this message in context:
http://camel.465427.n
12 matches
Mail list logo