You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by js...@apache.org on 2001/08/17 10:19:55 UTC
cvs commit: jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/xpath StylesheetTag.java
jstrachan 01/08/17 01:19:55
Modified: xtags/src/org/apache/taglibs/xtags/xpath StylesheetTag.java
Added: xtags/examples/web/test test_stylesheet2.jsp
Log:
Added stylesheet patch and extra test case
Revision Changes Path
1.1 jakarta-taglibs/xtags/examples/web/test/test_stylesheet2.jsp
Index: test_stylesheet2.jsp
===================================================================
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ taglib uri="http://jakarta.apache.org/taglibs/xtags-1.0"
prefix="xtags" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test <xtags:stylesheet></title>
<link rel="stylesheet" href="../examples.css" type="text/css">
</head>
<body>
<h1>Test <xtags:stylesheet></h1>
<xtags:parse>
<simpleDocument author="James Elson">
<title>Bwahahahah!</title>
<synopsis>Twas a dark, rainy night...</synopsis>
<para>dfjsdfjsdf</para>
<para>fdsfsdfhdsff gyuf uysgf ds</para>
</simpleDocument>
</xtags:parse>
<xtags:stylesheet>
<xtags:template match="/">
<xtags:applyTemplates/>
</xtags:template>
<xtags:template match="title">
<h2><xtags:applyTemplates/></h2>
</xtags:template>
<xtags:template match="para">
<p><xtags:applyTemplates/></p>
</xtags:template>
<xtags:template match="*">
<small><xtags:applyTemplates/></small>
</xtags:template>
</xtags:stylesheet>
<hr>
<xtags:stylesheet>
<xtags:template match="/simpleDocument">
<h2>Book review</h2>
<b>Title:</b> <xtags:applyTemplates select="title"/><br />
<b>Author:</b> <xtags:applyTemplates select="@author"/><br />
<b>Summary:</b> <em><xtags:applyTemplates select="synopsis"/></em><br />
</xtags:template>
<xtags:template match="title">
<span style="color:blue"><xtags:applyTemplates/></span>
</xtags:template>
<xtags:template match="para">
<p><xtags:applyTemplates/></p>
</xtags:template>
</xtags:stylesheet>
</body>
</html>
1.3 +1 -1 jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/xpath/StylesheetTag.java
Index: StylesheetTag.java
===================================================================
RCS file: /home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/xpath/StylesheetTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- StylesheetTag.java 2001/08/08 15:39:04 1.2
+++ StylesheetTag.java 2001/08/17 08:19:55 1.3
@@ -249,7 +249,7 @@
}
void reset() {
- stylesheet = null;
+ stylesheet.clear();
openResultList = null;
currentMatch = null;
templateResultLists.clear();