我想在 integer = '4' 时使用 xslt 对下面的 xml 进行分组,然后循环遍历每个 dict,检查每个元素是否有 integer = 5,然后变量应该设置为仅传递。如果任何整数值是7 状态为失败。
请问有什么建议吗?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList1.0.dtd">
<plist version="1.0">
<dict>
<key>All Samples</key>
<array>
<dict>
<key>LogType</key>
<string>Start</string>
<key>Message</key>
<string>START:Certificate and Genre filter tests</string>
<key>Timestamp</key>
<date>2012-06-25T10:49:02Z</date>
<key>Type</key>
<integer>4</integer>
</dict>
<dict>
<key>LogType</key>
<string>Pass</string>
<key>Message</key>
<string>Navigation title bar should contain genre in card view : ACTION & ADVENTURE</string>
<key>Timestamp</key>
<date>2012-06-25T10:49:13Z</date>
<key>Type</key>
<integer>5</integer>
</dict>
<dict>
<key>LogType</key>
<string>Pass</string>
<key>Message</key>
<string>START: certificate tests filter tests</string>
<key>Timestamp</key>
<date>2012-06-25T10:49:02Z</date>
<key>Type</key>
<integer>4</integer>
</dict>
<dict>
<key>LogType</key>
<string>Pass</string>
<key>Message</key>
<string>Navigation title bar should contain genre in card view : ACTION & ADVENTURE</string>
<key>Timestamp</key>
<date>2012-06-25T10:49:13Z</date>
<key>Type</key>
<integer>5</integer>
</dict>
<dict>
<key>LogType</key>
<string>Fail</string>
<key>Message</key>
<string>Navigation title bar should contain genre in card view : ACTION & ADVENTURE</string>
<key>Timestamp</key>
<date>2012-06-25T10:49:13Z</date>
<key>Type</key>
<integer>7</integer>
</dict>
</array>
</dict>
</plist>
expected result in table view with format
| Test Name | test steps | Test result|
START : GENRE FILTER TEST | | FAIL ( background color to red)
test step1 | Navigation title bar should contain genre in card view | PASS
test step2 | Navigation title bar should contain genre in card view | FAIL
|START : certificate tests filter tests | | PASS ( background color to green)
|test step 1 | Navigation title bar should contain genre in card view | PASS
谢谢,鲍勃