|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: msxml stylesheet for displaying xml tree question
Not sure what sort of things you need. I wrote a couple of trivial extensions for IE for looking at source code etc. They are both use a skeleton provided by Microsoft. They don't modify the default stylesheet though. They might give you some ideas...From: "bryan" <bry@xxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: msxml stylesheet for displaying xml tree question Date: Mon, 5 Jan 2004 14:22:01 +0100 Run this reg file after copying the two files to the folders specified. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show XML] @="C:\\WINNT\\Web\\ShowXml.htm" "contexts"=hex:01 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Show XSL] @="C:\\WINNT\\Web\\ShowXsl.htm" "contexts"=hex:01 The two files are: <!-- ShowXml.htm --> <html> <body> <script language="JavaScript" defer> <!-- // specific to context menu extensions var win = external.menuArguments; // the document object the user right-clicked on var doc = win.document; var sXml; var sTitle; // make sure our debugging window is a unique window var wincounter = 0; var mywin = window.open("about:blank", "source" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes"); while (mywin == null) { mywin = window.open("about:blank", "source" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes"); } // if (mywin == null) var myDoc = mywin.document; myDoc.open("text/plain");
if (doc.XMLDocument)
{
sXml = doc.XMLDocument.xml;
sTitle = "XML for: " + win.location.href;
}
else
{
sXml = "No XML data found for document.";
sTitle = "No XML for: " + win.location.href;
}
myDoc.write(sXml);
myDoc.close();
myDoc.title = sTitle;// --> </script> </body> </html> AND <!-- ShowXsl.htm --> <html> <body> <script language="JavaScript" defer> <!-- // specific to context menu extensions var win = external.menuArguments; // the document object the user right-clicked on var doc = win.document; var sXsl; var sTitle; // make sure our debugging window is a unique window var wincounter = 0; var mywin = window.open("about:blank", "source" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes"); while (mywin == null) { mywin = window.open("about:blank", "source" + wincounter++, "toolbar=no,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=yes"); } // if (mywin == null) var myDoc = mywin.document; myDoc.open("text/plain");
if (doc.XSLDocument)
{
sXsl = doc.XSLDocument.xml;
sTitle = "XSL for: " + win.location.href;
}
else
{
sXsl = "No stylesheet found for document.";
sTitle = "No XSL for: " + win.location.href;
}
myDoc.write(sXsl);
myDoc.close();
myDoc.title = sTitle;
-- Joe _________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








