/** * @see Rule#begin(String, String, Attributes) */ public final void begin(final String namespace, final String name, final Attributes attributes) throws Exception { super.begin(namespace, name, attributes); src = attributes.getValue("src"); expr = attributes.getValue("expr"); if (!SCXMLHelper.isStringEmpty(src)) { String path = null; if (pr == null) { path = src; } else { path = pr.resolvePath(src); } try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory. newInstance(); DocumentBuilder db = dbFactory.newDocumentBuilder(); attrNode = db.parse(path); } catch (Throwable t) { // you read that correctly org.apache.commons.logging.Log log = LogFactory. getLog(SCXMLParser.class); log.error(t.getMessage(), t); } return; } }
/** * @see Rule#begin(String, String, Attributes) */ public final void begin(final String namespace, final String name, final Attributes attributes) throws Exception { super.begin(namespace, name, attributes); src = attributes.getValue("src"); expr = attributes.getValue("expr"); if (!SCXMLHelper.isStringEmpty(src)) { String path = null; if (pr == null) { path = src; } else { path = pr.resolvePath(src); } try { DocumentBuilderFactory dbFactory = DocumentBuilderFactory. newInstance(); DocumentBuilder db = dbFactory.newDocumentBuilder(); attrNode = db.parse(path); } catch (Throwable t) { // you read that correctly org.apache.commons.logging.Log log = LogFactory. getLog(SCXMLDigester.class); log.error(t.getMessage(), t); } return; } }
/** * <p>Ensure that the object at the top of the stack is a * <code>DescriptionBean</code>, then perform the standard * superclass processing.</p> * * @param namespace the namespace URI of the matching element, or an * empty string if the parser is not namespace aware or the element has * no namespace * @param name the local name if the parser is namespace aware, or just * the element name otherwise * @param attributes The attribute list of this element * * @exception IllegalStateException if the parent stack element is not * of type FeatureBean */ public void begin(String namespace, String name, Attributes attributes) throws Exception { assert digester.peek() instanceof DescriptionBean : "Assertion Error: Expected DescriptionBean to be at the top of the stack"; // Perform our standard superclass processing if (digester.getLogger().isDebugEnabled()) { digester.getLogger().debug("[DescriptionTextRule]{" + digester.getMatch() + "} Begin"); } super.begin(namespace, name, attributes); }