/** * This method tells the node to add its argument to the node's * list of children. * @param n Must be a ElemTemplateElement. */ public void exprAddChild(ExpressionNode n, int i) { appendChild((ElemTemplateElement)n); }
/** * This method tells the node to add its argument to the node's * list of children. * @param n Must be a ElemTemplateElement. */ public void exprAddChild(ExpressionNode n, int i) { appendChild((ElemTemplateElement)n); }
/** * Add a child to the child list. If the select attribute * is present, an error will be raised. * * @param elem New element to append to this element's children list * * @return null if the select attribute was present, otherwise the * child just added to the child list */ public ElemTemplateElement appendChild(ElemTemplateElement elem) { // cannot have content and select if (m_selectPattern != null) { error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT, new Object[]{"xsl:" + this.getNodeName()}); return null; } return super.appendChild(elem); }
/** * Add a child to the child list. If the select attribute * is present, an error will be raised. * * @param elem New element to append to this element's children list * * @return null if the select attribute was present, otherwise the * child just added to the child list */ public ElemTemplateElement appendChild(ElemTemplateElement elem) { // cannot have content and select if (m_selectPattern != null) { error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT, new Object[]{"xsl:" + this.getNodeName()}); return null; } return super.appendChild(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); } }
/** * Add a child to the child list. If the select attribute * is present, an error will be raised. * * @param elem New element to append to this element's children list * * @return null if the select attribute was present, otherwise the * child just added to the child list */ public ElemTemplateElement appendChild(ElemTemplateElement elem) { // cannot have content and select if (m_selectPattern != null) { error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT, new Object[]{"xsl:" + this.getNodeName()}); return null; } return super.appendChild(elem); }
/** * Add a child to the child list. * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> * <!ATTLIST xsl:apply-templates * select %expr; "node()" * mode %qname; #IMPLIED * > * * @param newChild Child to add to child list * * @return Child just added to child list */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); if (Constants.ELEMNAME_SORT == type) { setSortElem((ElemSort) newChild); return newChild; } else return super.appendChild(newChild); }
/** * Add a child to the child list. If the select attribute * is present, an error will be raised. * * @param elem New element to append to this element's children list * * @return null if the select attribute was present, otherwise the * child just added to the child list */ public ElemTemplateElement appendChild(ElemTemplateElement elem) { // cannot have content and select if (m_selectPattern != null) { error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT, new Object[]{"xsl:" + this.getNodeName()}); return null; } return super.appendChild(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); } }
/** * Add a child to the child list. * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> * <!ATTLIST xsl:apply-templates * select %expr; "node()" * mode %qname; #IMPLIED * > * * @param newChild Child to add to child list * * @return Child just added to child list */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); if (Constants.ELEMNAME_SORT == type) { setSortElem((ElemSort) newChild); return newChild; } else return super.appendChild(newChild); }
/** * Add a child to the child list. * * @param newChild Child to add to children list * * @return Child added to children list * * @throws DOMException */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); switch (type) { case Constants.ELEMNAME_TEXTLITERALRESULT : break; default : error(XSLTErrorResources.ER_CANNOT_ADD, new Object[]{ newChild.getNodeName(), this.getNodeName() }); //"Can not add " +((ElemTemplateElement)newChild).m_elemName + //" to " + this.m_elemName); } return super.appendChild(newChild); } }
/** * Add a child to the child list. * * @param newChild Child to add to this node's child list * * @return The child that was just added to the child list * * @throws DOMException */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); switch (type) { case Constants.ELEMNAME_WHEN : case Constants.ELEMNAME_OTHERWISE : // TODO: Positional checking break; default : error(XSLTErrorResources.ER_CANNOT_ADD, new Object[]{ newChild.getNodeName(), this.getNodeName() }); //"Can not add " +((ElemTemplateElement)newChild).m_elemName + //" to " + this.m_elemName); } return super.appendChild(newChild); }
/** * Add a child to the child list. * * @param newChild Child to add to this node's child list * * @return The child that was just added to the child list * * @throws DOMException */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); switch (type) { case Constants.ELEMNAME_WHEN : case Constants.ELEMNAME_OTHERWISE : // TODO: Positional checking break; default : error(XSLTErrorResources.ER_CANNOT_ADD, new Object[]{ newChild.getNodeName(), this.getNodeName() }); //"Can not add " +((ElemTemplateElement)newChild).m_elemName + //" to " + this.m_elemName); } return super.appendChild(newChild); }
/** * Add a child to the child list. * * @param newChild Child to add to children list * * @return Child added to children list * * @throws DOMException */ public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); switch (type) { case Constants.ELEMNAME_TEXTLITERALRESULT : break; default : error(XSLTErrorResources.ER_CANNOT_ADD, new Object[]{ newChild.getNodeName(), this.getNodeName() }); //"Can not add " +((ElemTemplateElement)newChild).m_elemName + //" to " + this.m_elemName); } return super.appendChild(newChild); } }
/** * 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()); }
return super.appendChild(newChild);
return super.appendChild(newChild);
/** * 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()); }
parent.appendChild(elem);
parent.appendChild(eat); handler.pushElemTemplateElement(eat);