hta实现的笨狼XSLT练习器
2024-08-26 00:15:46
供稿:网友
 
<HTML> 
<HEAD> 
<TITLE>笨狼XSLT练习器 _错新站长站</TITLE> 
<style> 
body  
{ 
    font-size:12; 
    BACKGROUND: #DADADA; 
    margin-left:20; 
} 
#blockXML 
{ 
    font-family:Verdana; 
    font-size:12px;     
    overflow:scroll; 
    height:400; 
    top:40; 
    left:20; 
} 
input 
{ 
    width:350; 
} 
#blockXSL 
{ 
    POSITION: absolute; 
    font-family:Verdana; 
    font-size:12px;     
    overflow:scroll; 
    height:400; 
    top:40;     
}     
#showMe 
{     
    font-family:Verdana; 
    font-size:12px;     
    height:100; 
    overflow:visible; 
    top:300; 
    left:20; 
}     
</style> 
</HEAD> 
<BODY> 
<INPUT type="file" id="fileXML" onchange = "showXML();"/> XML  
<INPUT type="file" id="fileXSL" onchange = "showXSL();"/> XSL   
<button  onclick = "parseXML();" >开始转换</button> 
<button  onclick = "browse();" >预览结果</button> 
<textArea id="blockXML"></textArea> 
<textArea id="blockXSL"></textArea> 
<textArea id="showMe" ></textArea> 
<SCRIPT LANGUAGE="JavaScript">  
window.resizeTo(window.screen.availWidth,window.screen.availHeight); 
window.moveTo(0,0);  
blockXML.style.width = parseInt(window.screen.availWidth * 0.46); 
blockXSL.style.width = blockXML.style.width ; 
blockXSL.style.left =    parseInt(window.screen.availWidth * 0.46) + 30; 
showMe.style.width = parseInt(window.screen.availWidth * 0.92)+ 10; 
   var fso  
   fso = new ActiveXObject("Scripting.FileSystemObject"); 
var xmldoc, xsldoc; 
xmldoc = new ActiveXObject("MSXML2.DOMDocument"); 
xsldoc = new ActiveXObject("MSXML2.DOMDocument"); 
xmldoc.async = false; 
xsldoc.async = false; 
 function browse() 
 { 
    var win=window.open(); 
    win.document.write(showMe.value);