title: validation errors on validating xhtml11-model-1.xsd
body: <p>On generating XML files, I use xsd-files defined by OMG. Validating over the internet takes much too long. So, I downloaded all those files for local validation. This works for the simple cases. But on going forward, more complex structures must be validated. This includes validating xhtml-structures. Most of the xsd-files downloaded from <a href="http://www.w3.org/MarkUp/SCHEMA" rel="nofollow">http://www.w3.org/MarkUp/SCHEMA</a> have validation errors. On trying to solve them I concentrated on the file xhtml11-model-1.xsd to start, because this file contains a lot of basic definitions used by other xsd-files. The initial download file showed 71 validation errors! The downloaded file has no target name space declared, hence I added the declaration. Doing so reduced the amount of errors to 4. But at this point I got stuck. I simply have not found any mean to correct the remaining errors. I picked out one of those to analyze it as isolated case. See code below. The declaration of attributeGroup name=”xhtml.dir.attrib” can be found within the file xhtml-bdo-1.xsd. But this file neither pass validation, hence I copied the declaration into my test file for having all in one place. But on validating this simple case with eclipse Kepler, I get the error below on the ref to xhtml.dir.attrib:</p>
  
  <pre><code>&lt;xs:attributeGroup ref="xhtml.dir.attrib" /&gt;
  s4s-elt-must-match.1: The content of 'xhtml.I18n.extra.attrib' must match (annotation?, ((attribute | attributeGroup)*, anyAttribute?)). A problem was found starting at: attributeGroup.
  </code></pre>
  
  <p>What is wrong? Why a reference declares an error when the declaration shows to be correct. Is this a problem of the eclipse validator? My misunderstanding? Should I simply ignore these validation errors? Why xsd files downloaded from w3.org do not have the targetNamespace declaration, as it seems required to validate and to use the files? 
  Thanks for any hint.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.w3.org/1999/xhtml/datatypes/" 
  xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/" 
  elementFormDefault="qualified" &gt;
  
  &lt;xs:attributeGroup name="xhtml.dir.attrib"&gt;
      &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;
              "dir" Attribute from Bi Directional Text (bdo) Module
          &lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:attribute name="dir"&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:NMTOKEN"&gt;
                  &lt;xs:enumeration value="ltr" /&gt;
                  &lt;xs:enumeration value="rtl" /&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:attribute&gt;
  &lt;/xs:attributeGroup&gt;
  
  &lt;xs:attributeGroup name="xhtml.I18n.extra.attrib"&gt;
      &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;Extended I18n attribute&lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:attributeGroup ref="xhtml.dir.attrib" /&gt;
      &lt;xs:attribute name="lang" type="xh11d:LanguageCode" /&gt;
  &lt;/xs:attributeGroup&gt;
  &lt;/xs:schema&gt;
  </code></pre>