jeremy crosbie

Greenhorn
+ Follow
since Jun 20, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jeremy crosbie

Robert,
First of all, I don't know anything about ServletExec so I can't help you there. However there are instructions for installing Cocoon using ServletExec on the Cocoon site. It assumes that you are running ServletExec in-process with IIS so it may be necessary to tweak your configuration. In looking at what you describe, you may not have placed Cocoon in the right directory. According to the instructions on the Cocoon2 site:
Copy cocoon.war into C:\Program Files\New Atlanta\ServletExec ISAPI\webapps\default, creating the directory default if required.
If you haven't already, go to http://xml.apache.org/cocoon2/install.html for installation instructions.
------------------
Jeremy Crosbie
Co-Author of Professional Java XML
This is not a very good XML document for representing a number of books. You root element <book> makes it seem like it is trying to represent one book when in fact it is being used to represent many. XML parsing relies on parent/child relationships. In here there is no inherent relationship between a book and its publisher because the <book> element contains many publishers.
Try a document like this:
<books>
<book>
<title>Professional Java Programming</title>
<author>Brett Spell</author>
...
</book>
<book>
<title>Java2</title>
<author>Lemay</author>
</book>
</books>

Originally posted by Rob Bass:
Gievn the below XML File:
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "bookgram.dtd">
<book>
<title>Professional Java Programming</title>
<author>Brett Spell</author>
<publisher>Wrox Press</publisher>
<tableOfContents showPageNumbers="Yes">
<tocEntry>Printing</tocEntry>
<tocEntry>Cut and Paste</tocEntry>
<tocEntry>Drag and Drop</tocEntry>
</tableOfContents>
<title>Java 2</title>
<author>Lemay</author>
<publisher>SAMS</publisher>
<tableOfContents showPageNumbers="Yes">
<tocEntry>Printing</tocEntry>
<tocEntry>Cut and Paste</tocEntry>
<tocEntry>Drag and Drop</tocEntry>
</tableOfContents>
</book>

What Xpath statement would I use to get the publisher of the Java 2 book?



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Can you be more descriptive?
- What platform(jdk, OS, servlet container) are you using?
- Have you gone through the installation guides available on the Cocoon site?
- what error messages are you seeing?

------------------
Jeremy Crosbie
Co-Author of Professional Java XML
One option you have is to use WDDX which is an XML format for transferring objects in between servers that may be on different platforms. Go to www.openwddx.org to download the toolkit as well as information on using it.
What you would do is run the query on your Weblogic machine and save the results as a WDDX record set. You could then pass this to ColdFusion (have CF make a CFHTTP request or use CFOBJECT) which could then parse the result set and place it into the desired database.
------------------
Jeremy Crosbie
Co-Author of Professional Java XML
For starters go to http://xml.apache.org/cocoon2 and download the code. You will also need to run a Servlet container (like Tomcat) which you can download from http://jakarta.apache.org. Instructions for setting up Cocoon in Tomcat (as well as other popular servlet containers) is available at the Apache site.
Unfortunately materials for learning Cocoon2 are few. In my book I covered Cocoon1 but you really want to start using Cocoon2. One of the Cocoon contributors has started writing a document on developing using Cocoon2. You can get what he has started from http://www.mail-archive.com/cocoon-dev%40xml.apache.org/msg03583.html .

Originally posted by Robert, Assaad:
How do you get started with Cocoon. What do you download and how do you set it up. Another question, is there and good materials out there. Do you have samples of how it works or maybe know where to find it. I need a lot of information and anything will do. Just started looking into it. Thanks.



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Thank you all for having me. I hope I have been helpful in some way in shedding light on some of the questions surrounding XML and its role in Java.
------------------
Jeremy Crosbie
Co-Author of Professional Java XML
I don't remember the chapter numbers off hand (and don't have a copy of the book handy) but I wrote the SAX chapter, the Socket I/O chapter, and the Server-Side Presentation chapters. I pretty much wrote them on my own with some guidance in that last chapter.
The SAX chapter assumes no knowledge of SAX. It takes you through the entire API soup to nuts and describe each part in detail. It centers around JAXP which is becoming the de facto XML parsing framework. Another part of this chapter is that is shows you how to take a non-JAXP compliant parser and make it into one. For this I chose Aelfred.
The Socket I/O chapter takes you through dealing with XML over a network. TCP/IP is explained in basic detail but design patterns are discussed that make reading XML over a network simpler.
The Server-Side Presentation chapter talks about generating presentation markup using server-side technologies. I talk about Cocoon1 and give examples as to its use. This was the most exciting chapter for me because it deals with a very real problem: supporting display of one's content on many different browsers/devices. Coming from a background in the Wireless Internet this is a BIG problem: so many browsers (and more everyday) to support how can I do it with one codebase?
I hope that you find the book informative and most of all helpful.

