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

On Thu, Apr 15, 2004 at 01:42:37PM +0200, Kasimier Buchcik wrote:

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 ?

  thanks a lot for this anyway :-)


Daniel Veillard      | Red Hat Network
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]