aspose file tools*
The moose likes Servlets and the fly likes compare xslt and JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "compare xslt and JSP?" Watch "compare xslt and JSP?" New topic
Author

compare xslt and JSP?

Paul Chen
Greenhorn

Joined: Feb 09, 2002
Posts: 8
There are two solutions to generate html:
xslt+xml generate html while jsp generate html.
Which solution is better? I guess jsp is running as servlet status once after tranlation, and xslt and xml will be translated in running period which take overload. So that the second solution has better performance than the first one.
Am I missing something? Very appreciate on correct me.
Thanks
Doug Wang
Ranch Hand

Joined: Oct 05, 2001
Posts: 445
Hi,
Good question. Here is already a great discussion on this topic. Go to check it.
One more question, your name doesnt agree with the name policy. To be a serious rancher here, read it carefully and reregister your name.
[ March 03, 2002: Message edited by: Doug Wang ]

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
One solution is Cocoon (xml.apache.org) which combines xslt + xml + a jsp-like xsp language.
Although xslt does a lot of extra work compared to compiled jsp, there is a project called XSLTC to turn XSL into compiled java code. Supposedly a great speedup is possible.
Bill (currently working on a book about Cocoon)
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Bill,

That's really interesting news about XSLTC.

I wonder how it will compare with XMLC from Enhydra?

http://xmlc.enhydra.org/
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
I found an article on XML performance at
http://developer.java.sun.com/developer/technicalArticles/xml/JavaTechandXML_part2/
That shows processing times for various approaches to XML - DOM vrs SAX vrs XSLT and appears to include something on XSLTC. Incidently, Sun started the development of XSLTC and then gave the project to the Apache organization so it is open source!!
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compare xslt and JSP?