@Override public void endPrefixMapping( String prefix ) throws SAXException { super.endPrefixMapping(prefix); currentContext = currentContext.previous; }
protected void unexpectedX(String token) throws SAXException { throw new SAXParseException(MessageFormat.format( "Unexpected {0} appears at line {1} column {2}", new Object[]{ token, new Integer(getLocator().getLineNumber()), new Integer(getLocator().getColumnNumber()) }), getLocator()); }
@Override public void onEnterElementConsumed(String uri, String localName, String qname, Attributes atts) throws SAXException { super.onEnterElementConsumed(uri, localName, qname, atts); elementNames.push(localName); }
public void unexpectedEnterAttribute(String qname) throws SAXException { getRuntime().unexpectedX('@'+qname); } public void unexpectedLeaveAttribute(String qname) throws SAXException {
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException { if(redirect!=null) { redirect.startElement(uri,localname,qname,atts); redirectionDepth++; } else { processPendingText(true); // System.out.println("startElement:"+localname+"->"+_attrStack.size()); currentHandler.enterElement(uri, localname, qname, atts); } }
public NGCCRuntime() { reset(); }
public void trace( String s ) { if(needIndent) { needIndent=false; printIndent(); } System.out.print(s); } public void traceln( String s ) {
@Override public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException { super.onLeaveElementConsumed(uri, localName, qname); elementNames.pop(); }
@Override public void startPrefixMapping( String prefix, String uri ) throws SAXException { super.startPrefixMapping(prefix,uri); currentContext = new Context(prefix,uri,currentContext); } @Override
public void unexpectedLeaveAttribute(String qname) throws SAXException { getRuntime().unexpectedX("/@"+qname); } }
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException { if(redirect!=null) { redirect.startElement(uri,localname,qname,atts); redirectionDepth++; } else { processPendingText(true); // System.out.println("startElement:"+localname+"->"+_attrStack.size()); currentHandler.enterElement(uri, localname, qname, atts); } }
public NGCCRuntime() { reset(); }
public void trace( String s ) { if(needIndent) { needIndent=false; printIndent(); } System.out.print(s); } public void traceln( String s ) {
@Override public void onLeaveElementConsumed(String uri, String localName, String qname) throws SAXException { super.onLeaveElementConsumed(uri, localName, qname); elementNames.pop(); }
@Override public void startPrefixMapping( String prefix, String uri ) throws SAXException { super.startPrefixMapping(prefix,uri); currentContext = new Context(prefix,uri,currentContext); } @Override
public void unexpectedLeaveElement(String qname) throws SAXException { getRuntime().unexpectedX("</"+qname+'>'); } public void unexpectedEnterAttribute(String qname) throws SAXException {
public void startElement(String uri, String localname, String qname, Attributes atts) throws SAXException { if(redirect!=null) { redirect.startElement(uri,localname,qname,atts); redirectionDepth++; } else { processPendingText(true); // System.out.println("startElement:"+localname+"->"+_attrStack.size()); currentHandler.enterElement(uri, localname, qname, atts); } }
public NGCCRuntime() { reset(); }