AnsweredAssumed Answered

Problem with Importing XSD

Question asked by trgerhardt on Jul 24, 2007
Latest reply on Jul 25, 2007 by trgerhardt
What do I need to have the schema attributes set to, to include another schema and not get an error, for example:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="object" type="objectType" />
 
  <xs:include schemaLocation="/includes/schemas/image_list.xsd"/>

  <xs:complexType name="objectType">
    <xs:sequence>
      <xs:element name="name" type="xs:normalizedString" />
      <xs:element name="image" type="imageType" minOccurs="0" />
    </xs:sequence> 
  </xs:complexType>
   
</xs:schema>

The included XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:complexType name="imageType">
    <xs:sequence>
      <xs:element name="title" type="xs:normalizedString" minOccurs="0" />
      <xs:element name="filename" type="image_list" />
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="image_list">
    <xs:restriction base="xs:normalizedString">
      <xs:enumeration value="first_image.jpg" />
      <xs:enumeration value="second_image.jpg" />
      <xs:enumeration value="third_image.jpg" />
      <xs:enumeration value="fourth_image.jpg" />     
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
   

The error message I am getting:
org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema: at line 11 column 64: src-resolve: Cannot resolve the name 'imageType' to a(n) 'type definition' component.

Outcomes