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 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
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>
_____________________________________________________________________________
logo (image/jpeg, 4.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.