You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Gert Vanthienen <ge...@gmail.com> on 2009/02/02 11:20:43 UTC

Re: XSLT omit-xml-declaration SAXON is not working

David,

Even if you omit the XML declaration in your saxon xslt endpoint, the
XML message will still be sent over the bus as an XML Source object.
It all depends on how the target endpoint (the one you're sending your
XML message to) reacts, but I guess most of them will stream out the
message with an xml PI header anyway (e.g. to properly communicate the
encoding of the message).  Could you explain your use case for
removing the PI header?  Inside ServiceMix, I don't think
adding/removing the header should make any difference and when
communicating to the outside world through a binding component, we
should be able to fine-tune the message though the use of a Marshaler.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/1/30 DavidSigh <lu...@gmail.com>:
>
> Hey,
>
> I'm just playing around a little bit with message tranformation.
>
> I'm still stugelling with my case study that call an external cxf-webservice
> (runing non tomcat) from eip. (see
> @http://www.nabble.com/CXF-Provider-External-Webservice-Call-tt21739545.html)
>
> For better debuging I  thought it would be helpful to send a soap message
> directly (instead of a normalized jbi:message) to the cxf-bc.
>
> Therefore I changed a xslt tranformation I used in the flow before the eip
> and just created a SOAP request ( that is already tested with SoapUI).
>
> The flow is working so far but for the Transformation I got a problem
> because the output of the XSLT containl the XML header
>
>  <?xml version="1.0" encoding="UTF-8"?>
>
> even though I use
>
> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
>
> in my XSLT
>
> Does anyone know how to omit the XML header or what is the error in my xslt?
>
>
> Appreciate your help.
>
> THX David
>
> XSLT:
> ------------------------------------------------------------------------------------
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>        xmlns:kit="http://ps.com/kitchen/" >
> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
>        <xsl:template match="/">
>                <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>                        xmlns:kit="http://ps.com/kitchen/">
>                        <soapenv:Header />
>                        <soapenv:Body>
>                                <kit:foods>
>                                        <tableNumber>1</tableNumber>
>                                        <orderID>1</orderID>
>                                        <timestamp>3</timestamp>
>                                        <food>
>                                                <id>1</id>
>                                                <name>3</name>
>                                                <price>1</price>
>                                                <quantity>2</quantity>
>                                        </food>
>                                        <food>
>                                                <id>1</id>
>                                                <name>3</name>
>                                                <price>1</price>
>                                                <quantity>2</quantity>
>                                        </food>
>                                </kit:foods>
>                        </soapenv:Body>
>                </soapenv:Envelope>
>        </xsl:template>
> </xsl:stylesheet>
> --
> View this message in context: http://www.nabble.com/XSLT-omit-xml-declaration-SAXON-is-not-working-tp21743829p21743829.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>