以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  xsl处理字符  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=126571)


--  作者:fencc
--  发布时间:6/28/2013 4:50:00 PM

--  xsl处理字符
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office"
            xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml"
            xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word"
            xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
            xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
            xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 wp14">
 <w:body>
  <w:p w:rsidR="00C05BB8" w:rsidRDefault="007C5F01">
   <w:r w:rsidRPr="00691A2B">
    <w:rPr>
     <w:rFonts w:hint="eastAsia"/>
     <w:shd w:val="pct15" w:color="auto" w:fill="FFFFFF"/>
    </w:rPr>
    <w:t>中</w:t>
   </w:r>
   <w:r>
    <w:rPr>
     <w:rFonts w:hint="eastAsia"/>
    </w:rPr>
    <w:t>华人民共和国</w:t>
   </w:r>
   <w:bookmarkStart w:id="0" w:name="_GoBack"/>
   <w:bookmarkEnd w:id="0"/>
  </w:p>
  <w:sectPr w:rsidR="00C05BB8">
   <w:pgSz w:w="11906" w:h="16838"/>
   <w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="851" w:footer="992" w:gutter="0"/>
   <w:cols w:space="425"/>
   <w:docGrid w:type="lines" w:linePitch="312"/>
  </w:sectPr>
 </w:body>
</w:document>
如何使用xsl将这段代码处理结果为

<a>中<b>华人民共和国
我写成这样,可结果就是不对

<?xml version='1.0'?>

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
 <xsl:output method="html" encoding="GBK" indent="yes"/>

<xsl:template match="w:p/w:r/w:rPr/w:rFonts">
[a]<xsl:copy-of select="w:t"/>[b]
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>


--  作者:zhangyan0147
--  发布时间:11/25/2013 1:16:00 PM

--  
Time September 18 details U.S. company Electronic Art (EA) concerning the rummage around for [url=http://lol.vipmmobank.com/]elo boost[/url] new main operating formal finally results . the company declared that the last govt vp of Semitic deity Actions St. Phil Wilson (Andrew Wilson) can finish the last main operating formal (John Riccitiello) in Objective of this season the starting staying by the resignation , because the new go of [url=http://lol.vipmmobank.com/]elo boosting[/url].


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms