<commit_before>package dom

/*
 * Part of the xml/dom Go package
 *
 * Declares the interfaces from DOM Core Level 3
 * http://www.w3.org/TR/DOM-Level-3-Core/
 *
 * Copyright (c) 2009, <NAME>
 * Copyright (c) 2009, <NAME>
 */ 

// TODO: split this out into separate interfaces again eventually


// DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247
type Node interface {
  AppendChild(Node) Node;
  RemoveChild(Node) Node;
  InsertBefore(Node, Node) Node
  ReplaceChild(Node, Node) Node
  // attributes
  NodeName() string;
  NodeValue() string;
  NodeType() int;
  ParentNode() Node;
  ChildNodes() NodeList;
  Attributes() NamedNodeMap;
  HasChildNodes() bool;
  FirstChild() Node;
  LastChild() Node;
  PreviousSibling() Node;
  NextSibling() Node;

  // internal interface methods needed for implementations (not part of the DOM)
  setParent(Node);
  insertChildAt(Node,uint);
  removeChild(Node);
}

// DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614
type Element interface {
  Node;
  TagName() string;
  GetAttribute(name string) string;
  SetAttribute(name string, value string);
  OwnerDocument() Document;
  GetElementsByTagName(name string) NodeList;
}

// DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document
type Document interface {
  Node;
  DocumentElement() Element;
  CreateElement(tagName string) Element;
  OwnerDocument() Document;
  // DOM Level 2
  GetElementById(id string) Element;
}

// http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-FF21A306
type CharacterData interface {
  Node;
}

// DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1312295772
type Text interface {
  CharacterData;
  OwnerDocument() Document;
}

// http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-637646024
type Attr interface {
  Node;
  OwnerDocument() Document;
}

// DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177
type NodeList interface {
  Length() uint;
  Item(index uint) Node;
}

// http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1780488922
type NamedNodeMap interface {
  Length() uint;
  Item(index uint) Node;
}
<commit_msg>Stripped semicolons, grouped in type block<commit_after>package dom

/*
 * Part of the xml/dom Go package
 *
 * Declares the interfaces from DOM Core Level 3
 * http://www.w3.org/TR/DOM-Level-3-Core/
 *
 * Copyright (c) 2009, <NAME>
 * Copyright (c) 2009, <NAME>
 */ 

// TODO: split this out into separate interfaces again eventually

type (
  // DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1950641247
  Node interface {
    AppendChild(Node) Node
    RemoveChild(Node) Node
    InsertBefore(Node, Node) Node
    ReplaceChild(Node, Node) Node
    // attributes
    NodeName() string
    NodeValue() string
    NodeType() int
    ParentNode() Node
    ChildNodes() NodeList
    Attributes() NamedNodeMap
    HasChildNodes() bool
    FirstChild() Node
    LastChild() Node
    PreviousSibling() Node
    NextSibling() Node
  
    // internal interface methods needed for implementations (not part of the DOM)
    setParent(Node)
    insertChildAt(Node,uint)
    removeChild(Node) Node
  }
  
  // DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-745549614
  Element interface {
    Node
    TagName() string
    GetAttribute(name string) string
    SetAttribute(name string, value string)
    OwnerDocument() Document
    GetElementsByTagName(name string) NodeList
  }
  
  // DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document
  Document interface {
    Node
    DocumentElement() Element
    CreateElement(tagName string) Element
    OwnerDocument() Document
    // DOM Level 2
    GetElementById(id string) Element
  }
  
  // http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-FF21A306
  CharacterData interface {
    Node
  }
  
  // DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1312295772
  Text interface {
    CharacterData
    OwnerDocument() Document
  }
  
  // http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-637646024
  Attr interface {
    Node
    OwnerDocument() Document
  }
  
  // DOM3: http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177
  NodeList interface {
    Length() uint
    Item(index uint) Node
  }
  
  // http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1780488922
  NamedNodeMap interface {
    Length() uint
    Item(index uint) Node
  }
)

{'fraction_non_alphanumeric': 0.13108356290174472, 'fraction_numerical': 0.04361799816345271, 'mean_word_length': 3.267384916748286, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 18, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3903160', 'n_tokens_mistral': 1623, 'n_tokens_neox': 1505, 'n_words': 327}