You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andrei Shakirin (JIRA)" <ji...@apache.org> on 2012/10/18 17:02:02 UTC

[jira] [Created] (CXF-4582) Support XSLT scripts in CXF Transformation feature

Andrei Shakirin created CXF-4582:
------------------------------------

             Summary: Support XSLT scripts in CXF Transformation feature
                 Key: CXF-4582
                 URL: https://issues.apache.org/jira/browse/CXF-4582
             Project: CXF
          Issue Type: Improvement
          Components: Core
            Reporter: Andrei Shakirin
            Priority: Minor


Hi,

Actually CXF Transformation feature covers 99% of user needs:
1) changing input and output element names and namespaces
2) appending new input and output elements
3) replacing text content
4) dropping output and input elements
5) converting attributes to elements

Anyway I see some advanced use cases not supported by CXF Transformation feature, like:
1) replace/rename attributes;
2) replace/remove attributes values
3) process lists
etc.

My proposal is to add property for Transformation feature that specified XSLT transformation script to support such advanced use cases.
It will look like:
<bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature">
  <property name="inXSLT" value="/org/test/my-in.xslt"/>
  <property name="outXSLT" value="/org/test/my-out.xslt"/>
</bean> 

XSLT engine Xalan will probably break the streaming (AFAIK is still load tree into memory, incremental transformation just do it in optimized parallel way). But for small messages is still an option and looking forward - probably clean stream oriented processing will be supported in the future.

I have basic implementation and will provide a patch, if the improvement makes sense.

Regards,
Andrei.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-4582) Support XSLT scripts in CXF Transformation feature

Posted by "Andrei Shakirin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Shakirin updated CXF-4582:
---------------------------------

    Attachment: XSLTFeature-systest-uncategorized.patch
                XSLTFeature-core.patch

Patch for the feature is attached
                
> Support XSLT scripts in CXF Transformation feature
> --------------------------------------------------
>
>                 Key: CXF-4582
>                 URL: https://issues.apache.org/jira/browse/CXF-4582
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Andrei Shakirin
>            Priority: Minor
>         Attachments: XSLTFeature-core.patch, XSLTFeature-systest-uncategorized.patch
>
>
> Hi,
> Actually CXF Transformation feature covers 99% of user needs:
> 1) changing input and output element names and namespaces
> 2) appending new input and output elements
> 3) replacing text content
> 4) dropping output and input elements
> 5) converting attributes to elements
> Anyway I see some advanced use cases not supported by CXF Transformation feature, like:
> 1) replace/rename attributes;
> 2) replace/remove attributes values
> 3) process lists
> etc.
> My proposal is to add property for Transformation feature that specified XSLT transformation script to support such advanced use cases.
> It will look like:
> <bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature">
>   <property name="inXSLT" value="/org/test/my-in.xslt"/>
>   <property name="outXSLT" value="/org/test/my-out.xslt"/>
> </bean> 
> XSLT engine Xalan will probably break the streaming (AFAIK is still load tree into memory, incremental transformation just do it in optimized parallel way). But for small messages is still an option and looking forward - probably clean stream oriented processing will be supported in the future.
> I have basic implementation and will provide a patch, if the improvement makes sense.
> Regards,
> Andrei.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-4582) Support XSLT scripts in CXF Transformation feature

Posted by "Andrei Shakirin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Shakirin resolved CXF-4582.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.1
         Assignee: Andrei Shakirin
    
> Support XSLT scripts in CXF Transformation feature
> --------------------------------------------------
>
>                 Key: CXF-4582
>                 URL: https://issues.apache.org/jira/browse/CXF-4582
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Andrei Shakirin
>            Assignee: Andrei Shakirin
>            Priority: Minor
>             Fix For: 2.7.1
>
>         Attachments: XSLTFeature-core.patch, XSLTFeature-systest-uncategorized.patch
>
>
> Hi,
> Actually CXF Transformation feature covers 99% of user needs:
> 1) changing input and output element names and namespaces
> 2) appending new input and output elements
> 3) replacing text content
> 4) dropping output and input elements
> 5) converting attributes to elements
> Anyway I see some advanced use cases not supported by CXF Transformation feature, like:
> 1) replace/rename attributes;
> 2) replace/remove attributes values
> 3) process lists
> etc.
> My proposal is to add property for Transformation feature that specified XSLT transformation script to support such advanced use cases.
> It will look like:
> <bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature">
>   <property name="inXSLT" value="/org/test/my-in.xslt"/>
>   <property name="outXSLT" value="/org/test/my-out.xslt"/>
> </bean> 
> XSLT engine Xalan will probably break the streaming (AFAIK is still load tree into memory, incremental transformation just do it in optimized parallel way). But for small messages is still an option and looking forward - probably clean stream oriented processing will be supported in the future.
> I have basic implementation and will provide a patch, if the improvement makes sense.
> Regards,
> Andrei.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-4582) Support XSLT scripts in CXF Transformation feature

Posted by "Andrei Shakirin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479784#comment-13479784 ] 

Andrei Shakirin commented on CXF-4582:
--------------------------------------

As Sergei recommended (http://cxf.547215.n5.nabble.com/Improvement-proposal-for-CXF-Transformation-Feature-td5716943.html), functionality will be implemented as separate XSLTFeature.
Working on patch.
                
> Support XSLT scripts in CXF Transformation feature
> --------------------------------------------------
>
>                 Key: CXF-4582
>                 URL: https://issues.apache.org/jira/browse/CXF-4582
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Andrei Shakirin
>            Priority: Minor
>
> Hi,
> Actually CXF Transformation feature covers 99% of user needs:
> 1) changing input and output element names and namespaces
> 2) appending new input and output elements
> 3) replacing text content
> 4) dropping output and input elements
> 5) converting attributes to elements
> Anyway I see some advanced use cases not supported by CXF Transformation feature, like:
> 1) replace/rename attributes;
> 2) replace/remove attributes values
> 3) process lists
> etc.
> My proposal is to add property for Transformation feature that specified XSLT transformation script to support such advanced use cases.
> It will look like:
> <bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature">
>   <property name="inXSLT" value="/org/test/my-in.xslt"/>
>   <property name="outXSLT" value="/org/test/my-out.xslt"/>
> </bean> 
> XSLT engine Xalan will probably break the streaming (AFAIK is still load tree into memory, incremental transformation just do it in optimized parallel way). But for small messages is still an option and looking forward - probably clean stream oriented processing will be supported in the future.
> I have basic implementation and will provide a patch, if the improvement makes sense.
> Regards,
> Andrei.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira