Examples of OutlineItem


Examples of net.java.textilej.parser.outline.OutlineItem

  }
 
  public String parse(String textileSource) {
    OutlineParser parser = new OutlineParser();
   
    OutlineItem root = parser.parse(textileSource);
   
    StringWriter out = new StringWriter(8096);
   
    XmlStreamWriter writer = createXmlStreamWriter(out);
   
    writer.writeStartDocument("utf-8","1.0");
   
    writer.writeStartElement("toc");
    writer.writeAttribute("topic", getHtmlFile());
    writer.writeAttribute("label", getBookTitle());
   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
View Full Code Here

Examples of net.java.textilej.parser.outline.OutlineItem

      }
    }

    public void emit(DocumentBuilder builder, Matcher matcher) {
      OutlineParser outlineParser = new OutlineParser();
      OutlineItem rootItem = outlineParser.parse(textile);
     
      emitToc(rootItem);
    }
View Full Code Here

Examples of net.java.textilej.parser.outline.OutlineItem

    if (dialect == null) {
      throw new IllegalStateException();
    }
    OutlineParser parser = new OutlineParser(dialect);
   
    OutlineItem root = parser.parse(markupContent);
   
    StringWriter out = new StringWriter(8096);
   
    XmlStreamWriter writer = createXmlStreamWriter(out);
   
    writer.writeStartDocument("utf-8","1.0");
   
    writer.writeStartElement("toc");
    writer.writeAttribute("topic", getHtmlFile());
    writer.writeAttribute("label", getBookTitle());
   
    emitToc(writer,root.getChildren());
   
    writer.writeEndElement(); // toc
   
    writer.writeEndDocument();
    writer.close();
View Full Code Here

Examples of net.java.textilej.parser.outline.OutlineItem

    if (!getDialect().isFilterGenerativeContents()) {
      String options = matcher.group(1);
      setOptions(options);
     
      OutlineParser outlineParser = new OutlineParser(new ConfluenceDialect());
      OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
      emitToc(rootItem);
    }
    return -1;
  }
View Full Code Here

Examples of net.java.textilej.parser.outline.OutlineItem

          }
        }
      }
     
      OutlineParser outlineParser = new OutlineParser(new TextileDialect());
      OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
     
      emitToc(rootItem);
    }
    return -1;
  }
View Full Code Here

Examples of org.eclipse.mylyn.wikitext.core.parser.outline.OutlineItem

      if (markupContent == null) {
        markupContent = readFully(source);
      }
      performValidation(source, markupContent);

      OutlineItem outline = new OutlineParser(markupLanguage).parse(markupContent);

      Writer writer;
      try {
        writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(outputFile)), "utf-8"); //$NON-NLS-1$
      } catch (Exception e) {
        throw new BuildException(MessageFormat.format(Messages.getString("MarkupToDitaTask.11"), outputFile, //$NON-NLS-1$
            e.getMessage()), e);
      }
      try {
        if (topicStrategy == BreakStrategy.NONE) {
          DitaTopicDocumentBuilder builder = new DitaTopicDocumentBuilder(new DefaultXmlStreamWriter(writer),
              formatting);
          builder.setRootTopicTitle(bookTitle);

          MarkupParser parser = new MarkupParser();
          parser.setMarkupLanguage(markupLanguage);
          parser.setBuilder(builder);
          if (topicDoctype != null) {
            builder.setDoctype(topicDoctype);
          }
          builder.setFilename(outputFile.getName());
          builder.setOutline(outline);

          parser.parse(markupContent);
        } else {
          DitaBookMapDocumentBuilder builder = new DitaBookMapDocumentBuilder(
              formatting ? new FormattingXMLStreamWriter(new DefaultXmlStreamWriter(writer))
                  : new DefaultXmlStreamWriter(writer));
          try {
            builder.setFormattingDependencies(formatting);

            MarkupParser parser = new MarkupParser();
            parser.setMarkupLanguage(markupLanguage);
            parser.setBuilder(builder);

            builder.setBookTitle(bookTitle == null ? name : bookTitle);

            if (doctype != null) {
              builder.setDoctype(doctype);
            }
            if (topicDoctype != null) {
              builder.setTopicDoctype(topicDoctype);
            }
            builder.setTargetFile(outputFile);
            builder.setTopicFolder(topicFolder);
            builder.setOutline(outline);
            switch (topicStrategy) {
            case FIRST:
              if (!outline.getChildren().isEmpty()) {
                builder.setTopicBreakLevel(outline.getChildren().get(0).getLevel());
              } else {
                builder.setTopicBreakLevel(1);
              }
              break;
            case LEVEL1:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.