Re: regular expression matching in <assert>

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <CABuuzNO8riTw9p-mFWonnvLFpF=i2f3pT2qj6X4DtpaEVmGCCQ@mail.gmail.com>
Hi Jim,
    Our XSD 1.1 <assert> implementation can use XPath 2.0 matches()
and tokenize() functions fine. Our <assert> XPath 2.0 processor passes
all W3C XPath 2.0 tests.

I've checked your example with current Xerces SVN, and I don't find
any bug wrt your example. I can see, that you use the
xpathDefaultNamespace attribute on <assert> which may be causing
issues.

If you can post a complete XSD schema document along with an XML
instance document, we could debug better.

On Wed, Apr 17, 2013 at 12:12 AM, Jim Barnett
<[email protected]> wrote:
> Are matches() and tokenize() supported inside <assert> when doing schema
> validation?  I am applying an assertion to an element with a ‘target’
> attribute whose value is “s1 s2”, yet the following assertion is failing:
>
>
>
> <xsd:assert test="if (matches(@target, '.*')) then true()  else false()"
> xpathDefaultNamespace="##targetNamespace"/>
>
>
>
> Any guidance would be appreciated.
>
>
>
> Thanks,
>
> Jim



-- 
Regards,
Mukul Gandhi
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.