You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jorge Williams <jo...@rackspace.com> on 2011/01/24 07:03:40 UTC

Schema 1.1 not validating maxOccurs correctly?


I'm attaching a small example:



Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse@rackspace.com, and delete the original message.
Your cooperation is appreciated.


Re: Schema 1.1 not validating maxOccurs correctly?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Jorge,

You've found a bug. It should still report an error in 1.1.

There's an index into a table which is off by one and that's allowing more
instances of 'test' to go through. I've just committed a fix [1] for this
defect to SVN. If you wanted to try patching the source it's only a one
line change.

Thanks.

[1] http://svn.apache.org/viewvc?view=revision&revision=1062852

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Jorge Williams <jo...@rackspace.com> wrote on 01/24/2011 01:03:40
AM:

> I'm attaching a small example:
>
> Validating the instance document with 2.11.0 returns:
>
> [Error] test.xml:7:11: cvc-complex-type.2.4.f: 'test' can occur a maximum
of
> '5' times in the current sequence. This limit was exceeded. No child
element
> is expected at this point.
>
> That's  correct, but performing the same validation with the Schema 1.1.
beta
> version doesn't return an error.  Am I missing something?  Shouldn't this
> still fail validation in 1.1?
>
> Thanks,
>
> -jOrGe W.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org