gpt4 book ai didi

org.sweble.wikitext.parser.nodes.WtXmlElement.getXmlAttributes()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 14:15:05 26 4
gpt4 key购买 nike

本文整理了Java中org.sweble.wikitext.parser.nodes.WtXmlElement.getXmlAttributes()方法的一些代码示例,展示了WtXmlElement.getXmlAttributes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WtXmlElement.getXmlAttributes()方法的具体详情如下:
包路径:org.sweble.wikitext.parser.nodes.WtXmlElement
类名称:WtXmlElement
方法名:getXmlAttributes

WtXmlElement.getXmlAttributes介绍

暂无

代码示例

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

static boolean isSameFormattingElement(WtNode e0, WtNode e1)
{
  if (e0 == e1)
    return true;
  ElementType t0 = getNodeType(e0);
  ElementType t1 = getNodeType(e1);
  if (t0 != t1)
    return false;
  if (e0.getNodeType() == WtNode.NT_XML_ELEMENT)
  {
    WtNodeList a0 = ((WtXmlElement) e0).getXmlAttributes();
    if (e1.getNodeType() == WtNode.NT_XML_ELEMENT)
    {
      return isSameAttributes(
          a0, ((WtXmlElement) e1).getXmlAttributes());
    }
    else if (a0 != null && !a0.isEmpty())
      return false;
  }
  else
  {
    if (e1.getNodeType() == WtNode.NT_XML_ELEMENT)
    {
      WtNodeList a1 = ((WtXmlElement) e1).getXmlAttributes();
      if (a1 != null && !a1.isEmpty())
        return false;
    }
  }
  return true;
}

代码示例来源:origin: sweble/sweble-wikitext

static boolean isSameFormattingElement(WtNode e0, WtNode e1)
{
  if (e0 == e1)
    return true;
  ElementType t0 = getNodeType(e0);
  ElementType t1 = getNodeType(e1);
  if (t0 != t1)
    return false;
  if (e0.getNodeType() == WtNode.NT_XML_ELEMENT)
  {
    WtNodeList a0 = ((WtXmlElement) e0).getXmlAttributes();
    if (e1.getNodeType() == WtNode.NT_XML_ELEMENT)
    {
      return isSameAttributes(
          a0, ((WtXmlElement) e1).getXmlAttributes());
    }
    else if (a0 != null && !a0.isEmpty())
      return false;
  }
  else
  {
    if (e1.getNodeType() == WtNode.NT_XML_ELEMENT)
    {
      WtNodeList a1 = ((WtXmlElement) e1).getXmlAttributes();
      if (a1 != null && !a1.isEmpty())
        return false;
    }
  }
  return true;
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

@Override
  public <T extends WtXmlElement> T addCssClass(T elem, String cssClass)
  {
    if (elem.getXmlAttributes().isEmpty())
      elem.setXmlAttributes(attrs(list()));

    for (WtNode attr : elem.getXmlAttributes())
    {
      if (attr == null || !(attr instanceof WtXmlAttribute))
        continue;

      WtXmlAttribute a = (WtXmlAttribute) attr;
      if (!a.getName().equals("class"))
        continue;

      if (!a.hasValue())
        a.setValue(value(list()));
      a.getValue().add(text(" " + cssClass));
    }

    return elem;
  }
}

代码示例来源:origin: sweble/sweble-wikitext

@Override
  public <T extends WtXmlElement> T addCssClass(T elem, String cssClass)
  {
    if (elem.getXmlAttributes().isEmpty())
      elem.setXmlAttributes(attrs(list()));

    for (WtNode attr : elem.getXmlAttributes())
    {
      if (attr == null || !(attr instanceof WtXmlAttribute))
        continue;

      WtXmlAttribute a = (WtXmlAttribute) attr;
      if (!a.getName().equals("class"))
        continue;

      if (!a.hasValue())
        a.setValue(value(list()));
      a.getValue().add(text(" " + cssClass));
    }

    return elem;
  }
}

代码示例来源:origin: org.sweble.wom3/sweble-wom3-swc-adapter

private Wom3ElementNode womFromXmlElement(WtXmlElement n, String womName)
{
  Wom3ElementNode womElement = genPushWom(womName);
  {
    appendRtd(womElement, n, 0);
    dispatchAppend(womElement, n.getXmlAttributes());
    appendRtd(womElement, n, 1);
    if (n.hasBody())
      processChildrenNoPush(n.getBody(), womElement);
    appendRtd(womElement, n, 2);
  }
  return pop(womElement);
}

代码示例来源:origin: sweble/sweble-wikitext

private Wom3ElementNode womFromXmlElement(WtXmlElement n, String womName)
{
  Wom3ElementNode womElement = genPushWom(womName);
  {
    appendRtd(womElement, n, 0);
    dispatchAppend(womElement, n.getXmlAttributes());
    appendRtd(womElement, n, 1);
    if (n.hasBody())
      processChildrenNoPush(n.getBody(), womElement);
    appendRtd(womElement, n, 2);
  }
  return pop(womElement);
}

代码示例来源:origin: org.sweble.wom3/sweble-wom3-swc-adapter

