/** * Gets the prefix. This is slow. * * @return can be "" but never null. */ public String getPrefix() { String qname = getQname(); int idx = qname.indexOf(':'); if(idx<0) return ""; else return qname.substring(0,idx); }
public void endElement(TagName tagName ) throws SAXException { validator.endElement(tagName.uri,tagName.local,tagName.getQname()); next.endElement(tagName); }
public void startElement(TagName tagName) throws SAXException { if(nsContext != null) { String tagNamePrefix = tagName.getPrefix().intern(); if(tagNamePrefix != "") { validator.startPrefixMapping(tagNamePrefix, nsContext.getNamespaceURI(tagNamePrefix)); } } validator.startElement(tagName.uri,tagName.local,tagName.getQname(),tagName.atts); next.startElement(tagName); }
@Override public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { UnmarshallingContext context = state.getContext(); if (state.getTarget() == null) state.setTarget(new State(context)); State s = (State) state.getTarget(); try { s.declarePrefixes(context, context.getNewlyDeclaredPrefixes()); s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts); } catch (SAXException e) { context.handleError(e); throw e; } }
@Override public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { State s = (State) state.getTarget(); UnmarshallingContext context = state.getContext(); try { s.handler.endElement(ea.uri, ea.local, ea.getQname()); s.undeclarePrefixes(context.getNewlyDeclaredPrefixes()); } catch( SAXException e ) { context.handleError(e); throw e; } if((--s.depth)==0) { // emulate the end of the document try { s.undeclarePrefixes(context.getAllDeclaredPrefixes()); s.handler.endDocument(); } catch( SAXException e ) { context.handleError(e); throw e; } // we are done state.setTarget(s.getElement()); } }
/** * Gets the prefix. This is slow. * * @return can be "" but never null. */ public String getPrefix() { String qname = getQname(); int idx = qname.indexOf(':'); if(idx<0) return ""; else return qname.substring(0,idx); }
public void endElement(TagName tagName ) throws SAXException { validator.endElement(tagName.uri,tagName.local,tagName.getQname()); next.endElement(tagName); }
public void startElement(TagName tagName) throws SAXException { if(nsContext != null) { String tagNamePrefix = tagName.getPrefix().intern(); if(tagNamePrefix != "") { validator.startPrefixMapping(tagNamePrefix, nsContext.getNamespaceURI(tagNamePrefix)); } } validator.startElement(tagName.uri,tagName.local,tagName.getQname(),tagName.atts); next.startElement(tagName); }
@Override public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { UnmarshallingContext context = state.getContext(); if (state.getTarget() == null) state.setTarget(new State(context)); State s = (State) state.getTarget(); try { s.declarePrefixes(context, context.getNewlyDeclaredPrefixes()); s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts); } catch (SAXException e) { context.handleError(e); throw e; } }
@Override public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { State s = (State) state.getTarget(); UnmarshallingContext context = state.getContext(); try { s.handler.endElement(ea.uri, ea.local, ea.getQname()); s.undeclarePrefixes(context.getNewlyDeclaredPrefixes()); } catch( SAXException e ) { context.handleError(e); throw e; } if((--s.depth)==0) { // emulate the end of the document try { s.undeclarePrefixes(context.getAllDeclaredPrefixes()); s.handler.endDocument(); } catch( SAXException e ) { context.handleError(e); throw e; } // we are done state.setTarget(s.getElement()); } }
/** * Gets the prefix. This is slow. * * @return can be "" but never null. */ public String getPrefix() { String qname = getQname(); int idx = qname.indexOf(':'); if(idx<0) return ""; else return qname.substring(0,idx); }
/** * Gets the prefix. This is slow. * * @return can be "" but never null. */ public String getPrefix() { String qname = getQname(); int idx = qname.indexOf(':'); if(idx<0) return ""; else return qname.substring(0,idx); }
public void endElement(TagName tagName ) throws SAXException { validator.endElement(tagName.uri,tagName.local,tagName.getQname()); next.endElement(tagName); }
public void endElement(TagName tagName ) throws SAXException { validator.endElement(tagName.uri,tagName.local,tagName.getQname()); next.endElement(tagName); }
public void startElement(TagName tagName) throws SAXException { if(nsContext != null) { String tagNamePrefix = tagName.getPrefix().intern(); if(tagNamePrefix != "") { validator.startPrefixMapping(tagNamePrefix, nsContext.getNamespaceURI(tagNamePrefix)); } } validator.startElement(tagName.uri,tagName.local,tagName.getQname(),tagName.atts); next.startElement(tagName); }
public void startElement(TagName tagName) throws SAXException { if(nsContext != null) { String tagNamePrefix = tagName.getPrefix().intern(); if(tagNamePrefix != "") { validator.startPrefixMapping(tagNamePrefix, nsContext.getNamespaceURI(tagNamePrefix)); } } validator.startElement(tagName.uri,tagName.local,tagName.getQname(),tagName.atts); next.startElement(tagName); }
@Override public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { UnmarshallingContext context = state.getContext(); if (state.getTarget() == null) state.setTarget(new State(context)); State s = (State) state.getTarget(); try { s.declarePrefixes(context, context.getNewlyDeclaredPrefixes()); s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts); } catch (SAXException e) { context.handleError(e); throw e; } }
@Override public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { UnmarshallingContext context = state.getContext(); if (state.getTarget() == null) state.setTarget(new State(context)); State s = (State) state.getTarget(); try { s.declarePrefixes(context, context.getNewlyDeclaredPrefixes()); s.handler.startElement(ea.uri, ea.local, ea.getQname(), ea.atts); } catch (SAXException e) { context.handleError(e); throw e; } }
@Override public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { State s = (State) state.getTarget(); UnmarshallingContext context = state.getContext(); try { s.handler.endElement(ea.uri, ea.local, ea.getQname()); s.undeclarePrefixes(context.getNewlyDeclaredPrefixes()); } catch( SAXException e ) { context.handleError(e); throw e; } if((--s.depth)==0) { // emulate the end of the document try { s.undeclarePrefixes(context.getAllDeclaredPrefixes()); s.handler.endDocument(); } catch( SAXException e ) { context.handleError(e); throw e; } // we are done state.setTarget(s.getElement()); } }
@Override public void leaveElement(UnmarshallingContext.State state, TagName ea) throws SAXException { State s = (State) state.getTarget(); UnmarshallingContext context = state.getContext(); try { s.handler.endElement(ea.uri, ea.local, ea.getQname()); s.undeclarePrefixes(context.getNewlyDeclaredPrefixes()); } catch( SAXException e ) { context.handleError(e); throw e; } if((--s.depth)==0) { // emulate the end of the document try { s.undeclarePrefixes(context.getAllDeclaredPrefixes()); s.handler.endDocument(); } catch( SAXException e ) { context.handleError(e); throw e; } // we are done state.setTarget(s.getElement()); } }