title: Invalid attribute value for 'name' in element 'element'
body: <p>I have an XML document as below:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;cbe:CommonBaseEvents xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;cbe:CommonBaseEvent&gt;
          &lt;sourceComponentId component="25541"
              componentIdType="Application" location="abcxxxxx"
              locationType="Hostname" subComponent="ia" /&gt;
          &lt;situationInformation extensionName="FeedNotification"
              creationTime="2008-02-08T12:00:00"&gt;
              &lt;extendedDataElements name="FeedNotification"
                  type="string"&gt;
                  &lt;children name="fileType" type="string"&gt;
                      &lt;values&gt;ACBAL&lt;/values&gt;
                  &lt;/children&gt;
                  &lt;children name="file" type="string"&gt;
                      &lt;values&gt;acountandbalances/input/finalT24_ACBAL_MY0010001_200902115941323.csv&lt;/values&gt;
                  &lt;/children&gt;
                  &lt;children name="archiveDirectory" type="string"&gt;
                      &lt;values&gt;accountandbalances/input/archive&lt;/values&gt;
                  &lt;/children&gt;
              &lt;/extendedDataElements&gt;
              &lt;situationType category="CREATE" successDisposition="SUCCESSFUL"
                  situationQualifier="FileTransfer" reasoningScope="INFO" /&gt;
          &lt;/situationInformation&gt;
      &lt;/cbe:CommonBaseEvent&gt;
  &lt;/cbe:CommonBaseEvents&gt;
  </code></pre>
  
  <p>And i have created a schema for this XML as below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cbe="http://www.ibm.com/AC/commonbaseevent1_1"&gt;
  &lt;xs:include schemaLocation="../../00.GEN.Generic/INTF/COMMON_RULES.xsd" /&gt;
  
      &lt;xs:complexType name="sourceComponentIdType"&gt;
          &lt;xs:simpleContent&gt;
              &lt;xs:extension base="xs:string"&gt;
                  &lt;xs:attribute name="component" type="xs:string"/&gt;
                  &lt;xs:attribute name="componentIdType" type="xs:string"/&gt;
                  &lt;xs:attribute name="location" type="xs:string"/&gt;
                  &lt;xs:attribute name="locationType" type="xs:string"/&gt;
                  &lt;xs:attribute name="subComponent" type="xs:string"/&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:simpleContent&gt;
      &lt;/xs:complexType&gt;
  
  
      &lt;xs:element name = "cbe:CommonBaseEvents"&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element name = "cbe:CommonBaseEvent"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:sequence&gt;
                              &lt;xs:element name="sourceComponentId" type="sourceComponentIdType" /&gt;
                              &lt;xs:element name="situationInformation"&gt;
                                  &lt;xs:complexType&gt;
                                      &lt;xs:sequence&gt;
                                          &lt;xs:element name="extendedDataElements"&gt;
                                              &lt;xs:complexType&gt;
                                                  &lt;xs:sequence&gt;
                                                      &lt;xs:element name="children" maxOccurs="unbounded"&gt;
                                                          &lt;xs:complexType&gt;
                                                              &lt;xs:sequence&gt;
                                                                  &lt;xs:element name="values" type="xs:string" /&gt;
                                                              &lt;/xs:sequence&gt;
                                                              &lt;xs:attribute name="name" type="xs:string"/&gt;
                                                              &lt;xs:attribute name="type" type="xs:string"/&gt;
                                                          &lt;/xs:complexType&gt;
                                                      &lt;/xs:element&gt;
                                                  &lt;/xs:sequence&gt;
                                                  &lt;xs:attribute name="name" type="xs:string"/&gt;
                                                  &lt;xs:attribute name="type" type="xs:string"/&gt;
                                              &lt;/xs:complexType&gt;
                                          &lt;/xs:element&gt;   
                                      &lt;/xs:sequence&gt;
                                      &lt;xs:attribute name="extensionName" type="xs:string"/&gt;
                                      &lt;xs:attribute name="creationTime" type="xs:string"/&gt;
                                  &lt;/xs:complexType&gt;
                              &lt;/xs:element&gt;   
                          &lt;/xs:sequence&gt;
                      &lt;/xs:complexType&gt;
                  &lt;/xs:element&gt;   
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;   
  
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>However, while validating XML vs Schema, i get an error that says:</p>
  
  <pre><code>Error - Line 18, 44: org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 44; s4s-att-invalid-value: Invalid attribute value for 'name' in element 'element'. Recorded reason: cvc-datatype-valid.1.2.1: 'cbe:CommonBaseEvents' is not a valid value for 'NCName'.
  
  Error - Line 18, 44: org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 44; s4s-att-must-appear: Attribute 'name' must appear in element 'element'.
  
  Error - Line 21, 46: org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 46; s4s-att-invalid-value: Invalid attribute value for 'name' in element 'element'. Recorded reason: cvc-datatype-valid.1.2.1: 'cbe:CommonBaseEvent' is not a valid value for 'NCName'.
  
  Error - Line 21, 46: org.xml.sax.SAXParseException; lineNumber: 21; columnNumber: 46; src-element.2.1: : One of 'ref' or 'name' must be present in a local element declaration.
  </code></pre>
  
  <p>Please help me understand what am i doing wrong here, i am sure its something to do with the schema not understanding where "cbe" prefix is coming from.                                                                    </p>