RE: assert with count function does not work
"Cronemberger, Constantino" <[email protected]>
| Newsgroups | gmane.text.xml.xerces-j.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have downloaded the referred revision:
$ svn info
Path: .
Working Copy Root Path: /cygdrive/c/development/xml-schema-1.1-dev
URL: https://svn.apache.org/repos/asf/xerces/java/branches/xml-schema-1.1-dev
Repository Root: https://svn.apache.org/repos/asf
Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
Revision: 1414220
Node Kind: directory
Schedule: normal
Last Changed Author: mukulg
Last Changed Rev: 1414220
Last Changed Date: 2012-11-27 13:06:55 -0200 (Tue, 27 Nov 2012)
But still got the same problem.
I have created a simple test app which is attached in this e-mail. All jars used are from SVN.
Regards,
Constantino
Constantino Cronemberger
_____________________________________________________________________________
<http://www.gft.com/cebit> [cid:logo]
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<http://www.gft.com/br>
www.gft-blog.com.br<http://www.gft-blog.com.br>
www.twitter.com/gft_br<http://www.twitter.com/gft_br>
_____________________________________________________________________________
________________________________
From: Mukul Gandhi [[email protected]]
Sent: Sunday, December 09, 2012 12:28
To: [email protected]
Subject: Re: assert with count function does not work
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]<mailto:[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> [cid:logo]
GFT Brasil Consultoria Informática Ltda.
Av. Sao Francisco, 98
18.095-450 Sorocaba
BRASIL
T +55 15 3332 9720<tel:%2B55%2015%203332%209720>
F +55 15 3332 9711<tel:%2B55%2015%203332%209711>
[email protected]<mailto:[email protected]>
www.gft.com/br<http://www.gft.com/br>
www.gft-blog.com.br<http://www.gft-blog.com.br>
www.twitter.com/gft_br<http://www.twitter.com/gft_br>
_____________________________________________________________________________
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
logo
(image/jpeg, 4.4 KB) - not displayed
logo
(image/jpeg, 4.4 KB) - not displayed
XSDTest.zip
(application/x-zip-compressed, 16.1 KB) - not displayed