Search code examples
xmlvisual-studioxsdxsd-validationxml-validation

Type base64Binary is not declared or is not a simple type


I am getting this error and don't know how to fix it.

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"  
           xmlns:ds="http://www.w3.org/2000/09/xmldsig#" 
           attributeFormDefault="unqualified" elementFormDefault="qualified">
      <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" 
                 schemaLocation="xmldsig-core-schema.xsd">
        <xs:annotation>
          <xs:documentation>XML Digital Signature schema imported to support 
                            signatures of messages and contents.</xs:documentation>
        </xs:annotation>
      </xs:import>
      ....
      <xs:simpleType name="APP_base64" >
         <xs:annotation>
          <xs:documentation>Representación base64 de la imagen </xs:documentation>
         </xs:annotation>
         <xs:restriction base="base64Binary"/>
      </xs:simpleType>

This line gives a warning <xs:restriction base="base64Binary"/>


Solution

  • Change

    <xs:restriction base="base64Binary"/>
    

    to

    <xs:restriction base="xs:base64Binary"/>