2017-08-09 61 views
0

這是當前HTML輸出的底部時生成:需要XSLT將數據添加到HTML文件的末尾

<p style="margin-top: 0px; margin-bottom: 0px;">Agreed and accepted,</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<table width="200" border="0" cellspacing="1" cellpadding="1"> 
<tbody> 
<tr> 
<td> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">__________________________________________________</p> 
</td> 
<td> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">________________________________________</p> 
</td> 
</tr> 
<tr> 
<td>FirstName LastName</td> 
<td>Date</td> 
</tr> 
</tbody> 
</table> 

我需要的XSLT剛過添加數據的eSigIPAddress和eSigDate變量值名字姓氏與下面類似的日期字段:

<p style="margin-top: 0px; margin-bottom: 0px;">Agreed and accepted,</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<table width="200" border="0" cellspacing="1" cellpadding="1"> 
<tbody> 
<tr> 
<td> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">__________________________________________________</p> 
</td> 
<td> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p> 
<p style="margin-top: 0px; margin-bottom: 0px;">________________________________________</p> 
</td> 
</tr> 
<tr> 
<td>FirstName LastName</td> 
<td>Date</td> 
<td>$eSigIPAddress</td> 
<td>$eSigDate</td> 
</tr> 
</tbody> 
</table> 

回答

1
Try the below: 

<?xml version="1.0" encoding="utf-8"?> 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">  
    <xsl:template match="/table/tbody/tr/td"> 
     <xsl:copy> 
      <xsl:apply-templates select="@*|Date"/> 
     </xsl:copy> 
     <td>$eSigIPAddress</td> 
     <td>$eSigDate</td> 
    </xsl:template> 
</xsl:stylesheet>