Re: [xml] Better hash function for dict.c

2008-04-22 Thread Daniel Veillard
On Sun, Apr 20, 2008 at 10:51:38AM +0200, Stefan Behnel wrote: Hi again (and sorry for all the noise), Stefan Behnel wrote: If an application benefits from a different hash function depends on the vocabulary it uses in its XML files. A slow but well distributing hash function performs

Re: [xml] Better hash function for dict.c

2008-04-22 Thread Daniel Veillard
On Sat, Apr 19, 2008 at 06:59:33PM +0200, Stefan Behnel wrote: Hi, Daniel Veillard wrote: On Thu, Apr 17, 2008 at 10:05:03AM -0400, Daniel Veillard wrote: Since you seems to be interested in the performances of the hash algorithm, I tried to drop the string comparisons on lookup when

Re: [xml] Better hash function for dict.c

2008-04-22 Thread Aron Stansvik
2008/4/22, Daniel Veillard [EMAIL PROTECTED]: On Sun, Apr 20, 2008 at 10:51:38AM +0200, Stefan Behnel wrote: Hi again (and sorry for all the noise), Stefan Behnel wrote: If an application benefits from a different hash function depends on the vocabulary it uses in its XML files.

[xml] schema validation usage.

2008-04-22 Thread j.s.bach
Hello All, for a schema validation: after getting a valid parser ptr from xmlSchemaNewValidCtxt, is it all to use the xmlSchemaValidateDoc for right validation? I use the Doc method cause parsing is done via xmlReadFile in my code. Then free every ptr? Cheers,

[xml] xmlSchemaValidateDoc: return value -1 ?

2008-04-22 Thread j.s.bach
Hello all, I have a valid xsd and xml which i can validate with xmllint tool: [EMAIL PROTECTED]:[~/cp_comModell/lib/xml] xmllint --noout --schema processor.xsd enhanced_processor.xml enhanced_processor.xml validates Now if i use xmlSchemaValidateDoc(schema_valid_ptr, doc), it delivers a

Re: [xml] xmlSchemaValidateDoc: return value -1 ?

2008-04-22 Thread ashwin sinha
Hi , Is -1 thought for successfull validation? Can you put a bit doc at least on what should be expected for return values? /** * xmlSchemaValidateDoc: * @ctxt: a schema validation context * @doc: a parsed document tree * * Validate a document tree in memory. * * Returns 0 if the

Re: [xml] Patch to improve HTMLparser's robustness

2008-04-22 Thread Daniel Veillard
On Tue, Apr 22, 2008 at 03:56:33PM +0200, Arnold Hendriks wrote: Daniel Veillard wrote: I didn't forgot about the issue, and got a bit of time to test yesterday and look at it. First the patch makes senses it fixes a serious problem, there is no leak, that's fine, but the result is still

Re: [xml] xmlSchemaValidateDoc: return value -1 ?

2008-04-22 Thread j.s.bach
ok, thanx for the reply. do i make the api/interna's crash? Here is my code: xmlDocPtr doc ; xmlSchemaParserCtxtPtr schema_parser_ptr ; xmlSchemaPtr schema_ptr ; xmlSchemaValidCtxtPtr schema_valid_ptr ; int valid; LIBXML_TEST_VERSION ; if( (schema_parser_ptr =

Re: [xml] Patch to improve HTMLparser's robustness

2008-04-22 Thread Liam R E Quin
On Tue, 2008-04-22 at 15:56 +0200, Arnold Hendriks wrote: Can I cheat? :) Given the fact that nothing should appear between /body and /html, and /html is always the last tag, its' easiest to just ignore them and let the autoclose deal with it... In practice I expect it's not uncommon to

Re: [xml] Query regardin storing of encoding information

2008-04-22 Thread Ashwin
On Mon, Apr 14, 2008 at 10:09:51AM +0530, Nagesh wrote: Daniel, what in the case when the xml document being parsed is in a different encoding (apart from UTF-8 and UTF-16) and the document does not contain any internal or external subset, in this case, ctxt-encoding is never set. Any