Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Ajax ISBN: 978-0-471-77778-6
This is the forum to discuss the Wrox book Professional Ajax by Nicholas C. Zakas, Jeremy McPeak, Joe Fawcett; ISBN: 9780471777786
Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2006, 11:04 AM
Authorized User
 
Join Date: Nov 2006
Location: chennai, tamilnadu, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ajax with xsl

Using Ajax, how can I present the xml data using xslt, returned by the server to the client.

My servlet code:

void doGet(HttpServletRequest req, HttpServletResponse res){

res.setContentType("text/xml");
res.setHeader("Cache-Control", "no-cache");
PrintWriter writer = response.getWriter();
StringBuffer sb=new StringBuffer();

sb.append("<?xml version='1.0' encoding='ISO-8859-1'?>");
sb.append("<?xml-stylesheet type='text/xsl' href='EmployeeDetailList.xsl'?>");

sb.append("<Employee>");
sb.append("<Id>E100<Id>");
sb.append("<Name>SURESHKUMAR</Name>");
sb.append("<Job_Name>DEVELOPER</Job_Name>");
sb.append("</Employee>");

writer.println(sb); //send the xml response to client.
writer.close();
}

Instead of using this method responseXML.getElementsByTagName() in the javascript, to access the xml data, I want to present the data using xsl to the client.

I am not ambitious, as I require this concept for my project.

Thanks,

Suresh.

__________________
Cheers [-:]

Suresh!
 
Old November 18th, 2006, 02:49 AM
Authorized User
 
Join Date: Nov 2006
Location: chennai, tamilnadu, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No solution?????????????

 
Old November 19th, 2006, 01:02 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

The transformation of XML using XSLT and JavaScript is described in Chapter 4.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old November 20th, 2006, 12:46 AM
Authorized User
 
Join Date: Nov 2006
Location: chennai, tamilnadu, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry! "Chapter 4" of which tutorial or book?

 
Old November 20th, 2006, 01:58 AM
nzakas's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

This is the forum for questions about the book Professional Ajax. Chapter 4 covers XML, XPath, and XSLT. If you don't have questions about the book specifically, then you should post your question in the JavaScript forum.

Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/
 
Old November 20th, 2006, 04:05 AM
Authorized User
 
Join Date: Nov 2006
Location: chennai, tamilnadu, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks!!







Similar Threads
Thread Thread Starter Forum Replies Last Post
[Announce] LGPL Java, XSL and Ajax based Framework erkan_cengiz XSLT 0 March 27th, 2008 10:27 AM
Recommend an AJAX IDE - JoyiStar AJAX WebShop. kingstar Ajax 4 December 15th, 2006 05:12 AM
New Ajax article: Creating an Ajax Search W jminatel BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 May 11th, 2006 03:45 PM
new Ajax article: Creating an Ajax Search Widget jminatel Ajax 0 May 11th, 2006 02:50 PM
XSL Transform with xsl string NOT xsl file skin XSLT 0 June 16th, 2003 07:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.