Spring Integration
  1. Spring Integration
  2. INT-2473

xslt-transformer - result-transformer Only Applied if result-type Also Supplied

    Details

      Description

      Not sure if this is just documentation or a real bug (looks like a bug to me)...

      <beans:bean id="resultToDoc" class="org.springframework.integration.xml.transformer.ResultToDocumentTransformer"/>
      
      <int-xml:xslt-transformer input-channel="in" output-channel="fahrenheitChannel"
      	xsl-resource="classpath:noop.xslt" result-transformer="resultToDoc"/>
      

      Results in a String payload

      <int-xml:xslt-transformer input-channel="in" output-channel="fahrenheitChannel"
      	xsl-resource="classpath:noop.xslt" result-transformer="resultToDoc" result-type="DOMResult"/>
      

      Reults in a Document payload.

      	<int-xml:xslt-transformer input-channel="in" output-channel="fahrenheitChannel"
      		xsl-resource="classpath:noop.xslt" result-transformer="resultToDoc" result-type="StringResult"/>
      

      Reults in a Document payload.

      The problem is that the resultTransformer is only applied if the input is a Source, or 'alwaysUseResultFactory' is coerced to true by setting a result-type or result-factory.

        Issue Links

          Activity

          Hide
          Gary Russell added a comment -

          The JavaDocs for the class describe the observed behavior so it looks like it's intended, so maybe it's just a (schema and reference) documentation issue only.

          Show
          Gary Russell added a comment - The JavaDocs for the class describe the observed behavior so it looks like it's intended, so maybe it's just a (schema and reference) documentation issue only.
          Hide
          Gunnar Hillert added a comment -

          Updated the reference documentation substantially. See pull request:

          https://github.com/SpringSource/spring-integration/pull/530

          Show
          Gunnar Hillert added a comment - Updated the reference documentation substantially. See pull request: https://github.com/SpringSource/spring-integration/pull/530

            People

            • Assignee:
              Gunnar Hillert
              Reporter:
              Gary Russell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5d Original Estimate - 0.5d
                0.5d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 1d 1.5h
                1d 1.5h