Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlDocumentProperties


        public boolean isStandalone ( )
        {
            checkChanged();

            XmlDocumentProperties props = _locale.getDocProps( getStreamCur(), false );

            return props == null ? false : props.getStandalone();
        }
View Full Code Here


            return new PiccoloSaxLoader(new Piccolo());
        }

        void postLoad(Cur c)
        {
            XmlDocumentProperties props = getDocProps(c, true);

            props.setEncoding(_piccolo.getEncoding());
            props.setVersion(_piccolo.getVersion());

            super.postLoad(c);
        }
View Full Code Here

        }

        protected void emitDocType(String docTypeName, String publicId, String systemId) {
            ensureDoc();

            XmlDocumentProperties props = Locale.getDocProps(_nodeCur, true);
            props.setDoctypeName(docTypeName);
            props.setDoctypePublicId(publicId);
            props.setDoctypeSystemId(systemId);
        }
View Full Code Here

        Cur c = context.finish();

        associateSourceName(c, options);

        XmlDocumentProperties props = getDocProps(c, true);

        props.setDoctypeSystemId(systemId);
        props.setEncoding(encoding);
        props.setVersion(version);
        props.setStandalone(standAlone);

        return c;
    }
View Full Code Here

        Cur c = context.finish();

        associateSourceName(c, options);

        XmlDocumentProperties props = getDocProps(c, true);

        props.setEncoding(encoding);
        props.setVersion(version);
        props.setStandalone(standAlone);

        return c;
    }
View Full Code Here

        if (ConnectorDocument.type.equals(xmlObject.schemaType())) {
            XmlBeansUtil.validateDD(xmlObject);
            return (ConnectorDocument) xmlObject;
        }
        XmlCursor cursor = xmlObject.newCursor();
        XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
        String publicId = xmlDocumentProperties.getDoctypePublicId();
        try {
            if ("-//Sun Microsystems, Inc.//DTD Connector 1.0//EN".equals(publicId)) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd";
View Full Code Here

                XmlObject result = xmlObject.changeType(WebAppDocument.type);
                XmlBeansUtil.validateDD(result);
                return (WebAppDocument) result;
            }

            XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
            String publicId = xmlDocumentProperties.getDoctypePublicId();
            if ("-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".equals(publicId) ||
                    "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN".equals(publicId)) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    moveable.toStartDoc();
View Full Code Here

    }


    public static boolean convertToSchema(XmlCursor cursor, String namespace, String schemaLocationURL, String version) {
        //remove dtd
        XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_NAME);
        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_PUBLIC_ID);
        xmlDocumentProperties.remove(XmlDocumentProperties.DOCTYPE_SYSTEM_ID);
        //convert namespace
        boolean isFirstStart = true;
        while (cursor.hasNextToken()) {
            if (cursor.isStart()) {
                if (namespace.equals(cursor.getName().getNamespaceURI())) {
View Full Code Here

        if (ConnectorDocument.type.equals(xmlObject.schemaType())) {
            XmlBeansUtil.validateDD(xmlObject);
            return (ConnectorDocument) xmlObject;
        }
        XmlCursor cursor = xmlObject.newCursor();
        XmlDocumentProperties xmlDocumentProperties = cursor.documentProperties();
        String publicId = xmlDocumentProperties.getDoctypePublicId();
        try {
            if ("-//Sun Microsystems, Inc.//DTD Connector 1.0//EN".equals(publicId)) {
                XmlCursor moveable = xmlObject.newCursor();
                try {
                    String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd";
View Full Code Here

        Cur c = context.finish();

        associateSourceName(c, options);

        XmlDocumentProperties props = getDocProps(c, true);

        props.setDoctypeSystemId(systemId);
        props.setEncoding(encoding);
        props.setVersion(version);
        props.setStandalone(standAlone);

        return c;
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.XmlDocumentProperties

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.