Re: [gdome]DTD loading



On Fri, 2002-08-30 at 12:50, Christopher Gutteridge wrote:
> OK. I've written my first C/DOM program and I still get the problem. It's
> allegedly an Exception 0 (zero) which was not very helpful.
> 
> I attach the program. Hopefully it's not something weird and local to my
> machine or other horrors.

well, I found the reason. libxml2 does not clone document fragment
nodes, it just returns NULL. I had a quick look at the DOM
specification, it says that cloning a Document is implementation
dependent, but it says nothing about DocumentFragment, so I assume it is
legal to clone it. Maybe Daniel can give us some more details. I would
imagine it is quite easy to clone a DocumentFragment as well, I don't
think it poses any new problems.

I also investigated a bit the DTD loading issue. There is a flag in
Gdome you can use to give attributes their default value from the DTD.
Basically you have to use the mode

	GDOME_LOAD_PARSING | GDOME_LOAD_COMPLETE_ATTRS
	
I don't know if this is enough to load the external DTD. I would ask you
to try. In case it is not enough, we can provide another flag and use
Daniel's suggestion.

Cheers,
luca





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]