Re: [xml] validate by schema works but only after reparsing ?
- From: Peter Sobisch <petersob gmx net>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] validate by schema works but only after reparsing ?
- Date: Tue, 8 Jul 2003 12:47:04 +0200
Hi Daniel,
On Mon, Jul 07, 2003 at 06:48:07PM +0200, Peter Sobisch wrote:
Parsing the data the pointer will be set properly, therefore I had have
to save first and than reparse the data.
Is it an intentional behaviour not updating the content pointer ?
on what kind of node ? On an element, yes ! An element content is stored
in the children list, not on content !
oups, of course, my fault.
I went through my code and added a print statement after xmlNodeSetContent
with node->content, without thinking about the child :-)
well, now I discovered my "ghost" content value of a element node.
If xmlLineNumbersDefaultValue is set to TRUE , the parser stores
line numbers into node->content:
SAX.c/startElement():
...
1373 if (ctxt->linenumbers) {
1374 if (ctxt->input != NULL)
1375 ret->content = (void *) (long) ctxt->input->line;
1376 }
...
after adding element nodes with xmlNewChild or similar, they have NULL pointer
in content (exactly as you said). But the validation code seems
to except there line numbers (or whatever I didn't look there).
Of course, the text nodes have the right content pointer at this place.
It is intentional behaviour storing line numbers into content ?
(in text nodes content don't contain the line number)
best Regards,
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]