Thanks Gert, I think returning the fixed-length text within an xml tag will work fine for us. :)
Gert Vanthienen wrote: > > Brian, > > Even if you set the result="string' option on the saxon:xslt endpoint, > that will only affect internal handling in the endpoint itself. > Because JBI doesn't support non-XML payloads, the transformation > result is always converted to an XML Source before sending it back > through the NMR. If we want to convey a non-XML payload in JBI, we > would have to store it as either a header value or as an attachment, > but the Saxon component currently does not support that. Personally, > I would recommend you to do the transformation with Camel and handle > the non-XML payload in there. Feel free to raise an improvement JIRA > for the Saxon endpoint though if you prefer sticking to the JBI > endpoints for now (if you like to take a stab at implementing that > feature, feel free to do so -- we love patches ;) ) > > Regards, > > Gert Vanthienen > ------------------------ > Open Source SOA: http://fusesource.com > Blog: http://gertvanthienen.blogspot.com/ > > > > On 29 March 2010 21:41, Brian Taylor <[email protected]> wrote: >> >> Hello, >> >> I'm trying to execute an XSLT that uses the following line: <xsl:output >> method="text" encoding="UTF-8"/> and SAXON doesn't appear to support >> this; I >> must output XML or I get a DOM Hierarchy error. If I set the xbean's >> 'result' attribute to 'string' I get a 'SAXParseException: Content is not >> allowed in prolog.' >> >> What's the correct way to configure an XSL with this SE to output Text >> (for >> a fixed length file) in UTF-8? >> >> This is the XSL: >> <?xml version='1.0'?> >> <xsl:stylesheet version="1.0" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:c="http://www.company.com"> >> >> <xsl:output method="text" encoding="UTF-8"/> >> >> <xsl:template >> match="//c:Header"><xsl:text>INV</xsl:text></xsl:template> >> >> </xsl:stylesheet> >> >> This is the xbean: >> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0" >> xmlns:c="http://www.company.com"> >> <saxon:xslt >> service="c:TransformService" >> endpoint="TransformToExternalFormat" >> resource="classpath:TransformTest.xsl" >> result="string"/> >> >> </beans> >> >> -Brian >> -- >> View this message in context: >> http://old.nabble.com/SAXON-SE-2009.01---Text-Output-tp28074157p28074157.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. >> >> > > > ----- > --- > Gert Vanthienen > http://gertvanthienen.blogspot.com > -- View this message in context: http://old.nabble.com/SAXON-SE-2009.01---Text-Output-tp28074157p28087172.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
