以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  FCKeditor编辑的内容导出为xml文件后,如何用xml+xsl的方法正确处理使得浏览器能显示图片和falsh?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=40884)


--  作者:benlu
--  发布时间:12/5/2006 5:35:00 PM

--  FCKeditor编辑的内容导出为xml文件后,如何用xml+xsl的方法正确处理使得浏览器能显示图片和falsh?
xml文件如下:
//xml file 开始------------
<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="news.xsl"?>

<news>
  <id>106</id>
  <context>dfasdf&lt;embed type=&quot;application/x-shockwave-flash&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; src=&quot;./22.swf&quot; play=&quot;true&quot; loop=&quot;true&quot; menu=&quot;true&quot;&gt;&lt;/embed&gt;&lt;img width=&quot;777&quot; height=&quot;432&quot; src=&quot;./0001.jpg&quot; alt=&quot;&quot; /&gt;</context>
  <title>dfasd</title>
</news>
//xml file 结束--------------

xsl中使用
<xsl:output cdata-section-elements="context"/>
<xsl:value-of select="context"/>
浏览器只显示如下内容,而不是显示一个flash和一个图片

//浏览器显示内容   开始----------
dfasdf<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src=".22.swf" play="true" loop="true" menu="true"></embed><img width="777" height="432" src="./0001.jpg" alt="" />

//浏览器显示内容   结束----------

<xsl:value-of>好像只能显示文本节点,不知类似html的节点如何正确显示?



--  作者:Qr
--  发布时间:12/5/2006 5:53:00 PM

--  
xml:
   <html><![CDATA[HTML CODE]]></html>
xsl:
<xsl:value-of select="html" disable-output-escaping="yes"/>
--  作者:benlu
--  发布时间:12/6/2006 10:28:00 AM

--  
基本解决,谢谢楼上的。
--  作者:benlu
--  发布时间:12/6/2006 12:01:00 PM

--  
firefox里不行啊
--  作者:Qr
--  发布时间:12/6/2006 1:11:00 PM

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