[xml] Line number value limit

2009-11-12 Thread Csaba Raduly
Why is the line number in xmlNode limited to an unsigned short ?
Doesn't libxml2 handle XML files with more than 65535 lines?

Also, the code which performs the truncation of the value in SAX2.c
(line 1601) is wrong.

if (ctxt-linenumbers) {
if (ctxt-input != NULL) {
if (ctxt-input-line  65535)
ret-line = (short) ctxt-input-line;
else
ret-line = 65535;
}
}

The cast should be to (unsigned short)

Csaba
-- 
Life is complex, with real and imaginary parts
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Line number value limit

2009-11-12 Thread Stefan Behnel
Hi,

Csaba Raduly, 12.11.2009 10:29:
 Why is the line number in xmlNode limited to an unsigned short ?

Because it's a trade-off between space and usefulness. Note that the parser
reports line numbers without that limitation. Only the xmlNode struct
restricts it.

This is a FAQ, BTW. You can look up the details in the mailing list archives.


 Doesn't libxml2 handle XML files with more than 65535 lines?

The reported line number does in no way imply any limitations of the parser.

Stefan
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Line number value limit

2009-11-12 Thread Csaba Raduly
On Thu, Nov 12, 2009 at 10:49 AM, Stefan Behnel stefan...@behnel.de wrote:
 Hi,

 Csaba Raduly, 12.11.2009 10:29:
 Why is the line number in xmlNode limited to an unsigned short ?

 Because it's a trade-off between space and usefulness. Note that the parser
 reports line numbers without that limitation.

That turns out not to be the case, at least when calling
xmlGetLastError. Line numbers never go above 65535 in xmlLastError (at
least when using SAX2), even though the member in xmlError is int.

-- 
Life is complex, with real and imaginary parts
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


[xml] LibXML2 digitally signed?

2009-11-12 Thread Michael Shang
Hi
 
I would like to know where I can find a version of the LibXML2library with the 
32bits and 64bits dlls digitally signed?
The one I downloaded on the website did not contain digital signature.
 
Does the current license allows any company that use these dlls to digitally 
sign them?
 
Thank you very much for your time and your help.
 
Best regards
Michael


  ___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


[xml] Regarding libxml schema validation

2009-11-12 Thread Sudhindra Kulkarni
Hi,

I have a problem validating a xml generated from a schema which contains an
element having xs:any namespace=##other /. When I try to include a
element from another schema I get an error

No matching global element declaration available but demanded by the strict
wildcard

I have included all the schemas required for the xml file but still get this
error while validating the xml. Any help in this regard would be very
helpful, is this is a limitation of libxml? The same xml I am able to
validate using xmlspy as well as microsoft visual studio.

Regards,
Sudhindra
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml