Hey Margaret,
        Thanks for the response. I was, however, just wondering about
something that you kind of touched on. You mentioned that.. "However, you
would not really want to generate your XSL dynamically because you want the
results to be consistent". Actually that is exactly what I want to be
dynamic :) I was thinking of having a XSL factory class that would show
different results/displays depending on what XML data was being processed.
That would eliminate the need to have physical XSL files for my deployment
as well as give me the option of loading things dynamically so that if
someone decides to change a display.. i can make changes via some type of
control tool (maybe via database settings) without having to edit physical
files and redeploy the application.
        Does that make sense? I just got back from lunch and until the blood
comes back from my stomach to my head.. I might be a bit incoherent. :)
-Tim

-----Original Message-----
From: Margaret Fisk [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 11:44 AM
To: [EMAIL PROTECTED]
Subject: Re: XML and Java


Just a comment. If I'm reading you correctly, there is some confusion about
xml and xsl.

Xml is the data that is in the tree structure. Yes, this is often created
dynamically by extracting data from a source (often a database) and
enclosing it
in the hierarchical XML tags.

XSL is the style sheet which is used to transform the XML into an HTML page.
This can be
called in an HTML page I believe so you do not have to use JSP. However, you
would not
really want to generate your XSL dynamically because you want the results to
be consistent,
I would think, and just the data to be dynamic. If you have multiple
displays that you want
to enable, probably using several XSL files that are called based on a logic
switch would work.

Alternatively, you can have the XML data drive the display, for example,
within the XSL you can
state that if there are more than 3 entries within a tag, you want to
display "..." instead of
crowding the page with too much data. And then provide a link to another
page that would provide
the details just for that tag.

Hope this helps,
Margaret

-----Original Message-----
From: Colin Marshall [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 8:33 AM
To: [EMAIL PROTECTED]
Subject: Re: XML and Java


Tim

I'm not too hot on xml with java, but in msxml, files are just the storage
mechanism. To use xml (or xsl) the file is read in to create a tree and it
is the xml tree which you transform with the xsl tree. Therefore you could
create the xsl tree dynamically and transform your node with this.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Chen, Gin
Sent: 09 November 2001 16:28
To: [EMAIL PROTECTED]
Subject: XML and Java

Hi all,
        I read an interesting article on using XML instead of JSPs for
presentation layer.
http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-xmlj2ee_p.html
        While the article was very interesting, I am no java/xml expert.
Especially when it comes to using XSL. My question for everyone is:
        I want to use the XML presentation logic but I also want to have a
Java Class dynamically create XSL for the XMLs to use.
        1) Is that possible?
        2) How do we reference an XSL file that does not have a physical
existence?
Thanks.
-Tim

===========================================================================
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

===========================================================================
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