Re: [xml] Query regarding xml schema

On Wed, Oct 17, 2007 at 10:48:11AM +0800, nagesh wrote:

   Hi Daniel,

             While  going  through  the  xml  schema  code, I rather some
   discrepancy.  Please  have  a  look  at  the same. The schema function
   xmlSchemaVCheckCVCSimpleType(  )  takes only 8 parameters, but however
   in  some  places in the scheama file where this function is invoked, 9
   parameters  are  passed  to this function, with xmlSchemaParserCtxtPtr
   passed     as    the    second    parameter.    But    the    function
   xmlSchemaVCheckCVCSimpleType(   )   takes  xmlNodePtr  as  the  second
   parameter,  due  to  which the parameters passed to this function will
   not be correct.

            I am referring to Libxml2-2.6.28 version code base.

   For Ex:

   In the function, xmlSchemaParseCheckCOSValidDefault( ), line no: 15743
   when  invoke  the  function, xmlSchemaVCheckCVCSimpleType( ), pctxt is
   passed as an extra parameter to this function.

  I think you are confused:

         ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
                     type, value, val, 1, 1, 0);

in C parameters are separated by comma, there is only 8 parameters, 
ACTXT_CAST is a macro (as the all upercase convention indicates)
which does a cast of the first parameter.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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