[gdome]Bug in DocumentType?
- From: Tobias Peters <t-peters gmx de>
- To: gdome gnome org
- Subject: [gdome]Bug in DocumentType?
- Date: Sat, 14 Jul 2001 21:55:29 GMT
When I load a document from a file, in validating mode, the DocumentType
node of that document exhibits strage behaviour:
method hasChildNodes returns true, while firstChild and lastChild are
both null (as they should). This does not happen when I use LOAD_PARSING.
Attached is a small example showing the problem. What is happening here?
Bye, Tobias
#include <stdio.h>
#include <gdome.h>
int main (int argc, char **argv) {
GdomeDOMImplementation *domimpl;
GdomeDocument *doc;
GdomeDocumentType *parsed_doctype;
GdomeDocumentType *built_doctype;
unsigned short exc = 0;
int exception_tracker = 0;
domimpl = gdome_di_mkref();
doc = gdome_di_createDocFromMemory(
domimpl,
"<?xml version=\"1.0\"?>"
"<!DOCTYPE array SYSTEM \"http://cardwords.berlios.de/cgtp.dtd\">"
"<array array_id=\"us_scrabble\" s1=\"15\" s2=\"15\" s3=\"1\">"
"<array_hash>07a5f326629e3a4b8c72de8abd8f030c</array_hash></array>",
GDOME_LOAD_VALIDATING,
&exc);
exception_tracker += exc;
parsed_doctype = gdome_doc_doctype(doc, &exc);
exception_tracker += exc;
if (gdome_dt_hasChildNodes(parsed_doctype, &exc)) {
exception_tracker += exc;
printf("Parsed_doctype has child nodes! First child has adress %p\n",
gdome_dt_firstChild(parsed_doctype, &exc));
}
exception_tracker += exc;
if (exception_tracker) printf("Exception!\n");
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]