天天看點

建立簡單的xslt transformation

http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_apply

中左邊的xml 儲存到本地,命名為source.xml:

建立簡單的xslt transformation

使用tcode STRANS建立一個新的transformation,類型為XSLT. 将上圖右邊的source code copy到XSLT editor中,激活。

press F8 launch tester:

建立簡單的xslt transformation

在Source File Path處load 第一步儲存到本地的xml檔案,點View Html即可看到測試結果( 也可直接指定輸出檔案路徑):

建立簡單的xslt transformation

使用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.

建立簡單的xslt transformation