Code example for AttributesImpl

Methods: addAttribute

0
    public void startElement(String ns, String localName, String name, Attributes atts) throws SAXException {
        if (localName.equals("literal") || _suppressLineNo > 0)
            ++_suppressLineNo;
 
        if (_locator != null && _suppressLineNo == 0) {
            AttributesImpl a = new AttributesImpl(atts);
            a.addAttribute(BpelObject.ATTR_LINENO.getNamespaceURI(), BpelObject.ATTR_LINENO.getLocalPart(),
                    "odebpelc:"+BpelObject.ATTR_LINENO.getLocalPart(), "CDATA", "" + _locator.getLineNumber());
            atts = a;
        } 
        super.startElement(ns, localName, name, atts);
    } 
 
 
    @Override 
    public void endElement(String ns, String localName, String name) throws SAXException {
        if (_suppressLineNo > 0)
            --_suppressLineNo;
 
        super.endElement(ns, localName, name);