Package com.volantis.mcs.dom.dtd

Examples of com.volantis.mcs.dom.dtd.DTD


        builder.setElementModel("base", ElementModel.EMPTY);
        builder.setElementModel("DIVIDE HINT", ElementModel.EMPTY);
        builder.setElementModel("KEEPTOGETHER", ElementModel.EMPTY);

        DTD dtd = builder.buildDTD();

        DocumentWriter dw = dtd.createDocumentWriter(writer);

        DOMDocumentOutputter outputter = new DOMDocumentOutputter(
                dw, encoder);

        try {
View Full Code Here


        element.setAttribute("href", "B&Q");
        element.setAttribute("other", "A<B");

        SGMLDTDBuilder builder = new SGMLDTDBuilder();
        builder.addNonReplaceableAttribute("href");
        DTD dtd = builder.buildDTD();

        checkOutput(dtd, element, "<a href=\"B&Q\" other=\"A&lt;B\"></a>");
    }
View Full Code Here

        SGMLDTDBuilder builder = new SGMLDTDBuilder();
        builder.setElementModel("br", ElementModel.EMPTY);
        builder.setElementModel("empty", ElementModel.EMPTY);
        builder.setEndTagOptional("br");
        DTD dtd = builder.buildDTD();

        checkOutput(dtd, root, "<div><br><empty/></div>");
    }
View Full Code Here

    protected abstract DTDBuilder createDTDBuilder();

    public void testIgnoreableElement() throws IOException {
        DTDBuilder builder = createDTDBuilder();
        builder.addIgnorableElement("ignoreable");
        DTD dtd = builder.buildDTD();

        Element root = domFactory.createElement("root");
        Element normal = domFactory.createElement("normal");
        root.addTail(normal);
        normal.addTail(domFactory.createText("hello"));
View Full Code Here

            int maximumLineLength = getMaximumLineLength();

            XMLDTDBuilder builder = new XMLDTDBuilder();
            builder.setMaximumLineLength(maximumLineLength);

            DTD dtd = builder.buildDTD();

            DocumentOutputter outputter = new DOMDocumentOutputter(
                dtd.createDocumentWriter(writer), getCharacterEncoder());

            outputter.output(outputBuffer.getRoot());

            preContent = writer.toString();
            boolean requiresSub = false;
View Full Code Here

        String content = null;
        StringWriter writer = new StringWriter();

        XMLDTDBuilder builder = new XMLDTDBuilder();
        DTD dtd = builder.buildDTD();

        DocumentOutputter outputter = new DOMDocumentOutputter(
            dtd.createDocumentWriter(writer), getCharacterEncoder());

        try {
            outputter.output(dom.getRoot());
            content = writer.toString();
View Full Code Here

     *
     * @return The document outputter.
     */
    public DocumentOutputter createDocumentOutputter(Writer writer) {

        DTD dtd = protocolConfiguration.getDTD();
        DocumentWriter documentWriter = dtd.createDocumentWriter(writer);

        return new DOMDocumentOutputter(documentWriter, getCharacterEncoder());
    }
View Full Code Here

        String content = null;
        StringWriter writer = new StringWriter();

        XMLDTDBuilder builder = new XMLDTDBuilder();
        DTD dtd = builder.buildDTD();

        DocumentOutputter outputter = new DOMDocumentOutputter(
            dtd.createDocumentWriter(writer), getCharacterEncoder());

        try {
            outputter.output(prevOutputBuffer.getRoot());
            content = writer.toString();
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.dtd.DTD

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.