Search in sources :

Example 1 with ElemAttributeSet

use of org.apache.xalan.templates.ElemAttributeSet in project robovm by robovm.

the class ProcessorAttributeSet method startElement.

/**
   * Receive notification of the start of an xsl:attribute-set 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.
   * 
   * @see org.apache.xalan.processor.StylesheetHandler#startElement
   * @see org.xml.sax.ContentHandler#startElement
   * @see org.xml.sax.ContentHandler#endElement
   * @see org.xml.sax.Attributes
   */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    ElemAttributeSet eat = new ElemAttributeSet();
    eat.setLocaterInfo(handler.getLocator());
    try {
        eat.setPrefixes(handler.getNamespaceSupport());
    } catch (TransformerException te) {
        throw new org.xml.sax.SAXException(te);
    }
    eat.setDOMBackPointer(handler.getOriginatingNode());
    setPropertiesFromAttributes(handler, rawName, attributes, eat);
    handler.getStylesheet().setAttributeSet(eat);
    // handler.pushElemTemplateElement(eat);
    ElemTemplateElement parent = handler.getElemTemplateElement();
    parent.appendChild(eat);
    handler.pushElemTemplateElement(eat);
}
Also used : ElemAttributeSet(org.apache.xalan.templates.ElemAttributeSet) TransformerException(javax.xml.transform.TransformerException) ElemTemplateElement(org.apache.xalan.templates.ElemTemplateElement)

Example 2 with ElemAttributeSet

use of org.apache.xalan.templates.ElemAttributeSet in project j2objc by google.

the class ProcessorAttributeSet method startElement.

/**
 * Receive notification of the start of an xsl:attribute-set 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.
 *
 * @see org.apache.xalan.processor.StylesheetHandler#startElement
 * @see org.xml.sax.ContentHandler#startElement
 * @see org.xml.sax.ContentHandler#endElement
 * @see org.xml.sax.Attributes
 */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    ElemAttributeSet eat = new ElemAttributeSet();
    eat.setLocaterInfo(handler.getLocator());
    try {
        eat.setPrefixes(handler.getNamespaceSupport());
    } catch (TransformerException te) {
        throw new org.xml.sax.SAXException(te);
    }
    eat.setDOMBackPointer(handler.getOriginatingNode());
    setPropertiesFromAttributes(handler, rawName, attributes, eat);
    handler.getStylesheet().setAttributeSet(eat);
    // handler.pushElemTemplateElement(eat);
    ElemTemplateElement parent = handler.getElemTemplateElement();
    parent.appendChild(eat);
    handler.pushElemTemplateElement(eat);
}
Also used : ElemAttributeSet(org.apache.xalan.templates.ElemAttributeSet) TransformerException(javax.xml.transform.TransformerException) ElemTemplateElement(org.apache.xalan.templates.ElemTemplateElement)

Aggregations

TransformerException (javax.xml.transform.TransformerException)2 ElemAttributeSet (org.apache.xalan.templates.ElemAttributeSet)2 ElemTemplateElement (org.apache.xalan.templates.ElemTemplateElement)2