Announcement Announcement Module
Collapse
No announcement yet.
xslt transformer Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • xslt transformer

    Hi guys,
    I have a problem using transformer.
    I have to apply a xslt transformation. I got it with stylesheet version 1.0 in the following way:

    <int-xml:xslt-transformer input-channel="input-channel"
    output-channel="output-channel" xsl-resource="classpath:/my.xsl" />

    but if I have a stylesheet 2.0 I receive an error because spring integration behind the scene uses xalan that doesn't support xpath2.
    To avoid that I tried to use a different transformer, saxon that is xslt 2.0 compliant, but I received the following error.
    <int-xml:xslt-transformer input-channel="input-channel"
    output-channel="output-channel" xsl-resource="classpath:/my2-0.xsl" result-transformer="net.sf.saxon.TransformerFactoryImpl" />


    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.xml.transformer.X sltPayloadTransformer#0': Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
    at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:250)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:1035)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:939)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 94)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:225)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:291 )


    Any help will be appreciate.

    Thank you.
    Mariateresa

  • #2
    Hi Mariateresa,

    Could you look at our XQuery adapters at: https://github.com/SpringSource/spri...gration-xquery?

    Since XQuery is a super-set of XPath 2.0 maybe it can solve your issue. If not, please open Jira at:

    https://jira.springsource.org/browse/INT

    and we will try to provide XSLT 2.0 support as soon as possible.

    Thanks!

    Cheers,

    Gunnar

    Comment


    • #3
      Hi Gunnar,
      thanks for your answer.

      I believe spring xquery adapter doesn't fit my needs because I should provide to the transformer an xq file but I have just my xsl file.
      Do you have any suggestion?

      Comment


      • #4
        BTW, I opened a jira https://jira.springsource.org/browse/INT-2780

        Comment

        Working...
        X