Methods Summary |
---|
public void | characters(char[] buf, int offset, int len)
try {
fCore.characters(new XMLString(buf,offset,len),null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
private com.sun.org.apache.xerces.internal.xni.XMLAttributes | createAttributes(org.xml.sax.Attributes att)Creates an XMLAttributes object.
xa.removeAllAttributes();
int len = att.getLength();
for (int i = 0; i < len; i++)
xa.addAttribute(
createQName(att.getURI(i), att.getLocalName(i), att.getQName(i)),
att.getType(i),
att.getValue(i));
return xa;
|
private com.sun.org.apache.xerces.internal.xni.QName | createQName(java.lang.String uri, java.lang.String local, java.lang.String raw)Creates a QName object.
int idx = raw.indexOf(':");
if( local.length()==0 ) {
// if naemspace processing is turned off, local could be "".
// in that case, treat everything to be in the no namespace.
uri = "";
if(idx<0)
local = raw;
else
local = raw.substring(idx+1);
}
String prefix;
if (idx < 0)
prefix = null;
else
prefix = raw.substring(0, idx);
if (uri != null && uri.length() == 0)
uri = null; // XNI uses null whereas SAX uses the empty string
return new QName(symbolize(prefix), symbolize(local), symbolize(raw), symbolize(uri));
|
private com.sun.org.apache.xerces.internal.xni.XMLString | createXMLString(java.lang.String str)
// with my patch
// return new XMLString(str);
// for now
return new XMLString(str.toCharArray(), 0, str.length());
|
public void | endDocument()
try {
fCore.endDocument(null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | endElement(java.lang.String uri, java.lang.String local, java.lang.String qname)
try {
fCore.endElement(createQName(uri,local,qname),null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | endPrefixMapping(java.lang.String prefix)
nsContext.popContext();
|
public com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler | getDocumentHandler()
return fCore;
|
public void | ignorableWhitespace(char[] buf, int offset, int len)
try {
fCore.ignorableWhitespace(new XMLString(buf,offset,len),null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | processingInstruction(java.lang.String target, java.lang.String data)
try {
fCore.processingInstruction(
symbolize(target),createXMLString(data),null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | setDocumentHandler(com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler handler)
fCore = handler;
|
public void | setDocumentLocator(org.xml.sax.Locator _loc)
this.locator = _loc;
|
public void | skippedEntity(java.lang.String name)
|
public void | startDocument()
try {
nsContext.reset();
XMLLocator xmlLocator;
if(locator==null)
// some SAX source doesn't provide a locator,
// in which case we assume no line information is available
// and use a dummy locator. With this, downstream components
// can always assume that they will get a non-null Locator.
xmlLocator=new SimpleLocator(null,null,-1,-1);
else
xmlLocator=new LocatorWrapper(locator);
fCore.startDocument(
xmlLocator,
null,
nsContext,
null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | startElement(java.lang.String uri, java.lang.String local, java.lang.String qname, org.xml.sax.Attributes att)
try {
fCore.startElement(createQName(uri,local,qname),createAttributes(att),null);
} catch( WrappedSAXException e ) {
throw e.exception;
}
|
public void | startPrefixMapping(java.lang.String prefix, java.lang.String uri)
nsContext.pushContext();
nsContext.declarePrefix(prefix,uri);
|
private java.lang.String | symbolize(java.lang.String s)Symbolizes the specified string.
if (s == null)
return null;
else
return symbolTable.addSymbol(s);
|