用这个语句:
<xsl:apply-templates/>
就可以进行原样输出了.

解决方案 »

  1.   

    例如:
    xsl文件:
    <?xml version="1.0" encoding="GBK" ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
      <xsl:template match="text()">
        <xsl:value-of />
      </xsl:template>
      <xsl:template match="/">
        <html>
          <head>
            <meta http-equiv="Content-Type" content="text/html;charset=GBK"/>
            <title>
              <xsl:value-of select="//article/@title"/>
            </title>
            <style>textarea.content{ voerflow-y:visible; border:0px;font-size:12px;font-family:宋体 Fixedsys;line-height:150%;overflow:visible;border-width:0px;width:550px;height:40px;}</style>
            <script language="javascript">
              <xsl:comment>
                <![CDATA[
                ]]>
              </xsl:comment>
            </script>
          </head>
          <body gbcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="show();">
            <xsl:apply-templates select="//article"/>
          </body>
        </html>
      </xsl:template>
      <xsl:template match="article">
        <table sytle="TABLE-LAYOUT:fixed" width="580" cellpadding="3">
          <tr>
            <td>
              <xsl:element name="textarea">
                <xsl:attribute name="class">content</xsl:attribute>
                <xsl:attribute name="readonly">true</xsl:attribute>
                <xsl:apply-templates/>
              </xsl:element>
            </td>
          </tr>
        </table>
      </xsl:template>
    </xsl:stylesheet>
    <xsl:apply-templates/>
    </xsl:element>
    </td>
    </tr>
    </table>
    </xsl:template>xml文件:
    <?xml version="1.0" encoding="GBK"?>
    <?xml-stylesheet type="text/xsl" href="faq.xsl"?>
    <article title="斑马打印机常见故障及解决办法" xml:space="preserve">
        条码打印机在使用过程中常常遇到一些问题,下面是使用斑马条码打印机中,遇到的一些常见故障,总结列表如下,并给出调整办法,希望能对你使用斑马机有所帮助。
    症状 解决办法
      电源灯不亮;开机后其它灯不亮;校正灯、位置灯、深度灯中有一个不灭 机器有故障,请联系供应商 
    暂停灯亮;纸/色带灯亮 纸用完了或安装不正确 
    </article>