You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/07/22 12:50:02 UTC
cvs commit: jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl example2.jelly
jstrachan 2002/07/22 03:50:02
Modified: jelly/src/test/org/apache/commons/jelly/jsl example2.jelly
Log:
added an example of using the <jsl:copy> tag
Revision Changes Path
1.4 +20 -3 jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/example2.jelly
Index: example2.jelly
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/jsl/example2.jelly,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- example2.jelly 18 Jun 2002 12:30:10 -0000 1.3
+++ example2.jelly 22 Jul 2002 10:50:02 -0000 1.4
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl">
+<j:jelly trim="false" xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl">
<html>
<body>
@@ -45,7 +45,7 @@
<h1>Output of stylesheet2</h1>
-<jsl:stylesheet source="${doc}">
+<jsl:stylesheet select="$doc">
<jsl:template match="/">
<jsl:applyTemplates/>
@@ -71,7 +71,7 @@
<h1>Output of stylesheet3</h1>
-<jsl:stylesheet source="${doc}">
+<jsl:stylesheet select="$doc">
<jsl:template match="/simpleDocument">
<h2>Book review</h2>
@@ -89,6 +89,23 @@
<p><jsl:applyTemplates/></p>
</jsl:template>
+</jsl:stylesheet>
+
+<h1>Output of stylesheet4</h1>
+
+
+<jsl:stylesheet select="$doc">
+
+ <jsl:template match="/simpleDocument">
+ <h2>Book review</h2>
+ <jsl:applyTemplates/>
+ </jsl:template>
+
+ <jsl:template match="*">
+ <jsl:copy>
+ <jsl:applyTemplates/>
+ </jsl:copy>
+ </jsl:template>
</jsl:stylesheet>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>