linter/src/main/java/org/apache/royale/linter/internal/config/FileConfigurator.java [152:252]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void startElement(final String uri, final String localName, final String qname, final Attributes attributes) throws SAXException
        {
            // Verify and initialize the context stack at root element.
            if (contextStack.size() == 0)
            {
                if (!qname.equals(rootElement))
                {
                    if (!qname.equals("flex-config"))
                    {
                        throw new SAXConfigurationException(
                            new ConfigurationException.IncorrectElement(rootElement, qname, this.source, locator.getLineNumber()),
                            locator);
                    }
                }
                final ParseContext ctx = new ParseContext();
                contextStack.push(ctx);
                return;
            }

            final ParseContext ctx = contextStack.peek();

            if (ctx.ignore)
            {
                // ignore starting new elements
                return;
            }

            if (text.length() > 0)
            {
                // Only leave nodes can have CDATA as option values.
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedCDATA(this.source, locator.getLineNumber()),
                        locator);
            }

            final String fullname = ConfigurationBuffer.varname(qname, ctx.base);

            if (ctx.item != null)
            {
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedElement(qname, contextPath, locator.getLineNumber()),
                        locator);
            }
            else if (ctx.var != null)
            {
                // we're setting values for a variable

                if (ctx.varArgCount == 1)
                {
                    // oops, we weren't expecting more than one value!

                    throw new SAXConfigurationException(
                            new ConfigurationException.UnexpectedElement(qname, source, locator.getLineNumber()),
                            locator);
                }
                ctx.item = qname;
            }
            else if (cfgbuf.isValidVar(fullname))
            {
                ctx.var = fullname;
                ctx.varArgCount = cfgbuf.getVarArgCount(ctx.var);
                ctx.append = false;
                final String append = attributes.getValue(ATTRIBUTE_APPEND);
                if (append != null)
                {
                    if (append.equalsIgnoreCase("true") || append.equalsIgnoreCase("false"))
                        ctx.append = Boolean.valueOf(append).booleanValue();
                    else
                        throw new SAXConfigurationException(
                                new ConfigurationException.BadAppendValue(
                                        ctx.var,
                                        source,
                                        locator.getLineNumber()),
                                locator);
                }
            }
            else if (isSubTree(fullname))
            {
                final ParseContext newctx = new ParseContext();
                newctx.base = fullname;
                contextStack.push(newctx);
            }
            else
            {
                if (ignoreUnknownItems)
                {
                    // push a new context and ignore everything until we get the end 
                    // of this element.
                    ParseContext newctx = new ParseContext();
                    newctx.item = qname;
                    newctx.ignore = true;
                    contextStack.push(newctx);
                    return;
                }
                System.err.println("Unknown tag:" + fullname);
                throw new SAXConfigurationException(
                        new ConfigurationException.UnknownVariable(
                                                    fullname, source, locator.getLineNumber()),
                        locator);
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



compiler-common/src/main/java/org/apache/royale/compiler/internal/config/FileConfigurator.java [152:252]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void startElement(final String uri, final String localName, final String qname, final Attributes attributes) throws SAXException
        {
            // Verify and initialize the context stack at root element.
            if (contextStack.size() == 0)
            {
                if (!qname.equals(rootElement))
                {
                    if (!qname.equals("flex-config"))
                    {
                        throw new SAXConfigurationException(
                            new ConfigurationException.IncorrectElement(rootElement, qname, this.source, locator.getLineNumber()),
                            locator);
                    }
                }
                final ParseContext ctx = new ParseContext();
                contextStack.push(ctx);
                return;
            }

            final ParseContext ctx = contextStack.peek();

            if (ctx.ignore)
            {
                // ignore starting new elements
                return;
            }

            if (text.length() > 0)
            {
                // Only leave nodes can have CDATA as option values.
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedCDATA(this.source, locator.getLineNumber()),
                        locator);
            }

            final String fullname = ConfigurationBuffer.varname(qname, ctx.base);

            if (ctx.item != null)
            {
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedElement(qname, contextPath, locator.getLineNumber()),
                        locator);
            }
            else if (ctx.var != null)
            {
                // we're setting values for a variable

                if (ctx.varArgCount == 1)
                {
                    // oops, we weren't expecting more than one value!

                    throw new SAXConfigurationException(
                            new ConfigurationException.UnexpectedElement(qname, source, locator.getLineNumber()),
                            locator);
                }
                ctx.item = qname;
            }
            else if (cfgbuf.isValidVar(fullname))
            {
                ctx.var = fullname;
                ctx.varArgCount = cfgbuf.getVarArgCount(ctx.var);
                ctx.append = false;
                final String append = attributes.getValue(ATTRIBUTE_APPEND);
                if (append != null)
                {
                    if (append.equalsIgnoreCase("true") || append.equalsIgnoreCase("false"))
                        ctx.append = Boolean.valueOf(append).booleanValue();
                    else
                        throw new SAXConfigurationException(
                                new ConfigurationException.BadAppendValue(
                                        ctx.var,
                                        source,
                                        locator.getLineNumber()),
                                locator);
                }
            }
            else if (isSubTree(fullname))
            {
                final ParseContext newctx = new ParseContext();
                newctx.base = fullname;
                contextStack.push(newctx);
            }
            else
            {
                if (ignoreUnknownItems)
                {
                    // push a new context and ignore everything until we get the end 
                    // of this element.
                    ParseContext newctx = new ParseContext();
                    newctx.item = qname;
                    newctx.ignore = true;
                    contextStack.push(newctx);
                    return;
                }
                System.err.println("Unknown tag:" + fullname);
                throw new SAXConfigurationException(
                        new ConfigurationException.UnknownVariable(
                                                    fullname, source, locator.getLineNumber()),
                        locator);
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



formatter/src/main/java/org/apache/royale/formatter/internal/config/FileConfigurator.java [151:251]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        public void startElement(final String uri, final String localName, final String qname, final Attributes attributes) throws SAXException
        {
            // Verify and initialize the context stack at root element.
            if (contextStack.size() == 0)
            {
                if (!qname.equals(rootElement))
                {
                    if (!qname.equals("flex-config"))
                    {
                        throw new SAXConfigurationException(
                            new ConfigurationException.IncorrectElement(rootElement, qname, this.source, locator.getLineNumber()),
                            locator);
                    }
                }
                final ParseContext ctx = new ParseContext();
                contextStack.push(ctx);
                return;
            }

            final ParseContext ctx = contextStack.peek();

            if (ctx.ignore)
            {
                // ignore starting new elements
                return;
            }

            if (text.length() > 0)
            {
                // Only leave nodes can have CDATA as option values.
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedCDATA(this.source, locator.getLineNumber()),
                        locator);
            }

            final String fullname = ConfigurationBuffer.varname(qname, ctx.base);

            if (ctx.item != null)
            {
                throw new SAXConfigurationException(
                        new ConfigurationException.UnexpectedElement(qname, contextPath, locator.getLineNumber()),
                        locator);
            }
            else if (ctx.var != null)
            {
                // we're setting values for a variable

                if (ctx.varArgCount == 1)
                {
                    // oops, we weren't expecting more than one value!

                    throw new SAXConfigurationException(
                            new ConfigurationException.UnexpectedElement(qname, source, locator.getLineNumber()),
                            locator);
                }
                ctx.item = qname;
            }
            else if (cfgbuf.isValidVar(fullname))
            {
                ctx.var = fullname;
                ctx.varArgCount = cfgbuf.getVarArgCount(ctx.var);
                ctx.append = false;
                final String append = attributes.getValue(ATTRIBUTE_APPEND);
                if (append != null)
                {
                    if (append.equalsIgnoreCase("true") || append.equalsIgnoreCase("false"))
                        ctx.append = Boolean.valueOf(append).booleanValue();
                    else
                        throw new SAXConfigurationException(
                                new ConfigurationException.BadAppendValue(
                                        ctx.var,
                                        source,
                                        locator.getLineNumber()),
                                locator);
                }
            }
            else if (isSubTree(fullname))
            {
                final ParseContext newctx = new ParseContext();
                newctx.base = fullname;
                contextStack.push(newctx);
            }
            else
            {
                if (ignoreUnknownItems)
                {
                    // push a new context and ignore everything until we get the end 
                    // of this element.
                    ParseContext newctx = new ParseContext();
                    newctx.item = qname;
                    newctx.ignore = true;
                    contextStack.push(newctx);
                    return;
                }
                System.err.println("Unknown tag:" + fullname);
                throw new SAXConfigurationException(
                        new ConfigurationException.UnknownVariable(
                                                    fullname, source, locator.getLineNumber()),
                        locator);
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



