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

Re: New to the list

Subject: Re: New to the list
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 31 Oct 2002 09:32:51 +0000
Re:  New to the list
Hi Bix,

> My question is that suppose I just want to show the given node with
> its information, in a particular HTML format, how would I use the
> original XML and simple output HTML to a browser on-the-fly?

You need to script the transformation. From your description, I'd do
it by doing something like:

  1. Create an HTML page to hold the results; the HTML page can be
     empty aside from a <div> with an id that you will 'fill' with the
     results of the transformation.

  2. Include a <script> in the <head> of the HTML page. In that,
     create some global variables to hold the DOMs of both the source
     XML and the XSLT stylesheet that you want to use.

  3. Create a function that takes an argument that you can use to
     work out which node should form the source of the transformation;
     identify that node in the XML DOM and then use the
     .transformNode() method (with the XSLT DOM as the argument) to do
     the transformation; use the .innerHTML property of the <div> to
     set the content of the <div> to the result of the call to
     .transformNode().

  4. When you create the "links" have them call the function with the
     appropriate argument to identify the node.

To get more information about writing the script, have a look at:

  - the MSXML SDK documentation from http://msdn.microsoft.com/
  - the Clientside tutorials on Chris Bayes' site
    http://www.bayes.co.uk/xml
  - Appendix A (on MSXML 3) in Mike Kay's XSLT Programmer's Reference
    2nd Ed.
  - pp. 559-576 of Beginning XSLT (by me)

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread
  • New to the list
    • bix xslt - Wed, 30 Oct 2002 16:04:33 -0500 (EST)
      • Jeni Tennison - Thu, 31 Oct 2002 04:29:13 -0500 (EST) <=

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.