如何在通过 XSLT 转换为 .xls 文件时回溯 xml?
我的请求 xml 为:-
<?xml version="1.0" encoding="UTF-8"?>
<report>
<header>
<request_id>121</request_id><content_provider>ews</content_provider><report_date>2013-09-26</report_date>
</header>
<policy_detail><client_name>MR JOHN PHILIP GRACE</client_name><date_of_birth>1954-04-21</date_of_birth><policy_number>0081467839</policy_number><clawback>518.67</clawback><date_policy_inception>1992-08-07</date_policy_inception>106085</frn><master_agent_number>1212190</master_agent_number><agent_number>6354773</agent_number><clawback_date> </clawback_date>
</policy_detail>
<policy_detail><client_name>MISS LISA PORTER</client_name><date_of_birth>1970-05-18</date_of_birth><policy_number>0082625310</policy_number><clawback>463.72</clawback><date_policy_inception>1994-05-17</date_policy_inception><frn>106085</frn><master_agent_number>1212190</master_agent_number><agent_number>6366264</agent_number><clawback_date> </clawback_date>
</policy_detail>
<policy_detail><client_name>MRS ELAINE LOCKYER</client_name><date_of_birth>1957-09-07</date_of_birth><policy_number>0108791948</policy_number><clawback>64.98</clawback><date_policy_inception>2004-07-01</date_policy_inception><frn>106085</frn><master_agent_number>2178267</master_agent_number><agent_number>1212189</agent_number><clawback_date> </clawback_date>
</policy_detail>
<policy_detail><client_name>MR DEMETRIOUS PAPI</client_name><date_of_birth>1957-10-25</date_of_birth><policy_number>0019751627
</policy_number><clawback>427.71</clawback><date_policy_inception>1992-05-07</date_policy_inception><frn>106085</frn><master_agent_number>2001188</master_agent_number><agent_number>2009744</agent_number><clawback_date> </clawback_date>
</policy_detail>
<summary><policy_count>4</policy_count><clawback_total>1475.08</clawback_total>
</summary>
</report>
处理 XSL 是:--
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*">
<xsl:apply-template/>
</xsl:template>
<xsl:template match="policy_detail">
<xsl:value-of select="client_name"/>
</xsl:template>
在此下方,我必须插入基于特定 master_agent_no 即 1212190 计算总回拨的代码。