/** * 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 double getElemVersion() { ElemTemplateElement elem = getElemTemplateElement(); double version = -1; while ((version == -1 || version == Constants.XSLTVERSUPPORTED) && elem != null) { try{ version = Double.valueOf(elem.getXmlVersion()).doubleValue(); } catch (Exception ex) { version = -1; } elem = elem.getParentElem(); } return (version == -1)? Constants.XSLTVERSUPPORTED : version; } /**
/** * 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 double getElemVersion() { ElemTemplateElement elem = getElemTemplateElement(); double version = -1; while ((version == -1 || version == Constants.XSLTVERSUPPORTED) && elem != null) { try{ version = Double.valueOf(elem.getXmlVersion()).doubleValue(); } catch (Exception ex) { version = -1; } elem = elem.getParentElem(); } return (version == -1)? Constants.XSLTVERSUPPORTED : version; } /**
if (!(handler.getElemTemplateElement() instanceof Stylesheet))
/** * Append the current template element to the current * template element, and then push it onto the current template * element stack. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param elem non-null reference to a the current template element. * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ protected void appendAndPush( StylesheetHandler handler, ElemTemplateElement elem) throws org.xml.sax.SAXException { ElemTemplateElement parent = handler.getElemTemplateElement(); if(null != parent) // defensive, for better multiple error reporting. -sb { parent.appendChild(elem); handler.pushElemTemplateElement(elem); } }
/** * Append the current template element to the current * template element, and then push it onto the current template * element stack. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param elem non-null reference to a the current template element. * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ protected void appendAndPush( StylesheetHandler handler, ElemTemplateElement elem) throws org.xml.sax.SAXException { ElemTemplateElement parent = handler.getElemTemplateElement(); if(null != parent) // defensive, for better multiple error reporting. -sb { parent.appendChild(elem); handler.pushElemTemplateElement(elem); } }
if (!(handler.getElemTemplateElement() instanceof Stylesheet))
/** * 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 { ElemTemplateElement elem = handler.getElemTemplateElement(); if (elem instanceof ElemLiteralResult) { if (((ElemLiteralResult) elem).getIsLiteralResultAsStylesheet()) { handler.popStylesheet(); } } super.endElement(handler, uri, localName, rawName); }
/** * 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 { ElemTemplateElement elem = handler.getElemTemplateElement(); if (elem instanceof ElemLiteralResult) { if (((ElemLiteralResult) elem).getIsLiteralResultAsStylesheet()) { handler.popStylesheet(); } } super.endElement(handler, uri, localName, rawName); }
ElemTemplateElement ancestor = handler.getElemTemplateElement().getParentElem(); while (ancestor != null && !(ancestor instanceof ElemExsltFunction))
ElemTemplateElement ancestor = handler.getElemTemplateElement().getParentElem(); while (ancestor != null && !(ancestor instanceof ElemExsltFunction))
/** * Receive notification of the end of an element. * * @param name The element type name. * @param attributes The specified or defaulted attributes. * * @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 { ElemVariable v = (ElemVariable) handler.getElemTemplateElement(); handler.getStylesheet().appendChild(v); handler.getStylesheet().setVariable(v); super.endElement(handler, uri, localName, rawName); } }
/** * Receive notification of the end of an element. * * @param name The element type name. * @param attributes The specified or defaulted attributes. * * @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 { ElemParam v = (ElemParam) handler.getElemTemplateElement(); handler.getStylesheet().appendChild(v); handler.getStylesheet().setParam(v); super.endElement(handler, uri, localName, rawName); } }
/** * Append the current template element to the current * template element, and then push it onto the current template * element stack. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param elem non-null reference to a {@link org.apache.xalan.templates.ElemText}. * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ protected void appendAndPush( StylesheetHandler handler, ElemTemplateElement elem) throws org.xml.sax.SAXException { // Don't push this element onto the element stack. ProcessorCharacters charProcessor = (ProcessorCharacters) handler.getProcessorFor(null, "text()", "text"); charProcessor.setXslTextElement((ElemText) elem); ElemTemplateElement parent = handler.getElemTemplateElement(); parent.appendChild(elem); elem.setDOMBackPointer(handler.getOriginatingNode()); }
/** * Receive notification of the end of an element. * * @param name The element type name. * @param attributes The specified or defaulted attributes. * * @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 { ElemParam v = (ElemParam) handler.getElemTemplateElement(); handler.getStylesheet().appendChild(v); handler.getStylesheet().setParam(v); super.endElement(handler, uri, localName, rawName); } }
/** * Receive notification of the end of an element. * * @param name The element type name. * @param attributes The specified or defaulted attributes. * * @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 { ElemVariable v = (ElemVariable) handler.getElemTemplateElement(); handler.getStylesheet().appendChild(v); handler.getStylesheet().setVariable(v); super.endElement(handler, uri, localName, rawName); } }
/** * Append the current template element to the current * template element, and then push it onto the current template * element stack. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param elem non-null reference to a {@link org.apache.xalan.templates.ElemText}. * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. */ protected void appendAndPush( StylesheetHandler handler, ElemTemplateElement elem) throws org.xml.sax.SAXException { // Don't push this element onto the element stack. ProcessorCharacters charProcessor = (ProcessorCharacters) handler.getProcessorFor(null, "text()", "text"); charProcessor.setXslTextElement((ElemText) elem); ElemTemplateElement parent = handler.getElemTemplateElement(); parent.appendChild(elem); elem.setDOMBackPointer(handler.getOriginatingNode()); }
elem.setChars(chars); ElemTemplateElement parent = handler.getElemTemplateElement();
ElemTemplateElement parent = handler.getElemTemplateElement();