1
的XSL轉換這是我的響應消息:沒有一個馬克西莫響應
<?xml version="1.0" encoding="UTF-16"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<QueryMXCPISResponse baseLanguage="EN"
creationDateTime="2014-11-25T11:56:09+01:00"
maximoVersion="7 5 20130829-1209 V7510--1"
messageID="1416912970550686680" rsCount="3" rsStart="0"
rsTotal="3" transLanguage="EN"
xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MXCPISSet>
<CPIS>
<AK>D</AK>
<CPISID>630124</CPISID>
<ORGID>01</ORGID>
<S1>0</S1>
<S2>0</S2>
<S3>0</S3>
<S4>0</S4>
<S5>0</S5>
<S6>1</S6>
<SHIFT>3</SHIFT>
<SHIFTDATE>2014-09-30T00:00:00+02:00</SHIFTDATE>
<SITEID>0030</SITEID>
<STATUS>NEW</STATUS>
<TEAM>C</TEAM>
<WP>LC11</WP>
<ASSET>
<ASSETNUM>LC11</ASSETNUM>
<LOCATION>FACILITY-1</LOCATION>
<SITEID>0030</SITEID>
</ASSET>
</CPIS>
<CPIS>
<AK>D</AK>
<CPISID>630121</CPISID>
<ORGID>01</ORGID>
<S1>0</S1>
<S2>0</S2>
<S3>1</S3>
<S4>0</S4>
<S5>0</S5>
<S6>1</S6>
<SHIFT>1</SHIFT>
<SHIFTDATE>2014-09-30T00:00:00+02:00</SHIFTDATE>
<SITEID>0030</SITEID>
<STATUS>CHECKED</STATUS>
<TEAM>B</TEAM>
<WP>LC11</WP>
<ASSET>
<ASSETNUM>LC11</ASSETNUM>
<LOCATION>FACILITY-1</LOCATION>
<SITEID>0030</SITEID>
</ASSET>
</CPIS>
<CPIS>
<AK>D</AK>
<CPISID>630122</CPISID>
<ORGID>01</ORGID>
<S1>1</S1>
<S2>1</S2>
<S3>0</S3>
<S4>0</S4>
<S5>0</S5>
<S6>1</S6>
<SHIFT>2</SHIFT>
<SHIFTDATE>2014-09-30T00:00:00+02:00</SHIFTDATE>
<SITEID>0030</SITEID>
<STATUS>APPLIED</STATUS>
<TEAM>B</TEAM>
<WP>LC11</WP>
<ASSET>
<ASSETNUM>LC11</ASSETNUM>
<LOCATION>FACILITY-1</LOCATION>
<SITEID>0030</SITEID>
</ASSET>
</CPIS>
</MXCPISSet>
</QueryMXCPISResponse>
</soapenv:Body>
而且這是我的xsl:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="MXCPISSet">
<html>
<body>
<table>
<tbody>
<tr>
<th>WP</th>
<th>Site</th>
<th>Shift</th>
</tr>
<xsl:for-each select="CPIS">
<tr>
<td><xsl:value-of select="WP"/></td>
<td><xsl:value-of select="ASSET/SITEID"/></td>
<td><xsl:value-of select="SHIFT"/></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
這是結果:
D 630124 01 0 0 0 0 0 1 3 2014-09-30T00:00:00+02:00 0030 NEW C LC11 LC11 FACILITY-1 0030 D 630121 01 0 0 1 0 0 1 1 2014-09-30T00:00:00+02:00 0030 CHECKED B LC11 LC11 FACILITY-1 0030 D 630122 01 1 1 0 0 0 1 2 2014-09-30T00:00:00+02:00 0030 APPLIED B LC11 LC11 FACILITY-1 0030
如果我刪除xmlns =「http://www.i bm.com/maximo」從響應消息我得到正確的輸出
WP Site Shift
LC11 0030 3
LC11 0030 1
LC11 0030 2
什麼是錯誤的,我的XSL文件,我沒有得到HTML輸出?
謝謝。現在它工作得很好。 – Thomas 2014-11-27 11:24:53