以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 IMS/SCORM/E-learning 』  (http://bbs.xml.org.cn/list.asp?boardid=9)
----  关于页面的XML表现  (http://bbs.xml.org.cn/dispbbs.asp?boardid=9&rootid=&id=70558)


--  作者:zk72706271
--  发布时间:12/16/2008 3:06:00 PM

--  关于页面的XML表现
在一个网页中,我用JS的方法在页面调用XML文件

<grammarpoint chapter="" numberofsubpoints="1" videourl="le2_vi_212.swf" version="normal">
<grammarsubpoint position="1" type="standard" audiofile="le2_au_1656.mov" imagefile="" openingStatement="Words like &lt;i&gt;sandwich, hamburger,&lt;/i&gt;&nbsp;and &lt;i&gt;apple&lt;/i&gt;&nbsp;are count nouns. We can count these items. We use &lt;i&gt;a, an,&lt;/i&gt;&nbsp;or &lt;i&gt;one&lt;/i&gt;&nbsp;with singular count nouns. We use &lt;i&gt;a&lt;/i&gt;&nbsp;before a word that begins with a consonant sound and &lt;i&gt;an&lt;/i&gt;&nbsp;before a word that begins with a vowel sound.">
<phrase position="1" type="text" audiofile="">
 <subphrase position="1" italics="false" bold="false" underline="false" noSpace="false">a</subphrase>
 <subphrase position="2" italics="false" bold="false" underline="false" noSpace="false">sandwich</subphrase>
  <animation type="color" start="1" end="0" subphrase="1" vertical="0" horizontal="0" textdata="" endcolor="" proportion=""></animation></phrase>
<phrase position="2" type="text" audiofile="le2_au_1656a.mov">
 <subphrase position="1" italics="false" bold="false" underline="false" noSpace="false">one</subphrase>
 <subphrase position="2" italics="false" bold="false" underline="false" noSpace="false">hamburger</subphrase>
  <animation type="color" start="1" end="0" subphrase="1" vertical="0" horizontal="0" textdata="" endcolor="" proportion=""></animation></phrase>
<phrase position="3" type="text" audiofile="le2_au_1656b.mov">
 <subphrase position="1" italics="false" bold="false" underline="false" noSpace="false">an</subphrase>
 <subphrase position="2" italics="false" bold="false" underline="false" noSpace="false">apple</subphrase>
  <animation type="color" start="1" end="0" subphrase="1" vertical="0" horizontal="0" textdata="" endcolor="" proportion=""></animation></phrase></grammarsubpoint></grammarpoint>

而且我也对XML做啦 metadata,为什么页面发布出来看不见恩。另IIS发布得话是可以看到的,说明页面没有问题吧

此主题相关图片如下:
按此在新窗口浏览图片
此主题相关图片如下:
按此在新窗口浏览图片


--  作者:zk72706271
--  发布时间:12/16/2008 3:08:00 PM

--  
xml文件我是这样写的
function renderActiveXActivatorString(divid, objString) {
 var d = document.getElementById(divid); 
 if(objString.indexOf('clsid:CAFEEFAC-0015-0000-0006-ABCDEFFEDCBA') !=-1){  
  document.write(objString);
 }else{  
  d.innerHTML = objString;
 }
}

注:objString是xml文件名


--  作者:zk72706271
--  发布时间:12/16/2008 3:17:00 PM

--  
网页代码调用JS的是
<div id="activeXIde1014235693031" align=center><script language='JavaScript'>
<!--
var e1014235693031_XML = 'gc_e1014235693031.xml';
renderActiveXActivatorString('activeXIde1014235693031', getLeoGrammar('gc_e1014235693031.xml', 700,300));
-->
</script>
</div>
--  作者:zk72706271
--  发布时间:12/16/2008 3:29:00 PM

--  
function getLeoGrammar(xmlfilename, width, height) {
 var html = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
    + 'width="' + width + '" height="' + height + '" '
    + 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ID="xmlflashVars">'
    + '<PARAM NAME="MOVIE" VALUE="../../dswMedia/controls/grammar.swf">'
    + '<PARAM NAME="QUALITY" VALUE="high">'
    + '<PARAM NAME="FlashVars" VALUE="XMLFile=' + rPath + xmlfilename +'&rPath=' + rPath + '">'
 + '<param name="scale" value="noscale">'
 + '<param name="salign" value="tl">'
    + '<param name="bgcolor" value="#ffffff"> <PARAM NAME="wmode" VALUE="opaque"> '
    + '<EMBED SRC="../../dswMedia/controls/grammarCoach.swf" NAME="xmlflashVars" '
    + 'FlashVars="XMLFile=' + rPath + xmlfilename +'&rPath=' + rPath + '" '
    + 'width="' + width + '" height="' + height + '" WMODE="opaque" '
    + 'QUALITY="high" '
 + 'WMODE="opaque" '
 + 'scale="noscale" '
 + 'salign="tl" '
    + 'swLiveConnect="true" '
    + 'BGCOLOR="#ffffff" '
    + 'TYPE="application/x-shockwave-flash" '
    + 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'
    + '</EMBED>'
    + '</OBJECT>';

 return html;
}


--  作者:scormexplorer
--  发布时间:12/16/2008 6:05:00 PM

--  
可能是你的中文路径的原因,好好整整。
--  作者:zk72706271
--  发布时间:12/17/2008 9:41:00 AM

--  
我把 “通用English 2 (U.S.)” 里面得“通用“去掉啦,但是和是不行

中文路径得原因会是哪里得呢


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