public void endElement()

in impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java [191:381]


        public void endElement(String uri, String localName, String qName) throws SAXException
        {
            try
            {
                if ("facelet-taglib".equals(qName))
                {
                    // Nothing to do
                }                
                else if ("library-class".equals(qName))
                {
                    getLibraryImpl().setLibraryClass(this.captureBuffer());
                }
                else if ("short-name".equals(qName))
                {
                    getLibraryImpl().setShortName(this.captureBuffer());
                }
                else if ("namespace".equals(qName))
                {
                    getLibraryImpl().setNamespace(this.captureBuffer());
                }
                else if ("composite-library-name".equals(qName))
                {
                    getLibraryImpl().setCompositeLibraryName(this.captureBuffer());
                }
                else if ("component-type".equals(qName))
                {
                    this.componentType = this.captureBuffer();
                }
                else if ("renderer-type".equals(qName))
                {
                    this.rendererType = this.captureBufferEmptyNull();
                }
                else if ("tag-name".equals(qName))
                {
                    this.tagName = this.captureBuffer();
                }
                else if ("function-name".equals(qName))
                {
                    this.functionName = this.captureBuffer();
                }
                else if ("function-class".equals(qName))
                {
                    //String className = this.captureBuffer();
                    //this.functionClass = createClass(Object.class, className);
                    this.functionClass = this.captureBuffer();
                }
                else if ("description".equals(qName))
                {
                    //Not used
                }
                else if ("display-name".equals(qName))
                {
                    //Not used
                }
                else if ("icon".equals(qName))
                {
                    //Not used
                }                
                else if ("resource-id".equals(qName))
                {
                    this.resourceId = this.captureBuffer();
                }
                else
                {
                    // Make sure there we've seen a namespace element
                    // before trying any of the following elements to avoid
                    // obscure NPEs
                    if (this.library == null)
                    {
                        throw new IllegalStateException("No <namespace> element");
                    }
                    else if (this.library.getNamespace() == null)
                    {
                        throw new IllegalStateException("No <namespace> element");
                    }

                    if ("tag".equals(qName))
                    {
                        if (this.handlerClass != null)
                        {
                            getLibraryImpl().addTag(
                                new FaceletTagImpl(this.tagName, 
                                    new FaceletHandlerTagImpl(this.handlerClass)) );
                            this.handlerClass = null;
                        }
                    }
                    else if ("handler-class".equals(qName))
                    {
                        this.handlerClass = this.captureBufferEmptyNull();
                    }
                    else if ("component".equals(qName))
                    {
                        if (this.handlerClass != null)
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletComponentTagImpl(this.componentType, this.rendererType, 
                                    this.handlerClass, null)));
                            this.handlerClass = null;
                        }
                        else if (this.resourceId != null)
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletComponentTagImpl(null, null, null, this.resourceId)));
                            this.resourceId = null;
                            this.handlerClass = null;
                        }
                        else
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletComponentTagImpl(this.componentType, this.rendererType, null, null)));
                            this.handlerClass = null;
                        }
                    }
                    else if ("converter-id".equals(qName))
                    {
                        this.converterId = this.captureBuffer();
                    }
                    else if ("converter".equals(qName))
                    {
                        if (this.handlerClass != null)
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletConverterTagImpl(this.converterId, this.handlerClass)));
                            this.handlerClass = null;
                        }
                        else
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletConverterTagImpl(this.converterId)));
                        }
                        this.converterId = null;
                    }
                    else if ("validator-id".equals(qName))
                    {
                        this.validatorId = this.captureBuffer();
                    }
                    else if ("validator".equals(qName))
                    {
                        if (this.handlerClass != null)
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletValidatorTagImpl(this.validatorId, this.handlerClass)));
                            this.handlerClass = null;
                        }
                        else
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletValidatorTagImpl(this.validatorId)));
                        }
                        this.validatorId = null;
                    }
                    else if ("behavior-id".equals(qName))
                    {
                        this.behaviorId = this.captureBuffer();
                    }
                    else if ("behavior".equals(qName))
                    {
                        if (this.handlerClass != null)
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletBehaviorTagImpl(this.behaviorId, this.handlerClass)));
                            this.handlerClass = null;
                        }
                        else
                        {
                            getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                new FaceletBehaviorTagImpl(this.behaviorId)));
                        }
                        this.behaviorId = null;
                    }
                    else if ("source".equals(qName))
                    {
                        String path = this.captureBuffer();
                        URL url = new URL(this.source, path);
                        getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                            new FaceletSourceTagImpl(url.toString())));
                    }
                    else if ("function-signature".equals(qName))
                    {
                        this.functionSignature = this.captureBuffer();
                        getLibraryImpl().addFunction(
                            new FaceletFunctionImpl(this.functionName, this.functionClass, functionSignature));
                    }
                }
            }
            catch (Exception e)
            {
                throw new SAXParseException("Error Handling [" + this.source + '@' + this.locator.getLineNumber()
                        + ',' + this.locator.getColumnNumber() + "] <" + qName + '>', locator, e);
            }
        }