/*
 * Text.c : implementation of the Text interface as defined by
 *       Document Object Model (Core) Level 1
 *       http://www.w3.org/TR/WD-DOM/level-one-core.html
 * 
 * Daniel.Veillard@w3.org
 *
 * $Id: Text.c,v 1.1 1998/06/15 02:40:35 daniel Exp $
 */

#include "config.h"
#include <stdio.h>
#include "Text.h"

/*
 * Append the string at the end of the text node.
 */
void domText_append(domTextPtr txt, char *data) {
    if (txt == NULL) return;
    if (txt->type != DOM_NODE_TEXT) return;
    if (data == NULL) return;
    /* TODO !!! */
    fprintf(stderr, "domText_append : not implemented\n");
}

/*
 * Insert a substring at a given offset.
 */
void domText_insert(domTextPtr txt, int offset, char *data) {
    if (txt == NULL) return;
    if (txt->type != DOM_NODE_TEXT) return;
    if (data == NULL) return;
    /* TODO !!! */
    fprintf(stderr, "domText_insert : not implemented\n");
}

/*
 * Delete a range of characters.
 */
void domText_delete(domTextPtr txt, int offset, int count) {
    if (txt == NULL) return;
    if (txt->type != DOM_NODE_TEXT) return;
    if (count <= 0) return;
    /* TODO !!! */
    fprintf(stderr, "domText_delete : not implemented\n");
}

/*
 * Replace a range of charatcers.
 */
void domText_replace(domTextPtr txt, int offset, int count, char *data) {
    if (txt == NULL) return;
    if (txt->type != DOM_NODE_TEXT) return;
    if (count <= 0) return;
    if (data == NULL) return;
    /* TODO !!! */
    fprintf(stderr, "domText_replace : not implemented\n");
}

/*
 * Replace a range of text by the new element, and the old range is
 * pruned as a child of the new element.
 */
void domText_splice(domTextPtr txt, domElementPtr elem, int offset, int count) {
    if (txt == NULL) return;
    if (txt->type != DOM_NODE_TEXT) return;
    if (elem == NULL) return;
    /* TODO !!! */
    fprintf(stderr, "domText_splice : not implemented\n");
}


