0
初めての投稿ですので、誰かが助けてくれました。基本的には、私はxslt経由でpdfを出力しています。私の問題は、そのテーブルにコンテンツが含まれている場合にのみ生成したいテーブルがあることです。私は自分のコールテンプレートが常に開始すると信じているので、たとえコンテンツがなくても常に少なくともテーブルヘッダー行を戻します。私はテーブルをまったく表示したくありません。前もって感謝します。条件付きでテンプレートを呼び出すxslt
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:a="http://www.appian.com/ae/types/2009">
<div id="processVariables">
<xsl:call-template name="applicantDetails" />
</div>
<xsl:call-template name="pp" />
<xsl:call-template name="processMilestoneList" />
<xsl:call-template name="processCommentList" />
</div>
<div id="pageFooter" />
</body>
</html>
<xsl:template name="processCommentList">
<div id="processCommentList">
<th space-before ="12pt" keep-with-next="always" font-weight="bold">Process comments:</th>
<table>
<tr>
<th id="date">Date</th>
<th id="user">User</th>
<th id="comment">Comment</th>
</tr>
<xsl:for-each select="//processCommentList/item">
<tr>
<td>
<xsl:call-template name="DisplayDate">
<xsl:with-param name="dateString">
<xsl:value-of select="date"/>
</xsl:with-param>
</xsl:call-template>
</td>
<td>
<xsl:variable name="commentUser">
<xsl:value-of select="user"/>
</xsl:variable>
<xsl:value-of select="//a:processManifest/a:processUserList/a:User[username/@a:id=$commentUser]/fullName/text()"/>
</td>
<td>
<xsl:value-of select="comment" />
</td>
</tr>
</xsl:for-each>
</table>
</div>