1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

- HTMLparser.c HTMLtree.[ch] SAX.c testHTML.c tree.c: fixed HTML

support for SCRIPT and STYLE with help from Bjorn Reese
- test/HTML/* result/HTML/*: added simple testcase and updated
  the existing ones.
Daniel
This commit is contained in:
Daniel Veillard
2000-10-14 23:38:43 +00:00
parent ff9c330753
commit 7eda8452f8
17 changed files with 390 additions and 230 deletions

View File

@ -420,6 +420,27 @@ charactersDebug(void *ctx, const xmlChar *ch, int len)
fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);
}
/**
* cdataDebug:
* @ctxt: An XML parser context
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* receiving some cdata chars from the parser.
* Question: how much at a time ???
*/
void
cdataDebug(void *ctx, const xmlChar *ch, int len)
{
unsigned char output[40];
int inlen = len, outlen = 30;
htmlEncodeEntities(output, &outlen, ch, &inlen, 0);
output[outlen] = 0;
fprintf(stdout, "SAX.cdata(%s, %d)\n", output, len);
}
/**
* referenceDebug:
* @ctxt: An XML parser context
@ -572,6 +593,8 @@ xmlSAXHandler debugSAXHandlerStruct = {
errorDebug,
fatalErrorDebug,
getParameterEntityDebug,
cdataDebug,
NULL
};
xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;