coliver 2003/05/03 20:27:05
Modified: src/scratchpad/src/org/apache/cocoon/generation
JXFormsGenerator.java
Log:
Removed dead code
Revision Changes Path
1.12 +14 -24
cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXFormsGenerator.java
Index: JXFormsGenerator.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/scratchpad/src/org/apache/cocoon/generation/JXFormsGenerator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JXFormsGenerator.java 3 May 2003 21:22:59 -0000 1.11
+++ JXFormsGenerator.java 4 May 2003 03:27:05 -0000 1.12
@@ -35,7 +35,7 @@
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
@@ -92,8 +92,6 @@
private static final JXPathContextFactory
jxpathContextFactory = JXPathContextFactory.newInstance();
- private static final char[] EMPTY_CHARS = "".toCharArray();
-
private static final Attributes EMPTY_ATTRS = new AttributesImpl();
private static final Iterator EMPTY_ITER = new Iterator() {
@@ -107,17 +105,6 @@
}
};
- private static final Iterator NULL_ITER = new Iterator() {
- public boolean hasNext() {
- return true;
- }
- public Object next() {
- return null;
- }
- public void remove() {
- }
- };
-
final static String NS =
"http://apache.org/cocoon/jxforms/1.0";
@@ -1117,7 +1104,7 @@
static class TemplateConsumer extends Parser implements XMLConsumer {
- JXFormsGenerator template;
+ private JXFormsGenerator template;
public TemplateConsumer(SourceResolver resolver, Map objectModel,
String src, Parameters parameters)
@@ -1145,7 +1132,7 @@
}
}
- TemplateConsumer templateConsumer;
+ private TemplateConsumer templateConsumer;
public void recycle() {
super.recycle();
@@ -1169,9 +1156,9 @@
private static Map cache = new HashMap();
private XMLConsumer consumer;
private Source inputSource;
- WebContinuation kont;
- Object bean;
- Map objectModel;
+ private WebContinuation kont;
+ private Object bean;
+ private Map objectModel;
private XMLConsumer getConsumer() {
return consumer;
@@ -1325,7 +1312,7 @@
Iterator iter = null;
try {
if (nodeset == null) {
- iter = NULL_ITER;
+ iter = EMPTY_ITER;
} else {
iter =
nodeset.iteratePointers(rootContext,
@@ -1387,8 +1374,11 @@
}
JXPathContext localJXPathContext =
jxpathContextFactory.newContext(null, value);
- String path = contextPath;
- if (ref.string != null) {
+ String path;
+ if (ref.absolute) {
+ path = ref.string;
+ } else {
+ path = contextPath;
if (path != null) {
path += "/.";
} else {
@@ -1413,7 +1403,7 @@
Iterator iter = null;
try {
if (nodeset == null) {
- iter = NULL_ITER;
+ iter = EMPTY_ITER;
} else {
iter =
nodeset.iteratePointers(rootContext,
@@ -1545,7 +1535,7 @@
startElement.raw,
startElement.attributes);
if (newForm == null) {
- throw new SAXParseException("A form with id=\"" + id +
"\" does not exist",
+ throw new SAXParseException("Form not found: " + id,
ev.location,
null);
}