Glen Jansen

Greenhorn
+ Follow
since Apr 07, 2001
Merit badge: grant badges
For More
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 Glen Jansen

Is this what you were looking for? http://www.cs.orst.edu/~cs582/
(scroll down to the Calendar of Topics section. Each chapter has its own set of slides.)
I found this at: http://www.intelinfo.com/newly_researched_free_training/Object_Oriented.html
There are a bunch of OO links at the later site too.
Glen.
You can read about Sun's implementation of the parsers at:
http://java.sun.com/xml/xml_jaxp.html
(This is the Java JAXP API that you can code against)
http://www.xml.com/pub/rg/94
(A big list of parsers for various platforms)
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
I posted an example of one way to do this in a previous thread:
See my posting at: http://www.javaranch.com/ubb/Forum31/HTML/001363.html
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
Have you thought about using an XSL transformation to convert the DOM object to a string. I posted a way to do this in a previous thread: http://www.javaranch.com/ubb/Forum31/HTML/001363.html
Basically, the XSL stylesheet is designed to output the text only. Then you can design a method that when passed a stylesheet and a document, it returns the result as a string.
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
This is timly. Yesterday a co-worker installed Netscape 6.1 and I immediately wanted to know about it's XML support. When she opened raw XML documents, they appeared as text without tags. When she 'Viewed the Source', the XML was colour coded and marked up. On the down side, it was not as interactive as IE5's implementation.
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
I am working towards my XML Certification as well. Here is some information to overflow your 'input stack'.
Links: http://javaranch.com/gramps/XMLLinks.jsp (Tons of links)
Books:
If memory serves me, Ajith used "XML Bible" to study for the exam. In addition he recommended reading the DOM spec from http://www.w3.org/DOM/
Additionally why not check out this week's give away book, "Professional Java XML". Ajith rated it 10/10 as 'The most comprehensive XML guide I have ever read'. I am unaware of any specific 'Study guide for the IBM XML Certification exam' type book. Maybe someone can write one...
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
I am working towards my XML Certification as well. Here is some information to overflow your 'input stack'.
Links: http://javaranch.com/gramps/XMLLinks.jsp (Tons of links)
Books:
If memory serves me, Ajith used "XML Bible" to study for the exam. In addition he recommended reading the DOM spec from http://www.w3.org/DOM/
Additionally why not check out this week's give away book, "Professional Java XML". Ajith rated it 10/10 as 'The most comprehensive XML guide I have ever read'. I am unaware of any specific 'Study guide for the IBM XML Certification exam' type book. Maybe someone can write one...
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
I had a similar situation where I needed to generate a text file from the data inside an XML document. The solution implemented used XSLT to perform the transformation from XML to a CSV. This is returned as a String object which can be written to a file. You can also modify the method below to output directly to a file.
Here are the pieces:
XSLT snippets:
<xsl utput method="text"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">


<xsl:for-each select="LineList/Lines">
<xsl:apply-templates select="*"/>
</xsl:for-each>

</xsl:template>
<xsl:template match="*">
<xsl:choose>
<!-- No comma on the last element -->
<xsl:when test="position()=last()"><xsl:value-of select="."/></xsl:call-template></xsl:when>
<!-- Comma required. Not the last element -->
<xsl therwise><xsl:value-of select="."/>,</xsl therwise>
</xsl:choose>
</xsl:template>
Java Snippet:
// Method to convert an XML document object to an String
private static String transformXMLToString( String styleSheet, Document orig ) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();

try {
Transformer transformer = factory.newTransformer( new StreamSource( styleSheet ) );
StreamResult result = new StreamResult( baos );
transformer.transform(new DOMSource( orig ), result);
}catch(TransformerConfigurationException e ){
System.out.println("TransformerConfigurationException: " + e.getMessage() );
}catch(TransformerException e){
System.out.println("TransformerException: " + e.getMessage() );
}

return baos.toString();
}
Pass the XSL stylesheet and the document containing the XML object to the method and a String will be returned which contains the CSV. Note: The above snippets are untested as I had to modify them for presentation in the forums. The ideas are sound and should work for you. The neat part is this is fast and reusable with different stylesheets. For example, let's say you only wanted the first 10 elements in the XML document. You can design a new stylesheet and reuse the existing method.
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
Why not include some information on the separation of 'data' and 'presentation'. You could then include topics such as CSS and XSLT. You can compare them and then give simple demonstrations of their use.
Other ideas:
Migrating HTML to XHTML.
Introduction of the DOM and its relationship to XML.
XML Tools (Visual and non-visual).
Demonstrations of real world solutions.
Hope this helps.
Glen Jansen
Java/XML Cert in Training.
I found the answer to my own question. The product I discovered is called XSLerator and can be found on the IBM AlpaWorks site.
It is a java tool that allows you to create an XSL document based on an input and resultant XML document. The implementation is very good. I have tested the auto-generated XSL sheet in my Java application and it worked flawlessly.
Enjoy.
Glen.
Does anyone know of an application that will create an XSL stylesheet to convert from one DTD to another DTD?
On IBM Alphaworks site http://www.alphaworks.ibm.com there is a program called XML IDE and it works with simple DTD's. If I try complicated DTD's the XSL stylesheet has broken tags and flawed XSL syntax.
Has anyone seen an application other than the one mentioned that can do this?
Thanks.
Glen.
Hi All,
I found the answer to my problem. In Tomcat 3.2.1 the CLASSPATH is built dynamically based upon the files in the $TOMCAT_HOME$\lib\ directory. In order to get this to work I have to rename the xerces_1_2.jar file to aaaaxerces_1_2.jar in addition to having named xml.jar and parser.jar to zzzzxml.jar and zzzzparser.jar respectively.
Hopefully this will help anyone who encounters this problem.
Glen.
23 years ago
Hi All,
I have been trying to install Cocoon 1.8.2 and integrate it with Tomcat 3.2.1 and have troubles.
I performed the same install process under WinNT and 2000 yielding the same results.
When I start Tomcat and then attempt to view a sample xml document, the following error is produced:
<Start Error>
Publishing Engine could not be initialized.
java.lang.RuntimeException: Exception when creating "org.apache.cocoon.processor.xsp.XSPProcessor" :
java.lang.NoSuchMethodError: See http://xml.apache.org/cocoon/faqs.html#faq-normalize
... java error dump.
</Start Error>
Tomcat JSP and Servlets function properly. I have read the install FAQ for cocoon and have taken the suggestion of renaming parser.jar and xml.jar to zparser.jar and zxml.jar respectively. This had not changed the error (after stopping and starting server). According to the install FAQ, this is the most common error installing Cocoon, yet so far my searches have yet to resolve the issue.
Has anyone encountered the above error? Has anyone corrected the above error and if so, can you please share the answer.
Thanks for you effort.
Glen.
23 years ago