Re: xpathDefaultNamespace attribute on xs:assertion

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.devel
Message-ID <CANGHzgAgeg-V796mxGLar3jzTCV773NL3NP-K+yDzPUdm0j+LQ@mail.gmail.com>
Hi Mike,

On Tue, May 31, 2022 at 5:15 PM Michael Kay <[email protected]> wrote:

> I agree it's not very useful, because it's very unlikely that an assertion
> on a simple type will reference element names or type names, other than the
> built-in XSD atomic type names; but it's there for completeness. For
> example you can write
>
> <xs:assertion xpathDefaultNamespace="http://www.w3.org/2001/XMLSchema"
> test="$value castable as dateTime"/>
>
> It's there for orthogonality. If there are lots of use cases for putting
> the attribute on xs:assert, but only a rather slender use case for putting
> it on xs:assertion, then it's better to put it on both for the sake of
> consistency.
>

Thanks for the answer. That's very helpful to know.


-- 
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.