| Method from org.apache.cocoon.xml.DocumentHandlerWrapper Detail: |
public void characters(char[] ch,
int start,
int len) throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
this.documentHandler.characters(ch,start,len);
}
Receive notification of character data. |
public void enableLogging(Logger logger) {
if (this.log == null) {
this.log = logger;
}
}
Provide component with a logger. |
public void endDocument() throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
this.documentHandler.endDocument();
}
Receive notification of the end of a document. |
public void endElement(String uri,
String loc,
String raw) throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
NamespacesTable.Name name=this.namespaces.resolve(uri,raw,null,loc);
this.documentHandler.endElement(name.getQName());
}
Receive notification of the end of an element. |
public void endPrefixMapping(String prefix) throws SAXException {
if (namespaces.removeDeclaration(prefix)==null)
throw new SAXException("Namespace prefix \""+prefix+
"\" never declared");
}
End the scope of a prefix-URI mapping. |
public void ignorableWhitespace(char[] ch,
int start,
int len) throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
this.documentHandler.ignorableWhitespace(ch,start,len);
}
Receive notification of ignorable whitespace in element content. |
public void processingInstruction(String target,
String data) throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
this.documentHandler.processingInstruction(target,data);
}
Receive notification of a processing instruction. |
public void recycle() {
this.documentHandler = null;
}
Implementation of the recycle method |
public void setDocumentHandler(DocumentHandler document) throws IllegalStateException {
if (this.documentHandler!=null) throw new IllegalStateException();
this.documentHandler=document;
}
Set the DocumentHandler that will receive XML data. |
public void setDocumentLocator(Locator locator) {
if (this.documentHandler==null) return;
else this.documentHandler.setDocumentLocator(locator);
}
Receive an object for locating the origin of SAX document events. |
public void startDocument() throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
this.documentHandler.startDocument();
}
Receive notification of the beginning of a document. |
public void startElement(String uri,
String loc,
String raw,
Attributes a) throws SAXException {
if (this.documentHandler==null)
throw new SAXException("DocumentHandler not set");
NamespacesTable.Name name=this.namespaces.resolve(uri,raw,null,loc);
// Create the AttributeList
AttributeListImpl a2=new AttributeListImpl();
// Set the xmlns:...="..." attributes
if (this.undecl.size() >0) {
for (int x=0; x< this.undecl.size(); x++) {
NamespacesTable.Declaration dec=null;
dec=(NamespacesTable.Declaration)this.undecl.elementAt(x);
String aname="xmlns";
if (dec.getPrefix().length() >0) aname="xmlns:"+dec.getPrefix();
a2.addAttribute(aname,"CDATA",dec.getUri());
}
this.undecl.clear();
}
// Set the real attributes
for (int x=0; x< a.getLength(); x++) {
NamespacesTable.Name aname=namespaces.resolve(a.getURI(x),
a.getQName(x),
null,
a.getLocalName(x));
a2.addAttribute(aname.getQName(),a.getType(x),a.getValue(x));
}
// Call the document handler startElement() method.
this.documentHandler.startElement(name.getQName(),a2);
}
Receive notification of the beginning of an element. |
public void startPrefixMapping(String prefix,
String uri) throws SAXException {
this.undecl.addElement(this.namespaces.addDeclaration(prefix,uri));
}
Begin the scope of a prefix-URI Namespace mapping. |