SAP ABAP实用技巧介绍系列之 ABAP XSLT apply_template keyword
生活随笔
收集整理的這篇文章主要介紹了
SAP ABAP实用技巧介绍系列之 ABAP XSLT apply_template keyword
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
Created by Jerry Wang on Jun 26, 2014
測(cè)試使用的xml:
<catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <year>1988</year> </cd> </catalog>如果注釋掉apply_templates:
輸出:
試圖只選擇title node:
沒有得到預(yù)期的效果:
必須先匹配整個(gè)document,再匹配某個(gè)子節(jié)點(diǎn):
輸出只包含這兩個(gè)子節(jié)點(diǎn):
將match換成xpath也能工作:match="/catalog/cd"
或者match=“cd[parent::catalog]”。
直接match title node:
輸出:
總結(jié)
以上是生活随笔為你收集整理的SAP ABAP实用技巧介绍系列之 ABAP XSLT apply_template keyword的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SAP ABAP实用技巧介绍系列之 AB
- 下一篇: SAP ABAP实用技巧介绍系列之 AB