Package com.volantis.mcs.wbsax

Examples of com.volantis.mcs.wbsax.ReferenceResolver


            throws WBDOMException {
       
        // Set up for the serialisation.
        // This involves setting up for the creation of an output string table
        // if there was an input string table.
        ReferenceResolver resolver;
        StringTable outputStringTable = null;
        StringTable inputStringTable = document.getStringTable();
        if (inputStringTable != null && inputStringTable.size() > 0) {
            outputStringTable = new StringTable();
            StringReferenceFactory references  = new StringReferenceFactory(
                    outputStringTable, document.getStringFactory());
            resolver = new CopyReferenceResolver(references);           
        } else {
            resolver = new NullReferenceResolver();
        }
        initialiseSerialisers(resolver);
       
        // Serialise the document.
        try {
            // Kick off the document.
            handler.startDocument(document.getVersion(),
                    document.getPublicId(), document.getCodec(),
                    outputStringTable, document.getStringFactory());
            // Visit down in to the document to serialise it.
            visitElement(document.getRootElement());
            // Complete the output string table, if neccessary.
            resolver.markComplete();
            // Finish off the document.
            handler.endDocument();
        } catch (WBSAXException e) {           
            throw new WBDOMException(
                        exceptionLocalizer.format("wbdom-document-write-error"),
View Full Code Here

TOP

Related Classes of com.volantis.mcs.wbsax.ReferenceResolver

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.