Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-1838

Allow xslt-transformer to create text output

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0.3
    • Fix Version/s: 2.0.4
    • Component/s: XML
    • Labels:
      None

      Description

      There is no sensible way to let the si-xml:xslt-transformer create text output.

      <si-xml:xslt-transformer xsl-resource="note.xsl" />
      

      with "note.xsl" containing "<xsl:output method="text" encoding="UTF-8" />"

      If the input is a xml-document, the the output is a empty xml-document.

      If I add result-type="StringResult", I will get this exception:

      [...]
      Caused by: org.springframework.integration.MessagingException: Document to Document conversion requires a DOMResult-producing ResultFactory implementation.
      	at org.springframework.integration.xml.transformer.XsltPayloadTransformer.transformDocument(XsltPayloadTransformer.java:202)
      	at org.springframework.integration.xml.transformer.XsltPayloadTransformer.doTransform(XsltPayloadTransformer.java:166)
      	at org.springframework.integration.transformer.AbstractTransformer.transform(AbstractTransformer.java:33)
      	... 118 more
      

      An ugly workaround is converting the input-document to a String before invoking the xslt-transformer.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpartner Jonas Partner
              Reporter:
              fs5 Frank Schwarz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: