Subject: RE: [xsl] msxml stylesheet for displaying xml tree question From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> Date: Mon, 05 Jan 2004 13:53:26 +0000 |
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: [xsl] msxml stylesheet for displaying xml tree question Date: Mon, 5 Jan 2004 14:22:01 +0100
This is really sort of off-topic, I was thinking I might like to improve my defaultss.xsl version I have, to do some of the things I want I need to add some extension functions, one of which would be a function that finds where the xml document that the xslt is displaying is located at (remember that defaultss.xsl is a resource in the .dll) anyone have suggestions on the best way to do this? Perhaps there's some hidden objects/methods/properties exposed to the scripting environment for extension functions in msxml that someone out there knows about?
[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;
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>
<!-- 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;
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;
// --> </script> </body> </html>
_________________________________________________________________ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
Current Thread |
---|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Literature on XSLT 2.0, David . Pawson | Thread | RE: [xsl] msxml stylesheet for disp, bryan |
[xsl] Literature on XSLT 2.0, yguaba | Date | RE: [xsl] msxml stylesheet for disp, bryan |
Month |