Re: [xml] libxml2-2.6.22 tests

2005-12-09 Thread Daniel Veillard
On Thu, Dec 08, 2005 at 03:44:14PM -0800, Manish Marathe wrote:
 Hello,
 
 If I run libxml2-2.6.22 tests by two different ways
 
 1 way:
 
 ./runtest
 ./runsuite
 ./testapi
 
a) 546 errors for Microsoft schema tests
b) 27 errors for Sun schema tests
 
 2) way:
 
 make tests / make check
 
a) 558 errors for Microsoft schema tests
b) 38 failures and not errors for Sun schema tests
 
 Why is the number of errors for MS and SUN schema tests different in
 both ways.

  because it's not the same exact testing code.

 Although the total number of tests ran for each of the schema
 tests were same in both the cases, which are: 7230 for MS and 193 for
 SUN
 
 Having that said which is the right way to execute tests?

  depends what you're trying to do and your platform.

Daniel

-- 
Daniel Veillard  | Red Hat http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Generating XML

2005-12-09 Thread Daniel Veillard
On Thu, Dec 08, 2005 at 06:50:27PM -0800, Aruna2005 (sent by Nabble.com) wrote:
 I am new to handling XML. 
 I am required to parse a document and produce an XML document.
 
 Would XMLBeans help achieve this? Is there a better way to do this? I am not 
 sure how to go about generating the XML.  I can obtain the parsed data but 
 not sure how to produce an XML file for it. 
 
 A sample program is appreciated toojust need to know what jars are 
 required to support?

  this mailing-list is about libxml2, not about the Java XML stack.

Daniel

-- 
Daniel Veillard  | Red Hat http://redhat.com/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml


Re: [xml] libxml2-2.6.22 tests

2005-12-09 Thread Kasimier Buchcik
Hi,

On Fri, 2005-12-09 at 04:29 -0500, Daniel Veillard wrote:
 On Thu, Dec 08, 2005 at 03:44:14PM -0800, Manish Marathe wrote:
  Hello,
  
  If I run libxml2-2.6.22 tests by two different ways
  
  1 way:
  
  ./runtest
  ./runsuite
  ./testapi
  
 a) 546 errors for Microsoft schema tests
 b) 27 errors for Sun schema tests
  
  2) way:
  
  make tests / make check
  
 a) 558 errors for Microsoft schema tests
 b) 38 failures and not errors for Sun schema tests
  
  Why is the number of errors for MS and SUN schema tests different in
  both ways.
 
   because it's not the same exact testing code.

'make tests' uses the Python test runner for the XML Schema test
suite; it's in xstc/xstc.py.
The difference is that the Python code will mark an _instance_ test as
failed if the _schema_ was already evaluated to be invalid. On the other
hand runsuite.c tries to validate the instance using XSI if the schema
was invalid.

  Although the total number of tests ran for each of the schema
  tests were same in both the cases, which are: 7230 for MS and 193 for
  SUN
  
  Having that said which is the right way to execute tests?
 
   depends what you're trying to do and your platform.

True.

However, I changed runsuite.c to eliminate the difference. You get
equal results from both sides now: runsuite.c revision 1.14.

Regards,

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


[xml] misc warnings compiling libxml2-2.6.22 (cvs snapshot dloaded 2005/12/09) with HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005]

2005-12-09 Thread Rick Jones
Out of curiousity I downloaded the cvs snapshot on 2005-12-09 which expanded to 
2.6.22, and tried compiling it on an HP-UX 11.23 Itanium (ia64) system with HP 
aC++/ANSI C B3910B A.06.05 [Jul 25 2005].


A few pseudo-random observations/questions...

This one may have been overly picky on the part of the compiler:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c parserInternals.c  +Z -DPIC -o .libs/parserInternals.lo
parserInternals.c, line 1883: warning #2068-D: integer conversion resulted in 
a change of sign

  return (-1);
 ^

(I'm not sure if the -Wp,-H3 stuff is required on the ia64 platform, I have 
a question in to a compiler contact on that one)


cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c HTMLparser.c +Z -DPIC -o .libs/HTMLparser.lo
HTMLparser.c, line 4782: warning #2550-D: variable oldname was set but never 
used

const xmlChar *name, *oldname;
  ^

Some stuff that probably wants a cast and some unreachable code:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c xpath.c  +Z -

DPIC -o .libs/xpath.lo
xpath.c, line 2915: warning #2513-D: a value of type void * cannot be 
assigned to an entity of

type xmlXPathFunction
  XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt-funcHash, name, ns_uri);
 ^

xpath.c, line 10483: warning #2513-D: a value of type void * cannot be 
assigned to an entity of

 type xmlXPathFunction
  XML_CAST_FPTR(func) = op-cache;
  ^

