<div>I'm not very familar about spec. Here is text from <strong><em>XML Schema 2nd Edtion</em></strong>, O'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 I know that validator integrated in oXygen XML editor 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> </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's all. </div>
<div> </div>
<div> </div>
<div><br> </div>
<div><span class="gmail_quote">On 5/15/08, <b class="gmail_sendername">Mark Overmeer</b> <<a href="mailto:mark@overmeer.net">mark@overmeer.net</a>> 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>> In my XSD, content of 'name' element should be matched with pattern<br>
> '[a-zA-Z_][a-zA-Z_0-9]*', if I write name such as "23_kk", it is not started<br>> with alphabet, thus violates the pattern restriction, XML::Compile::Schema<br>> reports:<br>> "error: string `23_kk' does not match pattern<br>
> (?-xism:^(?:[a-zA-Z_][a-zA-Z_0-9]*)$) at xregister/name#facet"<br><br>Ah. But that's correct behavior, isn't it?<br>That's not the bug-report.> xs:ID restriction guarantees content of element is unique in XML instance<br>
> file. I apply this restriction on 'name' element to make every content of<br>> 'name' element be unique in XML file. XML::Compile::Schema does not check<br>> this unique restriction.<br><br>Is it the validator's task to guarentee that it is unique, or the user's<br>
task> What do the specs say?<br>--<br>Regards,<br> MarkOv<br><br>------------------------------------------------------------------------<br> Mark Overmeer MSc MARKOV Solutions<br>
Mark@Overmeer.net <a href="mailto:solutions@overmeer.net">solutions@overmeer.net</a><br><a href="http://Mark.Overmeer.net">http://Mark.Overmeer.net</a> <a href="http://solutions.overmeer.net">http://solutions.overmeer.net</a><br>
<br></blockquote></div><br>