dleslie 00/12/18 04:57:06
Modified: java/samples/AppletXMLtoHTML client.html rabbitwhorn.jpg
README.html
Added: java/samples/AppletXMLtoHTML get-todo-list.html
Log:
Applets are set to look for xalan.jar and xerces.jar in the bin directory.
Revision Changes Path
1.3 +14 -15 xml-xalan/java/samples/AppletXMLtoHTML/client.html
Index: client.html
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/AppletXMLtoHTML/client.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- client.html 2000/10/12 13:41:52 1.2
+++ client.html 2000/12/18 12:57:03 1.3
@@ -5,11 +5,10 @@
</head>
<script language="JavaScript">
- var target="";
-
- function writeSource()
+
+ function writeSource(sourceString)
{
- var sourceString=document.xslControl.getSourceTreeAsText();
+
var escString=document.xslControl.escapeString(sourceString);
var title="XML Source Doc";
var doc=top.frames[1].document;
@@ -21,9 +20,8 @@
doc.close();
}
- function writeStylesheet()
+ function writeStylesheet(styleString)
{
- var styleString=document.xslControl.getStyleTreeAsText();
var escString=document.xslControl.escapeString(styleString);
var title="XSL Stylesheet";
var doc=top.frames[2].document;
@@ -35,7 +33,7 @@
doc.close();
}
- function writeTarget()
+ function writeTarget(targetString)
{
var doc=top.frames[3].document;
doc.open();
@@ -43,11 +41,11 @@
doc.write("<h3>" + title + "</h3>");
if (document.xmlTransform.displayMode[0].checked) //display HTML
{
- doc.write(target);
+ doc.write(targetString);
}
else // display source
{
- var escString=document.xslControl.escapeString(target);
+ var escString=document.xslControl.escapeString(targetString);
doc.write("<PRE>");
doc.write(escString);
doc.write("</PRE>");
@@ -72,11 +70,12 @@
clearFrames();
var
xmlSource=document.xmlTransform.xmlSourceList.options[document.xmlTransform.xmlSourceList.selectedIndex].value;
document.xslControl.setDocumentURL(xmlSource);
- target=document.xslControl.getHtmlText();
-// alert("Output: " + target);
- writeSource();
- writeStylesheet();
- writeTarget();
+ var sourceString=document.xslControl.getSourceTreeAsText();
+ var styleString=document.xslControl.getStyleTreeAsText();
+ var targetString=document.xslControl.getHtmlText();
+ writeSource(sourceString);
+ writeStylesheet(styleString);
+ writeTarget(targetString);
}
</script>
<body onLoad="clearFrames();" bgcolor="#808080" text="#ffffff">
@@ -112,7 +111,7 @@
<applet
name="xslControl"
code="org.apache.xalan.client.XSLTProcessorApplet.class"
- archive="xalan.jar,xerces.jar"
+ archive="../../bin/xalan.jar,../../bin/xerces.jar"
height="0"
width"0">
<param name="documentURL" value="xalanApplets.xml"/> <!--default
setting-->
1.5 +10 -1 xml-xalan/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg
<<Binary file>>
1.3 +7 -6 xml-xalan/java/samples/AppletXMLtoHTML/README.html
Index: README.html
===================================================================
RCS file: /home/cvs/xml-xalan/java/samples/AppletXMLtoHTML/README.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.html 2000/10/12 13:50:39 1.2
+++ README.html 2000/12/18 12:57:04 1.3
@@ -2,20 +2,21 @@
<html>
<head>
- <title></title>Xalan Sample Applet</title>
+ <title></title>Xalan Sample Applets</title>
</head>
<body bgcolor="#808080" text="#ffffff">
<table>
<tr>
<td><img border="0" hspace="0" vspace="0" align="left"
src="rabbitwhorn.jpg"></td>
- <td><h2> Running the Xalan sample applet</h2></td>
+ <td><h2> Running the Xalan sample applets</h2></td>
</tr>
</table>
<hr>
- <p>This applet transforms XML into HTML. It looks for xalan.jar and
xerces.jar in the applet directory.
- Either copy xalan.jar and xerces.jar to samples/AppletXMLtoHTML, or adjust
the applet archive setting in
- client.html.</p>
-
+ <ul>
+ <li>AppletXMLtoHTML.html transforms XML into HTML, and displays the XML
document and XSL stylesheet as well as the HTML transformation
result.<br/><br/></li>
+ <li>get-todo-list.html uses todo.xsl to transform todo.xml and display the
transformation result. The XML source is a snapshot of todo.xml in the
xml-xalan CVS repository, an ongoing list of tasks and task completions for the
Xalan-Java 2 development project.</li>
+ <p>Both applets look for xalan.jar and xerces.jar in the bin directory. If
the JAR files are elsewhere, you must move them or adjust the applet archive
setting in client.html and get-todo-list.html.</p>
+</ul>
<p>For information about the samples (what they illustrate and how to run
them), see <a href="../../docs/samples.html">Samples</a>.</p>
1.1 xml-xalan/java/samples/AppletXMLtoHTML/get-todo-list.html
Index: get-todo-list.html
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xalan-Java 2 "to do" list</title>
</head>
<script language="JavaScript">
function transform()
{
var todolist = xslControl.getHtmlText();
document.write(todolist);
}
</script>
<body onLoad="transform();">
<applet
name="xslControl"
code="org.apache.xalan.client.XSLTProcessorApplet.class"
archive="../../bin/xalan.jar,../../bin/xerces.jar"
height="0"
width="0">
<param name="documentURL" value="../../todo.xml"/>
<param name="styleURL" value="../../todo.xsl"/>
</applet>
</body>
</html>