Package net.java.textilej.parser.builder

Examples of net.java.textilej.parser.builder.DocBookDocumentBuilder


  public String parse(String textileContent) throws Exception {
   
    StringWriter out = new StringWriter();
   
   
    DocBookDocumentBuilder builder = new DocBookDocumentBuilder(out) {
      @Override
      protected XmlStreamWriter createXmlStreamWriter(Writer out) {
        return super.createFormattingXmlStreamWriter(out);
      }
    };
    builder.setBookTitle(bookTitle);

    TextileParser textileParser = new TextileParser();
   
    textileParser.setBuilder(builder);
    textileParser.setDialect(new ConfluenceDialect());
View Full Code Here


        writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(docbookOutputFile)),"utf-8");
      } catch (Exception e) {
        throw new BuildException(String.format("Cannot write to file '%s': %s",docbookOutputFile,e.getMessage()),e);
      }
      try {
        DocBookDocumentBuilder builder = new DocBookDocumentBuilder(writer) {
          @Override
          protected XmlStreamWriter createXmlStreamWriter(Writer out) {
            return super.createFormattingXmlStreamWriter(out);
          }
        };
        TextileParser parser = new TextileParser();
        parser.setBuilder(builder);
        parser.setDialect(new ConfluenceDialect());
        builder.setBookTitle(name);
        parser.parse(textile);
      } finally {
        try {
          writer.close();
        } catch (Exception e) {
View Full Code Here

    }
   
    StringWriter out = new StringWriter();
   
   
    DocBookDocumentBuilder builder = new DocBookDocumentBuilder(out) {
      @Override
      protected XmlStreamWriter createXmlStreamWriter(Writer out) {
        return super.createFormattingXmlStreamWriter(out);
      }
    };
    builder.setBookTitle(bookTitle);

    MarkupParser textileParser = new MarkupParser();
   
    textileParser.setBuilder(builder);
    textileParser.setDialect(dialect);
View Full Code Here

        writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(docbookOutputFile)),"utf-8");
      } catch (Exception e) {
        throw new BuildException(String.format("Cannot write to file '%s': %s",docbookOutputFile,e.getMessage()),e);
      }
      try {
        DocBookDocumentBuilder builder = new DocBookDocumentBuilder(writer) {
          @Override
          protected XmlStreamWriter createXmlStreamWriter(Writer out) {
            return super.createFormattingXmlStreamWriter(out);
          }
        };
        MarkupParser parser = new MarkupParser();
        parser.setDialect(new TextileDialect());
        parser.setBuilder(builder);
        builder.setBookTitle(bookTitle==null?name:bookTitle);
        if (doctype != null) {
          builder.setDoctype(doctype);
        }
        parser.parse(textile);
      } finally {
        try {
          writer.close();
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.builder.DocBookDocumentBuilder

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.