我有下面的 xml 文档。在这里,我想制作一个 xslt 文档以仅选择“。”之前的数字 并附加它来制作一个像'BVI-Chapter01'这样的字符串,并且只给这个字符串一个锚标记,这里01根据'.'之前的数字改变。在下面的 xml 文档中。
<index>
<title>INDEX</title>
<indexdiv>
<title>A</title>
<indexentry>
<primaryie>
<content-style font-style="bold">Administration</content-style>
</primaryie>
<secondaryie>administration order 7.251, 7.254</secondaryie>
<tertiaryie level="1">application for 7.255-7.257</tertiaryie>
<tertiaryie level="2">conditions to be satisfied 7.258-7.260</tertiaryie>
<tertiaryie level="1">blocking</tertiaryie>
<tertiaryie level="2">qualifying administrative receiver 7.261-7.263</tertiaryie>
<tertiaryie level="1">discharge of 7.288-7.280</tertiaryie>
<tertiaryie level="1">effect of 7.264</tertiaryie>
<tertiaryie level="2">directors not terminated 7.265, 7.266</tertiaryie>
<tertiaryie level="1">moratorium 7.267</tertiaryie>
<tertiaryie level="2">administrative receiver, appointment 7.270</tertiaryie>
<tertiaryie level="2">commencement 7.268</tertiaryie>
<tertiaryie level="2">disposal of changed assets 7.269</tertiaryie>
<tertiaryie level="2">judicial decisions 7.273</tertiaryie>
<secondaryie>administrator 7.274, <content-style font-style="italic">see also </content-style>
<content-style font-style="bold">Administrators</content-style>
</secondaryie>
<secondaryie>British Virgin Island companies 7.250</secondaryie>
<secondaryie>creditors, role of 7.283</secondaryie>
<tertiaryie level="1">application to court for directions 7.286</tertiaryie>
</indexentry>
</indexdiv>
</index>
我希望输出如下。
<div class="index">
<a name="BVI_IDX_01"> </a>
<div class="index-title">INDEX</div>
<div class="indexdiv">
<div class="indexentry">
<div class="primaryie">
<span class="font-style-bold">Administration</span>
</div>
<div class="secondaryie">administration order <a href="er:#BVI_CH_07">7.251</a>, <a href="er:#BVI_CH_07">7.254</a>
</div>
<div class="tertiaryie-1">application for <a href="er:#BVI_CH_07">7.255</a>–<a href="er:#BVI_CH_07">7.257</a>
</div>
<div class="tertiaryie-2">conditions to be satisfied <a href="er:#BVI_CH_07/P7-258">7.258</a>–<a href="er:#BVI_CH_07/P7-260">7.260</a>
</div>
<div class="tertiaryie-1">blocking</div>
<div class="tertiaryie-2">qualifying administrative receiver <a href="er:#BVI_CH_07/P7-261">7.261</a>–<a href="er:#BVI_CH_07/P7-263">7.263</a>
</div>
<div class="tertiaryie-1">discharge of <a href="er:#BVI_CH_07">7.288</a>–<a href="er:#BVI_CH_07">7.280</a>
</div>
<div class="tertiaryie-1">effect of <a href="er:#BVI_CH_07">7.264</a>
</div>
<div class="tertiaryie-2">directors not terminated <a href="er:#BVI_CH_07">7.265</a>, <a href="er:#BVI_CH_07">7.266</a>
</div>
<div class="tertiaryie-1">moratorium <a href="er:#BVI_CH_07">7.267</a>
</div>
<div class="tertiaryie-2">administrative receiver, appointment <a href="er:#BVI_CH_07">7.270</a>
</div>
<div class="tertiaryie-2">commencement <a href="er:#BVI_CH_07>7.268</a>
</div>
<div class="tertiaryie-2">disposal of changed assets <a href="er:#BVI_CH_07">7.269</a>
</div>
<div class="tertiaryie-2">judicial decisions <a href="er:#BVI_CH_07">7.273</a>
</div>
<div class="secondaryie">administrator <a href="er:#BVI_CH_07">7.274</a>, <span class="font-style-italic">see also</span>
<span class="font-style-bold">Administrators</span>
</div>
<div class="secondaryie">British Virgin Island companies <a href="er:#BVI_CH_07">7.250</a>
</div>
<div class="secondaryie">creditors, role of <a href="er:#BVI_CH_07">7.283</a>
</div>
<div class="tertiaryie-1">application to court for directions <a href="er:#BVI_CH_07">7.286</a>
</div>
<div class="tertiaryie-1">proposals, amendment <a href="er:#BVI_CH_07">7.284</a>, <a href="er:#BVI_CH_07">7.285</a>
</div>
<div class="tertiaryie-1">unfair prejudice <a href="er:#BVI_CH_07">7.287</a>, <a href="er:#BVI_CH_07">7.289</a>
谢谢