Originally posted by Stanley Tan:
Jeremy Crosbie,
With so many authors, were you assigned to write certain chapters or simply contribute to the overall progress? If you wrote separate chapters, what chapters did you write?



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
If you are attempting to transport an image using XML there are a few approaches you can take:
- Base64 encode the image and place it directly in the XML document. This makes for a HUGE XML file, though.
- Use SVG to render your image. SVG is one of those really cool technologies for XML. It is a vector graphics (hence the name 'Scalable Vector Graphics') format that uses XML to describe the image. Apache has a toolkit called Batik for formatting and manipulating images using SVG.


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Thank you for the kind words.
This was my first effort at publishing and I must say it was a lot of fun. The old saying "the more you know the more you realize what you don't know" was so true during the entire process. My approach is to assume nothing. Even though it is a "Professional" book you wouldn't be writing it if your reader already knew everything. I like to be deliberate and detailed when teaching something new. I hope that comes across when people read it.

Originally posted by ajay sagar:
Hi jeremy
nice to have you here
I was going through your book given to me by a colleague and
was facinated by the simplicity of your writing
keep up the good work



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Cocoon2 is in beta 2 right now. In all honesty, I have no problems with beta software released by Apache as the quality of work they put out is excellent. My "day job" is at a wireless company where we have to support any number of wireless devices. We are looking into using Cocoon2 in order to keep the development for new devices to a minimum using this framework.
As far as who is using it, not too many people are officially using Cocoon2. A list is kept of those who proudly boast using at http://xml.apache.org/cocoon2/livesites.html . A lot of Cocoon1 users but not too many Cocoon2 users, probably because of the beta stigma.
Cocoon1 is excellent for serving up static data as that was what it was originally designed to do. A lot was tried to make Cocoon work for a more interactive environment but when looking at the overall design the mechanisms for doing so seem like a way afterthought. Cocoon2 is a completely new design and has its sights set much higher. I think it will enjoy great success in all types of environments.

Originally posted by Frank Daly:
Many thanks for your reply Jeremy.
I'm interested really in finding out if anyone is using Cocoon 2 and how they're getting on with it. I also want to know if some momentum has been lost on the project. Brett McLaughlin said to look out for Cocoon 2 in late 2000 but at this stage there is only a beta version available.
Jason Hunter in his book Java Servlet Programming reckons that at this time Cocoon is not ideal for interactive web sites. Do you think the new version will change this?
frank



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Simply put, Cocoon is a publishing framework, meaning it provides a way of publishing content in a manner free from how it is to be presented. How the content is presented is determine dynamically.
You can look at Cocoon and Struts in the same light as they are both frameworks for building web sites. However, Cocoon builds websites through the use of XML and its related technology where Struts is designed to be used for those applications using JSP and Servlets. This is really where I believe the similarities end.

Originally posted by Stanley Tan:
Sir Jeremy Crosbie,
While you are here at the Javaranch, I'll be trying to soak up as much information as I can. What is Cocoon? I have heard of it before (can't remember where) and the way you describe it, it sounds like the MVC Struts framework. Is it something similar to that?
Thank you!



------------------
Jeremy Crosbie
Co-Author of Professional Java XML
You may have more than one JRE installed. This will definitely be true if you installed the plugin. Check the \Program Files\Javasoft\JRE directory. If one exists you need to place the jar files under each JRE you have installed in the <java version>\ext directory.


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Hi, Frank!
One of the chapters I wrote in the book was on server-side presentation in which I used Cocoon 1. I find this to be the most promising of XML technologies available.
Cocoon2 is very different from Cocoon1. Where the goal of Cocoon1 was to separate content from how it is presented Cocoon2 desires the separation of content, logic, and presentation. The architecture revolves around the concept of a sitemap which defines all aspects of the site. There is a bit of a learning curve but going through the example site supplied with the Cocoon2 download and looking at the code helps it to all make sense.
Are there particular questions you have about Cocoon2?


------------------
Jeremy Crosbie
Co-Author of Professional Java XML
JAXP, the "Java API for XML Parsing" provides a framework to both SAX and DOM XML parsers. Xerces provides an implementation of a SAX and DOM parser.
JAXP on its own does nothing. What is provides is a neutral manner in which to change what parser you are using. For example, let's say you are using Xerces on a project that parses an XML document to determine what stock is on hand at a retail store. Doing so requires references to the org.apache.xerces.parsers.SAXParser class. Let's say that you want to move this parsing onto a small mobile device like a cell phone. You can't use Xerces because it has too large a memory footprint. Now you have to go through all of your code and change all calls to Xerces to whatever other parser you need to use. If you used a framework like JAXP all that you would need to to is change a system property and the new parser would be used instead of Xerces.
The application you have in mind sounds like a perfect paradigm for using SAX. Based on a particular XML element, you want to perform an action. You would define your ContentHandler to intercept <customer-name> elements. You would then wait for a <customer-action> element and then fire the appropriate action on the database.
In the "Professional Java XML" book there is an example program that uses SAX in a similiar manner. The State pattern is used in the case where how you handle events is context-sensitive (in this case performing an action based on the user name read previously).

------------------
Jeremy Crosbie
Co-Author of Professional Java XML
Coincidentally, one of my hobbies is weighlifting (powerlifting, not bodybuilding). I don't look quite like that, though. I guess the camera helps!

Originally posted by Mapraputa Is:
Thomas!
I could only hope that Jeremy is too busy answering questions to find this thread... And now what?



------------------
Jeremy Crosbie
Co-Author of Professional Java XML