[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-dev
Subject:    Re: [xml-dev] xpathDefaultNamespace attribute on xs:assertion
From:       Mukul Gandhi <mukulg () softwarebytes ! org>
Date:       2022-05-31 12:24:46
Message-ID: CANGHzgAgeg-V796mxGLar3jzTCV773NL3NP-K+yDzPUdm0j+LQ () mail ! gmail ! com
[Download RAW message or body]

Hi Mike,

On Tue, May 31, 2022 at 5:15 PM Michael Kay <mike@saxonica.com> 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

[Attachment #3 (text/html)]

<div dir="ltr"><div>Hi Mike,</div><div><br></div><div dir="ltr">On Tue, May 31, 2022 \
at 5:15 PM Michael Kay &lt;<a \
href="mailto:mike@saxonica.com">mike@saxonica.com</a>&gt; wrote:<br></div><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
style="overflow-wrap: break-word;">I agree it&#39;s not very useful, because it&#39;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&#39;s there for \
completeness. For example you can write<div><br></div><div>&lt;xs:assertion \
xpathDefaultNamespace=&quot;<a href="http://www.w3.org/2001/XMLSchema" \
target="_blank">http://www.w3.org/2001/XMLSchema</a>&quot; test=&quot;$value castable \
as dateTime&quot;/&gt;<br><div><br></div><div>It&#39;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&#39;s better to put it on \
both for the sake of \
consistency.</div></div></div></blockquote><div><br></div><div>Thanks for the answer. \
That&#39;s very helpful to know.  </div><div>  </div></div><div><br></div>-- <br><div \
dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Mukul \
Gandhi</div></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic