<div>I&#39;m not very familar about spec. Here is text from <strong><em>XML Schema 2nd Edtion</em></strong>, O&#39;Reilly, ISBN 0-596-00252-1, chapter 16 Datatype Reference Guide, xs:ID section:</div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Identifiers defined using this datatype are global to a document and provided a way to uniquely identify their containing element, whatever its type and name is. </div>
<div>The constraint added by this datatype beyond the xs:NCName datatype from which it is derived is that the values of all the attributes and elements that have and ID datatype in a document must be unique. </div></blockquote>
</div></blockquote></div></blockquote>
<div>And&nbsp;I know that validator integrated in oXygen XML editor&nbsp;for Eclipse also does such task. </div>
<div>So I guess validators should guarantee the unique restriction of xs:ID. After all, it is not difficult to implement, right? </div>
<div>&nbsp;</div>
<div>I quote the correct behavior is just to show my superise: xs:pattern based on xs:ID can be checked perfectly, but xs:ID itself is not checked. That&#39;s all. </div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br>&nbsp;</div>
<div><span class="gmail_quote">On 5/15/08, <b class="gmail_sendername">Mark Overmeer</b> &lt;<a href="mailto:mark@overmeer.net">mark@overmeer.net</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">* MENG Xin (<a href="mailto:zinces@gmail.com">zinces@gmail.com</a>) [080515 07:03]:<br>&gt; In my XSD, content of&nbsp;&nbsp;&#39;name&#39; element should be matched with pattern<br>
&gt; &#39;[a-zA-Z_][a-zA-Z_0-9]*&#39;, if I write name such as &quot;23_kk&quot;, it is not started<br>&gt; with alphabet, thus violates the pattern restriction, XML::Compile::Schema<br>&gt; reports:<br>&gt; &quot;error: string `23_kk&#39; does not match pattern<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;(?-xism:^(?:[a-zA-Z_][a-zA-Z_0-9]*)$) at xregister/name#facet&quot;<br><br>Ah.&nbsp;&nbsp;But that&#39;s correct behavior, isn&#39;t it?<br>That&#39;s not the bug-report.&gt; xs:ID restriction guarantees content of element is unique in XML instance<br>
&gt; file. I apply this restriction on &#39;name&#39; element to make every content of<br>&gt; &#39;name&#39; element be unique in XML file. XML::Compile::Schema does not check<br>&gt; this unique restriction.<br><br>Is it the validator&#39;s task to guarentee that it is unique, or the user&#39;s<br>
task&gt;&nbsp;&nbsp;What do the specs say?<br>--<br>Regards,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MarkOv<br><br>------------------------------------------------------------------------<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark Overmeer MSc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MARKOV Solutions<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark@Overmeer.net&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:solutions@overmeer.net">solutions@overmeer.net</a><br><a href="http://Mark.Overmeer.net">http://Mark.Overmeer.net</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://solutions.overmeer.net">http://solutions.overmeer.net</a><br>
<br></blockquote></div><br>