/** * Return the base identifier. * * @return The base identifier of the current stylesheet. */ public String getBaseIdentifier() { // Try to get the baseIdentifier from the baseIdentifier's stack, // which may not be the same thing as the value found in the // SourceLocators stack. String base = (String) (m_baseIdentifiers.isEmpty() ? null : m_baseIdentifiers.peek()); // Otherwise try the stylesheet. if (null == base) { SourceLocator locator = getLocator(); base = (null == locator) ? "" : locator.getSystemId(); } return base; }
/** * Return the base identifier. * * @return The base identifier of the current stylesheet. */ public String getBaseIdentifier() { // Try to get the baseIdentifier from the baseIdentifier's stack, // which may not be the same thing as the value found in the // SourceLocators stack. String base = (String) (m_baseIdentifiers.isEmpty() ? null : m_baseIdentifiers.peek()); // Otherwise try the stylesheet. if (null == base) { SourceLocator locator = getLocator(); base = (null == locator) ? "" : locator.getSystemId(); } return base; }
/** * Report a fatal XSLT processing error. * * @param e The error information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#fatalError} * method chooses to flag this condition as an error. */ public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.fatalError(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Receive notification of a XSLT processing warning. * * @param e The warning information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#warning} * method chooses to flag this condition as an error. */ public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.warning(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Receive notification of a recoverable XSLT processing error. * * @param e The error information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#error} * method chooses to flag this condition as an error. */ public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.error(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Receive notification of a recoverable XSLT processing error. * * @param e The error information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#error} * method chooses to flag this condition as an error. */ public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.error(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Receive notification of a XSLT processing warning. * * @param e The warning information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#warning} * method chooses to flag this condition as an error. */ public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.warning(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Report a fatal XSLT processing error. * * @param e The error information encoded as an exception. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#fatalError} * method chooses to flag this condition as an error. */ public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException { String formattedMsg = e.getMessage(); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { handler.fatalError(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Receive notification of the end of an element. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param uri The Namespace URI, or an empty string. * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws org.xml.sax.SAXException { super.endElement(handler, uri, localName, rawName); handler.popElemTemplateElement().setEndLocaterInfo(handler.getLocator()); } }
/** * Receive notification of the end of an element. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param uri The Namespace URI, or an empty string. * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws org.xml.sax.SAXException { super.endElement(handler, uri, localName, rawName); handler.popElemTemplateElement().setEndLocaterInfo(handler.getLocator()); } }
/** * Warn the user of an problem. * * @param msg An key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#warning} * method chooses to flag this condition as an error. * @xsl.usage internal */ public void warn(String msg, Object args[]) throws org.xml.sax.SAXException { String formattedMsg = XSLMessages.createWarning(msg, args); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { if (null != handler) handler.warning(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
/** * Warn the user of an problem. * * @param msg An key into the {@link org.apache.xalan.res.XSLTErrorResources} * table, that is one of the WG_ prefixed definitions. * @param args An array of arguments for the given warning. * * @throws org.xml.sax.SAXException that wraps a * {@link javax.xml.transform.TransformerException} if the current * {@link javax.xml.transform.ErrorListener#warning} * method chooses to flag this condition as an error. * @xsl.usage internal */ public void warn(String msg, Object args[]) throws org.xml.sax.SAXException { String formattedMsg = XSLMessages.createWarning(msg, args); SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener(); try { if (null != handler) handler.warning(new TransformerException(formattedMsg, locator)); } catch (TransformerException te) { throw new org.xml.sax.SAXException(te); } }
SAXSourceLocator locator = getLocator(); ErrorListener handler = m_stylesheetProcessor.getErrorListener();
elem.setLocaterInfo(handler.getLocator()); try
elem.setLocaterInfo(handler.getLocator()); elem.setPrefixes(handler.getNamespaceSupport());
/** * Receive notification of the start of an xsl:key element. * * @param handler The calling StylesheetHandler/TemplatesBuilder. * @param uri The Namespace URI, or the empty string if the * element has no Namespace URI or if Namespace * processing is not being performed. * @param localName The local name (without prefix), or the * empty string if Namespace processing is not being * performed. * @param rawName The raw XML 1.0 name (with prefix), or the * empty string if raw names are not available. * @param attributes The attributes attached to the element. If * there are no attributes, it shall be an empty * Attributes object. */ public void startElement( StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException { KeyDeclaration kd = new KeyDeclaration(handler.getStylesheet(), handler.nextUid()); kd.setDOMBackPointer(handler.getOriginatingNode()); kd.setLocaterInfo(handler.getLocator()); setPropertiesFromAttributes(handler, rawName, attributes, kd); handler.getStylesheet().setKey(kd); }
/** * Receive notification of the start of an xsl:key element. * * @param handler The calling StylesheetHandler/TemplatesBuilder. * @param uri The Namespace URI, or the empty string if the * element has no Namespace URI or if Namespace * processing is not being performed. * @param localName The local name (without prefix), or the * empty string if Namespace processing is not being * performed. * @param rawName The raw XML 1.0 name (with prefix), or the * empty string if raw names are not available. * @param attributes The attributes attached to the element. If * there are no attributes, it shall be an empty * Attributes object. */ public void startElement( StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException { KeyDeclaration kd = new KeyDeclaration(handler.getStylesheet(), handler.nextUid()); kd.setDOMBackPointer(handler.getOriginatingNode()); kd.setLocaterInfo(handler.getLocator()); setPropertiesFromAttributes(handler, rawName, attributes, kd); handler.getStylesheet().setKey(kd); }
eat.setLocaterInfo(handler.getLocator()); try
dfp.setLocaterInfo(handler.getLocator());
dfp.setLocaterInfo(handler.getLocator());