考虑我的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中给出的输入XML标签元件(键)的各变换标记(值)一个properties.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.