<commit_before>"Represents a _node_ in the HTML document."
shared abstract class Node(
    "The name of this node."
    shared String nodeName,
    "The attributes associated with this node."
    shared Attributes attributes = [],
    "The children of this node."
    shared default {Content<Node>*} children = [])
        of Comment | Raw | ProcessingInstruction | Element {
    
    "A string representing this node and all children."
    shared actual String string {
        value builder = StringBuilder();
        renderTemplate(this, builder.append);
        return builder.string;
    }
    
}


"Alias for node child type. Usually parameterized with _category_ interface 
 to define permitted node content."
shared alias Content<Item> => 
        <CharacterData|<Item&Node>> |
        <CharacterData|<Item&Node>>() |
        {<CharacterData|<Item&Node>>*} |
        {<CharacterData|<Item&Node>>*}() |
        Null;


"Alias for nodes that contains character data."
shared alias CharacterData => String | Raw | Comment | ProcessingInstruction;


"Represents a _comment_ in the HTML document, although it is generally not visually shown, 
 such comments are available to be read in the source view. Comments are represented as 
 content between &lt;!-- and --&gt;."
shared class Comment(
    "The textual data contained in this comment."
    shared String data)
        extends Node("#comment") {
    
    shared actual {String+} children = { data };
    
}

"Represents _raw HTML_."
shared class Raw(
	"The raw HTML content"
	shared String data) 
    extends Node("raw") {
    
    shared actual {String+} children = { data };
}

"Represents a _processing instruction_."
shared class ProcessingInstruction(<commit_msg>Updated documentation for `Raw`<commit_after>"Represents a _node_ in the HTML document."
shared abstract class Node(
    "The name of this node."
    shared String nodeName,
    "The attributes associated with this node."
    shared Attributes attributes = [],
    "The children of this node."
    shared default {Content<Node>*} children = [])
        of Comment | Raw | ProcessingInstruction | Element {
    
    "A string representing this node and all children."
    shared actual String string {
        value builder = StringBuilder();
        renderTemplate(this, builder.append);
        return builder.string;
    }
    
}


"Alias for node child type. Usually parameterized with _category_ interface 
 to define permitted node content."
shared alias Content<Item> => 
        <CharacterData|<Item&Node>> |
        <CharacterData|<Item&Node>>() |
        {<CharacterData|<Item&Node>>*} |
        {<CharacterData|<Item&Node>>*}() |
        Null;


"Alias for nodes that contains character data."
shared alias CharacterData => String | Raw | Comment | ProcessingInstruction;


"Represents a _comment_ in the HTML document, although it is generally not visually shown, 
 such comments are available to be read in the source view. Comments are represented as 
 content between &lt;!-- and --&gt;."
shared class Comment(
    "The textual data contained in this comment."
    shared String data)
        extends Node("#comment") {
    
    shared actual {String+} children = { data };
    
}

"Represents _raw HTML_. Raw content is not escaped."
shared class Raw(
	"The raw HTML content"
	shared String data) 
    extends Node("raw") {
    
    shared actual {String+} children = { data };
}

"Represents a _processing instruction_."
shared class ProcessingInstruction(
{'fraction_non_alphanumeric': 0.09519725557461406, 'fraction_numerical': 0.0, 'mean_word_length': 3.246359223300971, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5262004', 'n_tokens_mistral': 907, 'n_tokens_neox': 874, 'n_words': 365}