Example #1
0
  /**
   * Get the ISchemaAttribute corresponding to this IDocumentAttributeNode
   *
   * @param attr
   * @param extensionPoint the extension point of the schema, if <code>null</code> it will be
   *     deduced
   * @return the ISchemaAttribute for <code>attr</code>
   */
  public static ISchemaAttribute getSchemaAttribute(
      IDocumentAttributeNode attr, String extensionPoint) {
    ISchemaElement ele = getSchemaElement(attr.getEnclosingElement(), extensionPoint);
    if (ele == null) return null;

    return ele.getAttribute(attr.getAttributeName());
  }