Package org.apache.tapestry.util.xml

Examples of org.apache.tapestry.util.xml.DocumentParseException


    public void begin(String namespace, String name, Attributes attributes) throws Exception
    {
        String id = getValue(attributes, "id");

        if (id.equals(INamespace.FRAMEWORK_NAMESPACE))
            throw new DocumentParseException(
                Tapestry.format(
                    "SpecificationParser.framework-library-id-is-reserved",
                    INamespace.FRAMEWORK_NAMESPACE),
                getResourceLocation());
    }
View Full Code Here


        if (Tapestry.isBlank(text))
            return;

        if (_value != null)
        {
            throw new DocumentParseException(
                Tapestry.format("SpecificationParser.no-attribute-and-body", "value", name),
                getResourceLocation());
        }

        _value = text.trim();
View Full Code Here

    }

    public void end(String namespace, String name) throws Exception
    {
        if (_value == null)
            throw new DocumentParseException(
                Tapestry.format("SpecificationParser.required-extended-attribute", name, "value"),
                getResourceLocation());

        IPropertyHolder holder = (IPropertyHolder) digester.peek();
View Full Code Here

            String type = getValue(attributes, "type");

            _converter = (IConverter) CONVERSION_MAP.get(type);

            if (_converter == null)
                throw new DocumentParseException(
                    Tapestry.format("SpecificationParser.unknown-static-value-type", type),
                    getResourceLocation());

        }
View Full Code Here

        {
            if (Tapestry.isBlank(text))
                return;

            if (_value != null)
                throw new DocumentParseException(
                    Tapestry.format("SpecificationParser.no-attribute-and-body", "value", name),
                    getResourceLocation());

            _value = text.trim();
        }
View Full Code Here

        }

        public void end(String namespace, String name) throws Exception
        {
            if (_value == null)
                throw new DocumentParseException(
                    Tapestry.format(
                        "SpecificationParser.required-extended-attribute",
                        name,
                        "value"),
                    getResourceLocation());
View Full Code Here

        if (Tapestry.isBlank(text))
            return;

        if (_valueSet)
        {
            throw new DocumentParseException(
                Tapestry.format(
                    "SpecificationParser.no-attribute-and-body",
                    _attributeName,
                    name),
                getResourceLocation());
View Full Code Here

    }

    public void end(String namespace, String name) throws Exception
    {
        if (!_valueSet && _required)
            throw new DocumentParseException(
                Tapestry.format(
                    "SpecificationParser.required-extended-attribute",
                    name,
                    _attributeName),
                getResourceLocation());
View Full Code Here

        String type = getValue(attributes, "type");

        if (Tapestry.isBlank(copyOf))
        {
            if (Tapestry.isBlank(type))
                throw new DocumentParseException(
                    Tapestry.format("SpecificationParser.missing-type-or-copy-of", id),
                    getResourceLocation());

            return;
        }

        if (Tapestry.isNonBlank(type))
            throw new DocumentParseException(
                Tapestry.format("SpecificationParser.both-type-and-copy-of", id),
                getResourceLocation());

        IComponentSpecification spec = (IComponentSpecification) digester.getRoot();

        IContainedComponent source = spec.getComponent(copyOf);
        if (source == null)
            throw new DocumentParseException(
                Tapestry.format("SpecificationParser.unable-to-copy", copyOf),
                getResourceLocation());

        IContainedComponent target = (IContainedComponent) digester.peek();
View Full Code Here

        {
            return _resolver.findClass(className);
        }
        catch (Exception ex)
        {
            throw new DocumentParseException(
                Tapestry.format("ScriptParser.unable-to-resolve-class", className),
                parser.getDocumentLocation(),
                parser.getLocation(),
                ex);
        }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.util.xml.DocumentParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.