创建简单的xslt transformation

197 阅读1分钟
  1. www.w3schools.com/xsl/tryxslt… 保存到本地,命名为source.xml:

clipboard1

  1. 使用tcode STRANS创建一个新的transformation,类型为XSLT. 将上图右边的source code copy到XSLT editor中,激活。
  2. press F8 launch tester:
    clipboard2

在Source File Path处load 第一步保存到本地的xml文件,点View Html即可看到测试结果( 也可直接指定输出文件路径):
clipboard3
clipboard4
使用report call transformation结果相同:

DATA: lv_source TYPE xstring,
      lv_result TYPE xstring.

lv_source = zcl_jerry_tool=>get_file_binary_by_path( '\\TSHomeServer\TSHome$\i042416\Desktop\source.xml').
CALL TRANSFORMATION zw3c_color SOURCE XML lv_source RESULT XML lv_result.

clipboard5