Examples of TagStack


Examples of info.bliki.wiki.tags.util.TagStack

            WPList.InternalList subList = (WPList.InternalList) element;
            beginLaTeXTag(_out, subList);
            renderSubListLaTeX(subList, converter, _out, model);
            endLaTeXTag(_out, subList);
          } else {
            TagStack stack = ((WPListElement) element).getTagStack();
            if (stack != null) {
              converter.nodesToText(stack.getNodeList(), _out, model);
            }
            // wikiModel.appendStack(((WPListElement)
            // element).getTagStack());
          }
        }
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

        beginLaTeXTag(_out, subList);
        // recursive call:
        renderSubListLaTeX(subList, converter, _out, wikiModel);
        _out.append(PropertyManager.get("List.Item.End"));
      } else {
        TagStack stack = ((WPListElement) element).getTagStack();
        converter.nodesToText(stack.getNodeList(), _out, wikiModel);
        // wikiModel.appendStack(((WPListElement)
        // element).getTagStack());
      }

      if ((i < list.size() - 1) && list.get(i + 1) instanceof WPListElement) {
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

      }
    }
  }

  public void renderLaTeX(WPCell cell, ITextConverter converter, Appendable _out, IWikiModel wikiModel) throws IOException {
    TagStack tagStack = cell.getTagStack();
    int cellType = cell.getType();
    if (tagStack != null) {
      boolean hasLBrks = false;
      List<BaseToken> list = tagStack.getNodeList();
      for (int i = 0; i < list.size(); i++) {
        if (list.get(i) instanceof BrTag) {
          hasLBrks = true;
          break; // for
        }
      }

      if (cellType == WPCell.TH) {
        _out.append(PropertyManager.get("Table.HeaderCell.Begin"));
      }
      if (hasLBrks) {
        _out.append(PropertyManager.get("Table.CellWithLBreaks.Begin"));
      }
      converter.nodesToText(tagStack.getNodeList(), _out, wikiModel);

      if (hasLBrks) {
        _out.append(PropertyManager.get("Table.CellWithLBreaks.End"));
      }
      if (cellType == WPCell.TH) {
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

   * @param rawHead
   * @param headLevel
   */
  public ITableOfContent appendHead(String rawHead, int headLevel, boolean noToC, int headCounter, int startPosition,
      int endPosition) {
    TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(), this, true, true);

    WPTag headTagNode = new WPTag("h" + headLevel);
    TagNode spanTagNode = new TagNode("span");
    // Example:
    // <h2><span class="mw-headline" id="Header_level_2">Header level
    // 2</span></h2>
    spanTagNode.addChildren(localStack.getNodeList());
    headTagNode.addChild(spanTagNode);
    String tocHead = headTagNode.getBodyString();
    String anchor = Encoder.encodeDotUrl(tocHead);
    createTableOfContent(false);
    if (!noToC && (headCounter > 3)) {
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

        if (type != null) {
          clazzValue = type + clazzValue;
        }
        captionTagNode.addAttribute("class", clazzValue, false);
        //     
        TagStack localStack = WikipediaParser.parseRecursive(caption, this, true, true);
        captionTagNode.addChildren(localStack.getNodeList());
        String altAttribute = imageFormat.getAlt();
        if (altAttribute == null) {
          altAttribute = captionTagNode.getBodyString();
          imageFormat.setAlt(Encoder.encodeHtml(altAttribute));// see issue #25
        }
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

      fWikiListener = null;
      fFormatter = null;
      fToCSet = null;
      fTableOfContent = null;
      fTableOfContentTag = null;
      fTagStack = new TagStack();
      fReferences = null;
      fReferenceNames = null;
      fRecursionLevel = 0;
      fTemplateRecursionCount = 0;
      fSectionCounter = 0;
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

  public void setUp() {
    fFormatter = null;
    fToCSet = null;
    fTableOfContent = null;
    fTableOfContentTag = null;
    fTagStack = new TagStack();
    fReferences = null;
    fReferenceNames = null;
    fRecursionLevel = 0;
    fTemplateRecursionCount = 0;
    fRedirectLink = null;
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

  /**
   * {@inheritDoc}
   */
  public TagStack swapStack(TagStack stack) {
    TagStack temp = fTagStack;
    fTagStack = stack;
    return temp;
  }
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

   * @param rawHead
   * @param headLevel
   */
  public ITableOfContent appendHead(String rawHead, int headLevel, boolean noToC, int headCounter, int startPosition,
      int endPosition) {
    TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(), this, true, true);

    WPTag headTagNode = new WPTag("h" + headLevel);
    TagNode spanTagNode = new TagNode("span");
    // Example:
    // <h2><span class="mw-headline" id="Header_level_2">Header level
    // 2</span></h2>
    spanTagNode.addChildren(localStack.getNodeList());
    headTagNode.addChild(spanTagNode);
    String tocHead = headTagNode.getBodyString();
    String anchor = Encoder.encodeDotUrl(tocHead);
    createTableOfContent(false);
    if (!noToC && (headCounter > 3)) {
View Full Code Here

Examples of info.bliki.wiki.tags.util.TagStack

      if (type != null) {
        clazzValue = type + clazzValue;
      }
      captionTagNode.addAttribute("class", clazzValue, false);
      //     
      TagStack localStack = WikipediaParser.parseRecursive(caption, this, true, true);
      captionTagNode.addChildren(localStack.getNodeList());
      String altAttribute = imageFormat.getAlt();
      if (altAttribute == null) {
        altAttribute = captionTagNode.getBodyString();
        imageFormat.setAlt(Encoder.encodeHtml(altAttribute));// see issue #25
      }
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.