1 16 package org.apache.cocoon.taglib.jxpath.core; 17 18 import org.apache.cocoon.taglib.VarXMLProducerTagSupport; 19 20 import org.xml.sax.Attributes ; 21 import org.xml.sax.SAXException ; 22 23 27 public class OutTag extends VarXMLProducerTagSupport { 28 private String value; 29 30 33 public int doStartTag(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { 34 if (value != null) { 35 Object retValue = getVariable(value); 37 if (retValue != null) { 38 if (var != null) { 39 setVariable(var, retValue); 40 } else { 43 char[] charArray = retValue.toString().toCharArray(); 44 this.xmlConsumer.characters(charArray, 0, charArray.length); 45 } 46 } 47 } 48 return EVAL_BODY; 49 } 50 51 public void setValue(String value) { 52 this.value = value; 53 } 54 55 58 public void recycle() { 59 this.value = null; 60 super.recycle(); 61 } 62 } 63 | Popular Tags |