Re: assert with count function does not work
Mukul Gandhi <[email protected]>
| Newsgroups | gmane.text.xml.xerces-j.user |
|---|---|
| Message-ID | <CABuuzNOdJs8dF7AnhBQ3M1u7vz82xm+gx5za5cJmAqb2_kwEAQ@mail.gmail.com> |
Hi Constantino,
The latest Xerces-J commit produced SVN version 1414220. With this, the
problem you've reported doesn't exist.
Can you please try with the latest Xerces SVN version.
On Fri, Dec 7, 2012 at 10:42 PM, Cronemberger, Constantino <
[email protected]> wrote:
> Hi,
>
> I have the following snippet in my XSD 1.1:
>
> <xs:complexType name="columns">
> <xs:sequence>
> <xs:element name="column" type="xs:string"
> maxOccurs="unbounded"/>
> </xs:sequence>
> <xs:attribute name="count" type="xs:int" use="required"/>
> <xs:assert test="@count eq count(./column)" />
> </xs:complexType>
>
> And when I try to validate this XML it fails:
>
> <columns count="3">
> <column>Description</column>
> <column/>
> <column>Name</column>
> </columns>
>
> with the following message:
>
> org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 15;
> cvc-assertion: Assertion evaluation ('@count eq count(./column)') for
> element 'columns' on schema type 'columns' did not succeed.
>
> When I replace "@count" by "0" it works, so it looks like the count
> function is not working. I tried to call the function "countX" and got the
> error message: "XPST0017 - Function does not exist: countX arity: 1."
>
> I have used the revision 1418386 on
> https://svn.apache.org/repos/asf/xerces/java/branches/xml-schema-1.1-dev.
>
> Any ideas of why this is happening?
>
> Thanks,
>
> *Constantino Cronemberger*
>
> ****
>
>
> _____________________________________________________________________________
>
> ****
>
> * <http://www.gft.com/cebit>*
>
> *
> GFT Brasil Consultoria Informática Ltda.*
> **
>
> **
>
> Av. Sao Francisco, 98
>
> 18.095-450 Sorocaba
>
> BRASIL
>
> ** **
>
> T +55 15 3332 9720
>
> F +55 15 3332 9711
>
> [email protected]
>
> www.gft.com/br
>
> www.gft-blog.com.br
>
> www.twitter.com/gft_br
>
>
> _____________________________________________________________________________
>
>
> --
> Regards,
> Mukul Gandhi
>
>
logo
(image/jpeg, 4.4 KB) - not displayed