private Wom3Table tableFromElement(WtXmlElement n)
{
  Wom3Table table = (Wom3Table) genPushWom("table");
  inNoTextScope = true;
  {
    appendRtd(table, n, 0);
    dispatchAppend(table, n.getXmlAttributes());
    appendRtd(table, n, 1);
    if (n.hasBody())
      processChildrenNoPush(n.getBody(), table);
    appendRtd(table, n, 2);
  }
  inNoTextScope = false;
  return pop(table);
}

代码示例来源:origin: org.sweble.wom3/sweble-wom3-swc-adapter

private Wom3Pre preFromElement(WtXmlElement n)
{
  Wom3Pre pre = genPushWom("pre");
  {
    appendRtd(pre, n, 0);
    dispatchAppend(pre, n.getXmlAttributes());
    appendRtd(pre, n, 1);
    if (n.hasBody())
      processChildrenPushAppend(n.getBody(), genWom("nowiki"));
    appendRtd(pre, n, 2);
  }
  return pop(pre);
}

代码示例来源:origin: sweble/sweble-wikitext

private Wom3Table tableFromElement(WtXmlElement n)
{
  Wom3Table table = (Wom3Table) genPushWom("table");
  inNoTextScope = true;
  {
    appendRtd(table, n, 0);
    dispatchAppend(table, n.getXmlAttributes());
    appendRtd(table, n, 1);
    if (n.hasBody())
      processChildrenNoPush(n.getBody(), table);
    appendRtd(table, n, 2);
  }
  inNoTextScope = false;
  return pop(table);
}

代码示例来源:origin: sweble/sweble-wikitext

private Wom3Pre preFromElement(WtXmlElement n)
{
  Wom3Pre pre = genPushWom("pre");
  {
    appendRtd(pre, n, 0);
    dispatchAppend(pre, n.getXmlAttributes());
    appendRtd(pre, n, 1);
    if (n.hasBody())
      processChildrenPushAppend(n.getBody(), genWom("nowiki"));
    appendRtd(pre, n, 2);
  }
  return pop(pre);
}

代码示例来源:origin: org.sweble.wikitext/swc-engine

pt("<%s%!>", n.getName(), cleanAttribs(n.getXmlAttributes()));
  p.println();
  p.incIndent();
  pt("<%s%!>", n.getName(), cleanAttribs(n.getXmlAttributes()));
  p.incIndent();
  dispatch(n.getBody());
pt("<%s%! />", n.getName(), cleanAttribs(n.getXmlAttributes()));

代码示例来源:origin: sweble/sweble-wikitext

pt("<%s%!>", n.getName(), cleanAttribs(n.getXmlAttributes()));
  p.println();
  p.incIndent();
  pt("<%s%!>", n.getName(), cleanAttribs(n.getXmlAttributes()));
  p.incIndent();
  dispatch(n.getBody());
pt("<%s%! />", n.getName(), cleanAttribs(n.getXmlAttributes()));

代码示例来源:origin: sweble/sweble-wikitext

private SwcXmlElement convertGenericXmlElement(WtXmlElement n)
{
  SwcXmlElement element = genPushMww("xmlelement");
  {
    element.setTag(n.getName());
    appendRtd(element, n, 0);
    convertToExplicitMwwAttributes(element, n.getXmlAttributes());
    appendRtd(element, n, 1);
    if (n.hasBody())
      processChildrenPushAppend(n.getBody(), genMww("body"));
    appendRtd(element, n, 2);
  }
  return pop(element);
}

代码示例来源:origin: org.sweble.wom3/sweble-wom3-swc-adapter

private SwcXmlElement convertGenericXmlElement(WtXmlElement n)
{
  SwcXmlElement element = genPushMww("xmlelement");
  {
    element.setTag(n.getName());
    appendRtd(element, n, 0);
    convertToExplicitMwwAttributes(element, n.getXmlAttributes());
    appendRtd(element, n, 1);
    if (n.hasBody())
      processChildrenPushAppend(n.getBody(), genMww("body"));
    appendRtd(element, n, 2);
  }
  return pop(element);
}

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

attribs = ((WtXmlElement) template).getXmlAttributes();
copyElementRtd(suppressRtd, newElement, rtd);
break;

代码示例来源:origin: sweble/sweble-wikitext

public void visit(WtXmlElement n)
{
  p.print('<');
  p.print(n.getName());
  dispatch(n.getXmlAttributes());
  p.print(n.hasBody() ? ">" : " />");
  if (n.hasBody())
  {
    dispatch(n.getBody());
    p.print("</");
    p.print(n.getName());
    p.print('>');
  }
}

代码示例来源:origin: org.sweble.wikitext/swc-parser-lazy

public void visit(WtXmlElement n)
{
  p.print('<');
  p.print(n.getName());
  dispatch(n.getXmlAttributes());
  p.print(n.hasBody() ? ">" : " />");
  if (n.hasBody())
  {
    dispatch(n.getBody());
    p.print("</");
    p.print(n.getName());
    p.print('>');
  }
}

代码示例来源:origin: sweble/sweble-wikitext

attribs = ((WtXmlElement) template).getXmlAttributes();
copyElementRtd(suppressRtd, newElement, rtd);
break;

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com