The following example shows how to print out the results on an API call:
<p>This message is in reply to your <b><xsl:value-of select="/invoke/@tag"/></b> api request.</p>
<xsl:choose>
<xsl:when test="/invoke/@wasSuccess = 'True'"><p class="success">The operation completed successfully.</p></xsl:when>
<xsl:otherwise><p class="failed">The operation FAILED.</p></xsl:otherwise>
</xsl:choose>
<p>
The return value was:<br/>
<b><xsl:value-of select="/invoke/returnVal"/></b>
</p>
<xsl:choose>
<xsl:when test="/invoke/@wasSuccess = 'True'">
<table class="propertyList" border="1">
<caption>Operation Results</caption>
<xsl:for-each select="/invoke/outParams/param">
<tr><th nowrap="true" width="1%"><xsl:value-of select="@name"/>:</th><td><xsl:value-of select="."/></td></tr>
</xsl:for-each>
</table>
</xsl:when>
<xsl:otherwise>
<p>
The error code returned was:<br/>
<b class="error"><xsl:value-of select="/invoke/errorDetails/message"/></b>
</p>
</xsl:otherwise>
</xsl:choose>
See Also |
Next |