考虑我的输入 xml 文件如下
<?xml version="1.0" encoding="UTF-8"?>
<com xsi:schemaLocation="http://do.way.com/sales/Amb
http://do.way.com/temp/sales/ale/ax.xsd"
xmlns:w="http://do.way.com/sales/W"
xmlns="http://do.way.com/sales/Amb"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wire="http://do.way.com/sales/Wire">
<content>
<wire:wire>
<wire:sI>
<w:aH>
<text>Ccc <dynamic name="C_R_N"/>: More</text>
<w:contact value="false"/>
</w:aH>
<w:page>
<nL>Please call us</nL>
</w:page>
<w:body>
<text> C R N: <strong>
<dynamic name="C_R_N"/></strong>
</text>
</w:body>
<w:body>
<text>
RE: <dynamic name="D_C_P"/> <dynamic name="M_C_O"/>
</text>
</w:body>
<w:body>
<text>
In order <strong>
<dynamic name="M_D_D"/>
</strong>, we need some information.
</text>
</w:body>
<w:body>
<text>
<strong>
Please call us <dynamic name="C_P_D_N"/>.
</strong> Our hours <ul class="nested">
<li>
Monday - Friday,
<dynamic name="DST_M_F_S_Hour"/> am -
<dynamic name="DST_M_F_E_Hour"/> pm; Saturday,
<dynamic name="DST_M_F_S_Hour"/> am -
<dynamic name="DST_M_F_E_Hour"/> pm.
</li>
</ul>
</text>
</w:body>
<w:body>
<text>
Thank you for your action. .
</text>
</w:body>
<w:body>
<text>
<dynamic name="C_D_N"/>
</text>
</w:body>
<w:TextAndImage>
<text>
<dynamic name="C_S_N_D"/>
</text>
</w:TextAndImage>
<w:dynamicNames>
<w:dynamicName value="LOW"/>
<w:dynamicName value="Env"/>
</w:dynamicNames>
</wire:sI>
</wire:wire>
</content>
</com>
转换上述输入 xml 文件的所需 xsl 文件是指 Properties.xml 文件,该文件具有对应于 Properties.xml 下面给出的输入 xml 标签元素(键)的转换标签(值)
<?xml version="1.0" encoding="utf-8"?>
<Properties>
<Property value="w:aH">aHe</Property>
<Property value="w:contact">contact1</Property>
<Property value="w:page">pageH</Property>
<Property value="w:body">bodyP</Property>
<Property value="w:TextAndImage">textAndImage1</Property>
<Property value="w:dynamicNames">dynamicNames1</Property>
<Property value="w:dynamicName">dynamicValName</Property>
</Properties>
我转换后的 xml 看起来像
<Content xsi:schemaLocation="id:d1234 http://abc:10/w/g/B/System/abc.xsd"
xmlns="id:d1234" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<aHe>
<text>Ccc
<dynamic name="C_R_N" xmlns="http://www.w3.org/1999/xhtml" >
C_R_N
</dynamic>
: More
</text>
<contact1>false</contact1>
</aHe>
<pageH>
<nL>Please call us</nL>
</pageH>
<bodyP>
<text> C R N: <strong>
<dynamic name="C_R_N" xmlns="http://www.w3.org/1999/xhtml">
C_R_N
</dynamic>
</strong>
</text>
</bodyP>
<bodyP>
<text>
RE: <dynamic name="D_C_P" xmlns="http://www.w3.org/1999/xhtml">
D_C_P</dynamic>
<dynamic name="M_C_O" xmlns="http://www.w3.org/1999/xhtml">M_C_O</dynamic>
</text>
</bodyP>
<bodyP>
<text>
In order <strong>
<dynamic name="M_D_D" xmlns="http://www.w3.org/1999/xhtml"> M_D_D </dynamic>
</strong>, we need some information.
</text>
</bodyP>
<bodyP>
<text> Please call us
<strong>
<dynamic name="C_P_D_N" xmlns="http://www.w3.org/1999/xhtml">C_P_D_N</dynamic>.
</strong> Our hours <ul class="nested">
<li>
Monday - Friday, <dynamic name="DST_M_F_S_Hour" xmlns="http://www.w3.org/1999/xhtml">DST_M_F_S_Hour</dynamic> am - <dynamic name="DST_M_F_E_Hour" xmlns="http://www.w3.org/1999/xhtml">DST_M_F_E_Hour</dynamic> pm; Saturday, <dynamic name="DST_M_F_S_Hour" xmlns="http://www.w3.org/1999/xhtml">DST_M_F_S_Hour</dynamic> am - <dynamic name="DST_M_F_E_Hour" xmlns="http://www.w3.org/1999/xhtml">
DST_M_F_E_Hour</dynamic>pm.
</li>
</ul>
</text>
</bodyP>
<bodyP>
<text>
Thank you for your action. .
</text>
</bodyP>
<bodyP>
<text>
<dynamic name="C_D_N" xmlns="http://www.w3.org/1999/xhtml">
C_D_N </dynamic>
</text>
</bodyP>
<textAndImage>
<text>
<dynamic name="C_S_N_D" xmlns="http://www.w3.org/1999/xhtml">
C_S_N_D </dynamic>
</text>
</textAndImage>
<dynamicNames1>
<dynamicValName>LOW</dynamicValName>
<dynamicValName>Env</dynamicValName>
</dynamicNames1>
</Content>
Can anyone provide me with the xsl file which meets my requirement.