[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: XSL in HTML

Subject: Re: Re: XSL in HTML
From: "Alex Hildyard" <alexhildyard@xxxxxxxxxxx>
Date: Wed, 19 Nov 2003 21:07:00 -0000
alex stuardo
I don't know what browser you are using, but I do know you can do this in
recent versions of IE (I think you need IE5 or higher, but don't quote me on
this).

FYI, have a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmmthtransformnode.asp

This includes the following script, which loads an XML file and an XSL
stylesheet, applies the transformation, then inserts the resultant document
into the HTML file -- which I believe is what you require.

<SCRIPT>
  // Load data.
  var source = new ActiveXObject("Msxml2.DOMDocument");
  source.async = false;
  source.resolveExternals = false;
  source.load("books.xml");

  // Load style sheet.
  var stylesheet = new ActiveXObject("Msxml2.DOMDocument");
  stylesheet.async = false;
  stylesheet.resolveExternals = false;
  stylesheet.load("sample.xsl");

  // Fill a div tag with the result of the transform
  divInfo.innerHTML = source.transformNode(stylesheet);
</SCRIPT>
BTW -- again, I'm speaking for IIS -- there's no reason you can't use
Javascript on the server and perform the transformation with ASP or
something similar, thus passing HTML to the client.

My knowledge of Apache is non-existent, however :)

Best wishes,

Alex



----- Original Message ----- 
From: <yguaba@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, November 19, 2003 5:08 PM
Subject:  Re: XSL in HTML


> Hello Vishnu,
>
> On 19 Nov 2003 at 2:30, Vishnu Vardan wrote:
>
> > (...) my requirement is to have one HTML file and it should process the
> > xml with the xsl embedded in it and show the detail in that HTML.  I
> > doubt whether it is possible.  Please let me know if it is possible.
>
> I don't think you can do that, but my knowledge of XSLT and related
> technologies pales in comparison to that of some of our colleagues on
> this list (Michael Kay, Dimitre Novatchev, David Carlisle etc). Our
> friend The Bat has already replied to your message saying everything
> that I was going to say. I also use PHP to transform XML into HTML
> via XSLT, so I suggest you follow the Bat's suggestions.
>
> Take care,
>
> Erik
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.