xsl-list
[Top] [All Lists]

RE: how to view html not xml/xsl?

2003-06-13 14:15:59
Hi,

Another way to do it that is more valueable if you need to see the *real*
/html/ that IE is actually using is to create the following somefile.url and
drop it into c:/Documents and Setting/UserName/Favorites/Links directory.
The a 'link' button will show up in your browsers menubar.

Here is the code (The extra linebreaks are there to indicate only what one
line should contain to avoid wrapping problems. You should have 5 lines in
the final somefile.url):

[DEFAULT]

BASEURL=http://localhost:8080

[InternetShortcut]

URL=javascript:(function(){%20function%20htmlEscape(s){s=s.replace(/&/g,'&am
p;');s=s.replace(/>/g,'&gt;');s=s.replace(/</g,'&lt;');return%20s;}%20x=wind
ow.open();%20x.document.write('<pre>'%20+%20htmlEscape('<html>\n'%20+%20top.
document.documentElement.innerHTML%20+%20'\n</html>'));%20x.document.close()
;%20})();

Modified=B01FA2469552C20161



The important thing here is the 'top.document.documentElement.innerHTML' and
indicates you want the main browser window results. Say you need to get the
results of a frame in a frameset:



[DEFAULT]

BASEURL=http://localhost:8080

[InternetShortcut]

URL=javascript:(function(){%20function%20htmlEscape(s){s=s.replace(/&/g,'&am
p;');s=s.replace(/>/g,'&gt;');s=s.replace(/</g,'&lt;');return%20s;}%20x=wind
ow.open();%20x.document.write('<pre>'%20+%20htmlEscape('<html>\n'%20+%20top.
tool.document.documentElement.innerHTML%20+%20'\n</html>'));%20x.document.cl
ose();%20})();

Modified=B01FA2469552C20161


The important thing here is the
'top.tool.document.documentElement.innerHTML' which indicates you want the
tool frame.

It is amazing how different the html that MS uses from what you give it :)

Best,
-Rob



-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-
list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of David Carlisle
Sent: Friday, June 13, 2003 1:46 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com



  I'm interpolating here by assuming your using an IE browser to display
  the transformed XML.  If so, the only way I know to see the actual
  transformed HTML is through some Javascript magic using the following
  two functions:



if you download MS's xmltools for IE package then IE just gets a right
button menu option "View XSL output" (and another one: Validate XML)

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>