Chen,

I have not yet worked with XSLT style sheets, though I will be experimenting
with them in a few weeks.  But I have worked with XML tables.  I'm not an
expert by any means, but this is what I have discovered in working with XML
tables.  Please note that I am using the javax.xml.parsers library, and the
org.w3c.dom.Document, Element, and DOMException libraries.  There are many
other third party xml parsers out there, such as Xerces and JDOM, so you may
want to find out if any of the other libraries have performance
advantages/disadvantages that would work for your specific needs.

If your XML file is going to be pretty much static (i.e. you're not going to
need to modify the xml data often), AND your tree structure for your data is
well thought out, AND your XML file is not too large, then XML could work
for your needs.  If you do end up with an extremely large XML data file you
may want to look into more powerful parsers such as Xerces and/or rethink
your options.  "Walking the DOM" to get to a specific piece of information
in your XML file can take a lot of time, depending on the size of your XML
file and your tree structure.  To my knowledge, there is no way to "query"
an XML file to return the exact piece of info you are looking for, but again
I am not an expert.  If your data is going to be dynamic (i.e. you will need
to create the XML file during run time), I would not use XML, unless the
data I was going to write to an XML file was relatively small and the tree
structure simplistic.

One last thing, give yourself enough time to experiment with XML and the
different parsers out there.  If you've not worked with XML before, and you
are in a rush to meet a deadline, I would stick with option 1.

Celeste
-----Original Message-----
From: Chen, Gin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 1:16 PM
To: [EMAIL PROTECTED]
Subject: XSL versus JSP


Hey all,
        Sorry in advance for this long post.
        Here's a question for you all that are also familiar with doing
things using XML/XSL.
        I have a page that I'm implementing that has a select box. Depending
on the value that u select in the select box. The remaining input fields on
the page will change. I know that I could have done this with a javascript
(playing with innerhtml or something like) but there is way to much data and
it all comes from the server side. So instead.. I'm debating on 2 different
models.
        1) Everytime the select box changes values.. it posts back to a
Servlet and the Servlet gets the info that the page will need to update
before sending it back to the page.
        Works great (most of us probably have done it before). but i'm
concerned that this might create more network traffic than necessary.
        2) Implement that whole thing using an XML page that has ALL the
information and an XSL stylesheet that will show the select box and only the
information pertaining to the value in the select box. When a user selects a
new value.. javascript code will get kicked off to update the XSL with new
parameters and refresh the page.
        I dont know what the implications of that approach might be..
although earlier this week someone on this post mentioned that XSLT
translations killed performance on their server.
        Which approach do you think is better? Is there another approach
that I should consider?
-Tim

-------------------------------------
Gin-Ting Chen
[EMAIL PROTECTED]
727-738-3000 x6549
Sun Certified Programmer
Sun Certified Web Component Developer
BEA Certified Developer

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to