/** * End an ElemExsltFunction, and verify its validity. */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws SAXException { ElemTemplateElement function = handler.getElemTemplateElement(); validate(function, handler); // may throw exception super.endElement(handler, uri, localName, rawName); }
/** * Flush the characters buffer. * * @throws org.xml.sax.SAXException */ private void flushCharacters() throws org.xml.sax.SAXException { XSLTElementProcessor elemProcessor = getCurrentProcessor(); if (null != elemProcessor) elemProcessor.startNonText(this); }
/** * Constructor WhitespaceInfoPaths * * @param thisSheet The current stylesheet */ public WhitespaceInfoPaths(Stylesheet thisSheet) { super(thisSheet); setStylesheet(thisSheet); }
/** * This method can be over-ridden by a class that extends this one. * @param handler The calling StylesheetHandler/TemplatesBuilder. */ protected Stylesheet getStylesheetRoot(StylesheetHandler handler) throws TransformerConfigurationException { StylesheetRoot stylesheet; stylesheet = new StylesheetRoot(handler.getSchema(), handler.getStylesheetProcessor().getErrorListener()); if (handler.getStylesheetProcessor().isSecureProcessing()) stylesheet.setSecureProcessing(true); return stylesheet; }
private void handleError(StylesheetHandler handler, String msg, Object [] args, Exception exc) throws org.xml.sax.SAXException { switch (getErrorType()) { case (FATAL): case (ERROR): handler.error(msg, args, exc); break; case (WARNING): handler.warn(msg, args); default: break; } } }
/** * Receive notification of an unparsed entity declaration. * * @param name The entity name. * @param publicId The entity public identifier, or null if not * available. * @param systemId The entity system identifier. * @param notationName The name of the associated notation. * @see org.xml.sax.DTDHandler#unparsedEntityDecl */ public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) { getCurrentProcessor().unparsedEntityDecl(this, name, publicId, systemId, notationName); }
/** * Set the base ID (URL or system ID) for the stylesheet * created by this builder. This must be set in order to * resolve relative URLs in the stylesheet. * * @param baseID Base URL for this stylesheet. */ public void setSystemId(String baseID) { pushBaseIndentifier(baseID); }
/** * See if the imported stylesheet stack already contains * the given URL. Used to test for recursive imports. * * @param hrefUrl non-null reference to a URL string. * * @return true if the URL is on the import stack. */ boolean importStackContains(String hrefUrl) { return stackContains(m_importStack, hrefUrl); }
/** * Construct a XSLTSchema which represents the XSLT "schema". */ XSLTSchema() { build(); }
/** * Get the base ID (URI or system ID) from where relative * URLs will be resolved. * * @return The systemID that was set with {@link #setSystemId}. */ public String getSystemId() { return this.getBaseIdentifier(); }
/** * Creates a StylesheetRoot and retains a pointer to the schema used to create this * StylesheetRoot. The schema may be needed later for an element-available() function call. * * @param schema The schema used to create this stylesheet * @throws TransformerConfigurationException if the baseIdentifier can not be resolved to a URL. */ public StylesheetRoot(XSLTSchema schema, ErrorListener listener) throws TransformerConfigurationException { this(listener); m_availElems = schema.getElemsAvailable(); }
/** * Receive notification of the beginning of the document. * * @see org.xml.sax.ContentHandler#startDocument * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ public void startDocument() throws org.xml.sax.SAXException { m_stylesheetLevel++; pushSpaceHandling(false); }
/** * This method could be over-ridden by a class that extends this class. * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @return an object that represents the stylesheet element. */ protected Stylesheet getStylesheetRoot(StylesheetHandler handler) throws TransformerConfigurationException { StylesheetRoot stylesheet; stylesheet = new StylesheetRoot(handler.getSchema(), handler.getStylesheetProcessor().getErrorListener()); if (handler.getStylesheetProcessor().isSecureProcessing()) stylesheet.setSecureProcessing(true); return stylesheet; }
/** * End an ElemExsltFunction, and verify its validity. */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) throws SAXException { ElemTemplateElement function = handler.getElemTemplateElement(); validate(function, handler); // may throw exception super.endElement(handler, uri, localName, rawName); }
private void handleError(StylesheetHandler handler, String msg, Object [] args, Exception exc) throws org.xml.sax.SAXException { switch (getErrorType()) { case (FATAL): case (ERROR): handler.error(msg, args, exc); break; case (WARNING): handler.warn(msg, args); default: break; } } }
/** * Flush the characters buffer. * * @throws org.xml.sax.SAXException */ private void flushCharacters() throws org.xml.sax.SAXException { XSLTElementProcessor elemProcessor = getCurrentProcessor(); if (null != elemProcessor) elemProcessor.startNonText(this); }
/** * Set the base ID (URL or system ID) for the stylesheet * created by this builder. This must be set in order to * resolve relative URLs in the stylesheet. * * @param baseID Base URL for this stylesheet. */ public void setSystemId(String baseID) { pushBaseIndentifier(baseID); }
/** * See if the imported stylesheet stack already contains * the given URL. Used to test for recursive imports. * * @param hrefUrl non-null reference to a URL string. * * @return true if the URL is on the import stack. */ boolean importStackContains(String hrefUrl) { return stackContains(m_importStack, hrefUrl); }
/** * Construct a XSLTSchema which represents the XSLT "schema". */ XSLTSchema() { build(); }
/** * Get the base ID (URI or system ID) from where relative * URLs will be resolved. * * @return The systemID that was set with {@link #setSystemId}. */ public String getSystemId() { return this.getBaseIdentifier(); }