在后台生成一段WordML内容到XML文件中 ,文件片断如下:
<test xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<contexte>
<w:r>
<w:rPr>
<w:b />
<w:i />
<w:u w:val='single'/>
<w:highlight w:val='green'/>
</w:rPr>
<w:t>
<![CDATA[test]]>
</w:t>
</w:r> </contexte>
</test>
绑定一个XSL文件 ,文件片断如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
xmlns:fo='http://www.w3.org/1999/XSL/Format'
xmlns:fn='http://www.w3.org/2003/11/xpath-functions'
xmlns:xf='http://www.w3.org/2002/08/xquery-functions'>
<xsl:template match="/">
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
w:macrosPresent="no"
w:embeddedObjPresent="no"
w:ocxPresent="no"
xml:space="preserve">
<w:body>
<xsl:value-of select='test/contexte' /> </w:body>
</w:wordDocument>
<xsl:stylesheet>我希望,通过XSL语法动态将XML信息绑定,在后台生成Word文档后,能够显示如下信息:test
<test xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml">
<contexte>
<w:r>
<w:rPr>
<w:b />
<w:i />
<w:u w:val='single'/>
<w:highlight w:val='green'/>
</w:rPr>
<w:t>
<![CDATA[test]]>
</w:t>
</w:r> </contexte>
</test>
绑定一个XSL文件 ,文件片断如下:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'
xmlns:fo='http://www.w3.org/1999/XSL/Format'
xmlns:fn='http://www.w3.org/2003/11/xpath-functions'
xmlns:xf='http://www.w3.org/2002/08/xquery-functions'>
<xsl:template match="/">
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
w:macrosPresent="no"
w:embeddedObjPresent="no"
w:ocxPresent="no"
xml:space="preserve">
<w:body>
<xsl:value-of select='test/contexte' /> </w:body>
</w:wordDocument>
<xsl:stylesheet>我希望,通过XSL语法动态将XML信息绑定,在后台生成Word文档后,能够显示如下信息:test
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货