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

Re: [xml] 'XML Schema - "union" patch'



On Thu, Apr 15, 2004 at 06:59:57PM -0400, Daniel Veillard wrote:
> On Thu, Apr 15, 2004 at 01:42:37PM +0200, Kasimier Buchcik wrote:
> > Hi,
> > 
> > You may find attached a patch that tries to implement the handling of 
> > the "union" XML Schema item. Note that validation of "union" is not very 
> > performant, since the "memberTypes" attributes has to be evaluated every 
> > time a validation occurs. This should not be a final implementation of 
> > "union", but I see no other simple way of implementing it. Feel free to 
> > modify it (especially the dictionary stuff during validation, since I 
> > did know better).
> 
>   Hi Kasimier,
> 
> sorry for not answering on the previous question, I honnestly didn't remember
> the details of the implementation and I am busy with other stuff right now.
> I applied both patches to my CVs checkout, fixed a few warnings (mostly
> signed/unsigned char stuff) then tried to validate the example you gave
> with the resulting xmllint, but this fails:
> 
> paphio:~/XML -> ./xmllint --noout --schema xsd_union_test.xsd xsd_union_test.xmlxsd_union_test.xml:3: element em: Schemas validity error : Failed to validate type union 5
> xsd_union_test.xml fails to validate
> paphio:~/XML ->
> 
>   I'm a bit puzzled. I also tried to remove the warning fix and apply purely
> your patches but got the same result. So I didn't commited the patches.
> Can you double check with CVS ? The patches applied cleanly and I have
> little time right now to chase this, could you double check with a CVS
> checkout ?

  Okay after getting a fixed XML which actually validates, I included your
patch and the test in the regression suite. I also fixed a memory leak
(the prefix value) introduced, it's a good idea to run the regression suite
"make tests" or the specific test with memory debug configured in, see:
  http://xmlsoft.org/xmlmem.html#Debugging

  thanks a lot !

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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