XML/XSL Portal

Multiple Stylesheet Aware
HideXML Documenting CodeHide
     
  
 
 

controls.asp

None.
No Comments Found.
Objects Used
  • XSLControl Class (1)
Tlc 253
253
Source
<%@ LANGUAGE=VBScript %> <HTML> <HEAD> <STYLE> BODY { font-family:Verdana; font-size:9pt; margin:0px; color:teal; } .instructions { font-style:italic; text-align:right; color:gray; margin-left:.5em; } .headline { background-color:teal; color:white; font-family:Arial Black; font-size:16pt; text-align:center; padding-top:1em; } .group { font-family:Arial Black; font-size:14pt; margin-top:.5em; margin-left:.5em; margin-bottom:.5em; } .module_name { font-family:Arial Black; font-size:14pt; margin-top:.5em; margin-left:.5em; margin-bottom:.5em; } .button { font-family:Verdana; font-size:10pt; font-weight:bold; text-align:right; color:gray; } .arrow { font-family:Webdings; } </STYLE> </HEAD> <!--TOOLBAR_START--> <!--TOOLBAR_EXEMPT--> <!--TOOLBAR_END--> <SCRIPT> // ----- Scripts to control the XSL ActiveX Control ------ function update() { if (QshowHTML()){ parent.results.display(XSLControl.htmlText + "<XMP>" + XSLControl.htmlText + "</XMP>"); }else{ parent.results.display(XSLControl.htmlText); } //Alert(XSLControl.altHtml); } function changeXML(xmldoc) { XSLControl.documentURL = xmldoc; update(); } function changeXSL(xsldoc) { XSLControl.styleURL = xsldoc; update(); } function changeClientXML(module, webdoc) { XSLControl.documentURL = "/total.pl?MODULE=" + module + "&FILE=" + module + "\\" + webdoc; update(); } </SCRIPT> <SCRIPT> // ----- Scripts to activate buttons ------ var oldXMLitem; var oldXSLitem; function over(item) { item.style.color = "black"; } function out(item) { item.style.color = "gray"; } function select(group, item) { if (group == "xml") { oldXMLitem.style.textDecoration = ""; oldXMLitem = item; } else { oldXSLitem.style.textDecoration = ""; oldXSLitem = item; } item.style.textDecoration = "underline"; } </SCRIPT> <SCRIPT> document.onclick = doDocumentOnClick function doDocumentOnClick() { var eSrc = window.event.srcElement ; if (eSrc.className == "module_name") { var sId = eSrc.innerText ; if (document.all(sId).style.display == "block") { document.all(sId).style.display = "none" ; } else { document.all(sId).style.display = "block" ; } } window.event.cancelBubble = true ; } </SCRIPT> <SCRIPT> var GshowHTML=false; function showHTML(){ GshowHTML = !GshowHTML; if (GshowHTML){ document.all("ShowHTMLButton").innerHTML = 'Hide HTML<SPAN CLASS="arrow">4</SPAN>'; }else{ document.all("ShowHTMLButton").innerHTML = 'Show HTML<SPAN CLASS="arrow">4</SPAN>'; } update(); } function QshowHTML(){ return GshowHTML; } </SCRIPT> <SCRIPT for="window" event="onload"> oldXMLitem = document.all.item("first-XML-item"); select("xml", oldXMLitem); oldXSLitem = document.all.item("first-XSL-item"); select("xsl", oldXSLitem); //document.all.item("fileTree").innerHTML = XMLtree.htmlText; </SCRIPT> <BODY> <DIV CLASS="headline">ET Document Viewer</DIV> <DIV CLASS="instructions"> Select an <B>ASP source file</B> and an <B>XSL stylesheet</B> with which to view it. The results will appear in the frame on the right. </DIV> <DIV CLASS="group">ET Styles <DIV CLASS="button" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXSL("/raw-xml.xsl"); select("xsl",this)'> raw-xml.xsl<SPAN CLASS="arrow">4</SPAN> </DIV> <DIV CLASS="button" ID="first-XSL-item" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXSL("/etl_style.xsl"); select("xsl",this)'> ET_Style.xsl<SPAN CLASS="arrow">4</SPAN> </DIV> <DIV CLASS="button" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXSL("/etl_styleHide.xsl"); select("xsl",this)'> ET_StyleHide.xsl<SPAN CLASS="arrow">4</SPAN> </DIV> <DIV CLASS="button" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXSL("/etl_styleHideAmb.xsl"); select("xsl",this)'> ET_StyleHideAmb.xsl<SPAN CLASS="arrow">4</SPAN> </DIV> <DIV CLASS="button" id="ShowHTMLButton" onMouseOver="over(this)" onMouseOut="out(this)" onClick='showHTML();'> Show HTML<SPAN CLASS="arrow">4</SPAN> </DIV> </DIV> <DIV CLASS="instructions"> Please wait while this page loads fully.<br>Do not select another file until loading is complete. </DIV> <DIV CLASS="group">ASP Files <DIV CLASS="button" ID="first-XML-item" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXML("Instructions.xml"); select("xml",this)'> Instructions<SPAN CLASS="arrow">4</SPAN> </DIV> <%Dim fs, f, f1, fc, s, sfs, sf Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder("M:\AUTOperlVSS\docs") Set sfs = f.SubFolders for each sf in sfs if Mid(sf.name, 1, 1) <> "_" And sf.name <> "images" then %><DIV CLASS="module_name"><%=sf.name%></DIV><% %> <DIV ID="<%=sf.name%>" style="display:none;"><% set fc = sf.Files For Each f in fc bits = split(f.name, ".") if (bits(Ubound(bits)) = "asp" or bits(Ubound(bits)) = "htm") then%> <DIV CLASS="button" onMouseOver="over(this)" onMouseOut="out(this)" onClick='changeXML("/total.pl?MODULE=<%=sf.name%>&FILE=<%=sf.name & "\\" & f.name%>"); select("xml",this)'> <%=f.name%><SPAN CLASS="arrow">4</SPAN> </DIV> <% end if next %></DIV><% End if Next %> </DIV> <OBJECT STYLE="display:none" ID="XSLControl" CLASSID="CLSID:2BD0D2F2-52EC-11D1-8C69-0E16BC000000" CODEBASE="http://www.microsoft.com/xml/xsl/msxsl.cab"> <PARAM NAME="documentURL" VALUE="/instructions.xml"> <PARAM NAME="styleURL" VALUE="/ETL_style.xsl"> </OBJECT> </BODY> </HTML>
 
 
  
     
Open

Delete

View XML
View XSL