/** * @return XMLParser */ public XMLParser getJellyParser() { if (jellyParser == null) { jellyParser = createJellyParser(); } return jellyParser; }
/** @return the XMLReader used for parsing, creating one lazily if need be */ public XMLReader getXMLReader() throws ParserConfigurationException, SAXException { if (xmlReader == null) { xmlReader = createXMLReader(); } return xmlReader; }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getText(); if (text != null) { parseText(text); } else { parseBody(output); } Script script = getJellyParser().getScript(); if (var != null) { context.setVariable(var, script); } else { // invoke the script script.run(context, output); } }
/** * Parses the body of this tag and returns the parsed document */ protected void parseBody(XMLOutput output) throws JellyTagException { ContentHandler handler = getJellyParser(); XMLOutput newOutput = new XMLOutput(handler); try { handler.startDocument(); invokeBody(newOutput); handler.endDocument(); } catch (SAXException e) { throw new JellyTagException(e); } }
/** * Parses the give piece of text as being markup */ protected void parseText(String text) throws JellyTagException { if ( log.isDebugEnabled() ) { log.debug( "About to parse: " + text ); } try { XMLReader xmlReader = getXMLReader(); xmlReader.setContentHandler(getJellyParser()); xmlReader.parse( new InputSource( new StringReader( text ) ) ); } catch (Exception e) { throw new JellyTagException(e); } }
/** * Parses the give piece of text as being markup */ protected void parseText(String text) throws JellyTagException { if ( log.isDebugEnabled() ) { log.debug( "About to parse: " + text ); } try { getXMLReader().parse( new InputSource( new StringReader( text ) ) ); } catch (Exception e) { throw new JellyTagException(e); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getText(); if (text != null) { parseText(text); } else { parseBody(output); } Script script = getJellyParser().getScript(); if (var != null) { context.setVariable(var, script); } else { // invoke the script script.run(context, output); } }
/** * Parses the body of this tag and returns the parsed document */ protected void parseBody(XMLOutput output) throws JellyTagException { ContentHandler handler = getJellyParser(); XMLOutput newOutput = new XMLOutput(handler); try { handler.startDocument(); invokeBody(newOutput); handler.endDocument(); } catch (SAXException e) { throw new JellyTagException(e); } }
/** * Parses the give piece of text as being markup */ protected void parseText(String text) throws JellyTagException { if ( log.isDebugEnabled() ) { log.debug( "About to parse: " + text ); } try { XMLReader xmlReader = getXMLReader(); xmlReader.setContentHandler(getJellyParser()); xmlReader.parse( new InputSource( new StringReader( text ) ) ); } catch (Exception e) { throw new JellyTagException(e); } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getText(); if (text != null) { parseText(text); } else { parseBody(output); } Script script = getJellyParser().getScript(); if (var != null) { context.setVariable(var, script); } else { // invoke the script script.run(context, output); } }
/** * Parses the body of this tag and returns the parsed document */ protected void parseBody(XMLOutput output) throws JellyTagException { ContentHandler handler = getJellyParser(); XMLOutput newOutput = new XMLOutput(handler); try { handler.startDocument(); invokeBody(newOutput); handler.endDocument(); } catch (SAXException e) { throw new JellyTagException(e); } }
/** * Parses the give piece of text as being markup */ protected void parseText(String text) throws JellyTagException { if ( log.isDebugEnabled() ) { log.debug( "About to parse: " + text ); } try { XMLReader xmlReader = getXMLReader(); xmlReader.setContentHandler(getJellyParser()); xmlReader.parse( new InputSource( new StringReader( text ) ) ); } catch (Exception e) { throw new JellyTagException(e); } }
/** @return the XMLReader used for parsing, creating one lazily if need be */ public XMLReader getXMLReader() throws ParserConfigurationException, SAXException { if (xmlReader == null) { xmlReader = createXMLReader(); } return xmlReader; }
/** * @return XMLParser */ public XMLParser getJellyParser() { if (jellyParser == null) { jellyParser = createJellyParser(); } return jellyParser; }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getText(); if (text != null) { parseText(text); } else { parseBody(output); } Script script = getJellyParser().getScript(); if (var != null) { context.setVariable(var, script); } else { // invoke the script script.run(context, output); } }
/** * Parses the body of this tag and returns the parsed document */ protected void parseBody(XMLOutput output) throws JellyTagException { ContentHandler handler = getJellyParser(); XMLOutput newOutput = new XMLOutput(handler); try { handler.startDocument(); invokeBody(newOutput); handler.endDocument(); } catch (SAXException e) { throw new JellyTagException(e); } }
/** @return the XMLReader used for parsing, creating one lazily if need be */ public XMLReader getXMLReader() throws ParserConfigurationException, SAXException { if (xmlReader == null) { xmlReader = createXMLReader(); } return xmlReader; }
/** * @return XMLParser */ public XMLParser getJellyParser() { if (jellyParser == null) { jellyParser = createJellyParser(); } return jellyParser; }
/** @return the XMLReader used for parsing, creating one lazily if need be */ public XMLReader getXMLReader() throws ParserConfigurationException, SAXException { if (xmlReader == null) { xmlReader = createXMLReader(); } return xmlReader; }
/** * @return XMLParser */ public XMLParser getJellyParser() { if (jellyParser == null) { jellyParser = createJellyParser(); } return jellyParser; }