xpath.c, line 11095: warning #2128-D: loop is not reachable from preceding 
code
  do {
  ^


next:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c xmlschemas.c +Z -DPIC -o .libs/xmlschemas.lo

xmlschemas.c, line 2500: warning #2550-D: variable is_not was set but never 
used
  int i, is_not;
 ^

xmlschemas.c, line 7992: warning #2550-D: variable ns was set but never used
xmlNsPtr ns;
 ^

xmlschemas.c, line 13235: warning #2111-D: statement is unreachable
  return (0);
  ^

xmlschemas.c, line 13279: warning #2111-D: statement is unreachable
  return (NULL);
  ^

xmlschemas.c, line 17781: warning #2111-D: statement is unreachable
  return (0);
  ^


This one caught my eye:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c xmlschemastypes.c  +Z -DPIC -o .libs/xmlschemastypes.lo
xmlschemastypes.c, line 1699: warning #2186-D: pointless comparison of 
unsigned integer with zero

  if ((ret != 0) || (*cur != 0) || !VALID_DATETIME(((dt-value.date
^

xmlschemastypes.c, line 1699: warning #2186-D: pointless comparison of 
unsigned integer with zero

  if ((ret != 0) || (*cur != 0) || !VALID_DATETIME(((dt-value.date
^

This one brings-up another point:

cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c xmlmodule.c+Z -DPIC -o .libs/xmlmodule.lo
xmlmodule.c, line 284: warning #2167-D: argument of type void ** is 
incompatible with parameter

 of type shl_t *
  rc = shl_findsym(handle, name, TYPE_UNDEFINED, symbol);
   ^

With PA2.0W (64-bit PA) and with IPF/ia64, (either 32 bit or 64) there is 
support for dlopen et al.  In fact, the shl_findsym manpage has this to say:


  Future HP-UX environments may not support these routines and flags or
  may only support a subset of them.  Instead, they will use the SVR4
  dynamic loading API.  Users are encouraged to migrate to the dl*
  family of dynamic linking routines.  See the dlclose(3C), dlerror(3C),
  dlget(3C), dlgetname(3C), dlmodinfo(3C), dlopen(3C), and dlsym(3C) man
  pages for more information.


for some reason while I'm typing the above I am getting a feeling of deja vu. 
anyway...


cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g 
-Wp,-H3 -c schematron.c +Z -DPIC -o .libs/schematron.lo
schematron.c, line 1000: warning #2177-D: function xmlSchematronLoadInclude 
was declared but ne

ver referenced
  xmlSchematronLoadInclude(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr cur)
  ^

next:

source='testapi.c' object='testapi.o' libtool=no \
depfile='.deps/testapi.Po' tmpdepfile='.deps/testapi.TPo' \
depmode=none /bin/sh ./depcomp \
cc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include  -D_REENTRANT 
-g -Wp,-H3 -c `test -f 'testapi.c' || echo './'`testapi.c
testapi.c, line 286: warning #2068-D: integer conversion resulted in a change 
of sign

  if (no == 2) return('ΓΈ');
 ^

testapi.c, line 299: warning #2068-D: integer conversion resulted in a change 
of sign

  return(-1);
^

testapi.c, 

Re: [xml] misc warnings compiling libxml2-2.6.22 (cvs snapshot dloaded 2005/12/09) with HP aC++/ANSI C B3910B A.06.05 [Jul 25 2005]

2005-12-09 Thread Rick Jones

Rick Jones wrote:
(I'm not sure if the -Wp,-H3 stuff is required on the ia64 platform, 
I have a question in to a compiler contact on that one)


My compiler contact has stated that the -Wp,-H3 bit is only required on 
IPF/ia64 if one uses +legacy_cpp, so this in configure:


if test ${GCC} != yes ; then
case ${host} in
  *-*-hpux* )
   CFLAGS=${CFLAGS} -Wp,-H3
   ;;
  *-dec-osf* )
   CFLAGS=${CFLAGS} -ieee
   ;;
  alpha*-*-linux* )
   CFLAGS=${CFLAGS} -ieee
   ;;
esac

might be changed to:

if test ${GCC} != yes ; then
case ${host} in
  hppa*-*-hpux* )
   CFLAGS=${CFLAGS} -Wp,-H3
   ;;
  *-dec-osf* )
   CFLAGS=${CFLAGS} -ieee
   ;;
  alpha*-*-linux* )
   CFLAGS=${CFLAGS} -ieee
   ;;
esac

so it only hits when hppa is in the first part as in hppa2.0w-hp-hpux11.11 
etc  I tried that on my IPF system and it seems to get at least as far as the 
original.  Now, there were ancient Motorola 68K-based systems running HP-UX, the 
last OS release for those was HP-UX 9.10 and somehow I suspect that noone is 
trying to compile libxml2 on those, so having it only tweak on hppa*... is 
likely OK, and I've no idea if the HP compilers back then for 68K even took the 
-Wp,-H3 flags anyway :)


sincerely,

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


[xml] Problem parsing with python?

2005-12-09 Thread Jim
I am processin an xml file wil python ... i think there maybe is a bug
in the library ... but i am not a xml spec guru ...

The file I am processing is basically:
--

?xml version=1.0 encoding=iso-8859-1?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
!--some html code--
--

The leading line before ?xml ... seems to cause problems.
Specifically:

parser error : XML declaration allowed only at the start of the
document

Jim

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