4 Replies Latest reply on Dec 10, 2007 11:01 PM by (Asiye)

    Cannot load schema message...

      I'm trying to create a schema for a document and receive a "Cannot load schema. Check that the path and that the file is a valid XML Schema File" when attempting to create a data connection to the schema. The problem appears to relate to the manner in which the List Box is created - To illustrate the problem I've used the samle mortgage application XSD and modified it to include a definition for a list box (Builiding Type)as defined below.<br /><br /><!-- Sample schema for Developing your First Application tutorial <br />     Copyright (c) 1985-2007 Adobe Systems Incorporated<br />--><br /><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br />   <xsd:annotation><br />       <xsd:documentation xml:lang="en"><br />       Adobe LiveCycle Workbench ES Mortgage Schema Sample<br />       </xsd:documentation><br />   </xsd:annotation><br />   <xsd:element name="MortgageApp" type="mortgageFormType"/> <br />   <xsd:complexType name="mortgageFormType"><br />       <xsd:sequence><br />           <xsd:element name="MortgageFields"    type="MortgageInfo"/><br />           <xsd:element name="ApplicantFields"   type="ApplicantInfo"/><br />           <xsd:element name="ApprovalFields"    type="ApprovalInfo"/><br />           <xsd:element name=Building Type><br />               <xsd:complexType><br />               <xsd:simpleContent><br />               <xsd:extension base=xsd:string><br />               <xsd:enumeration value=Shopping Centre/><br />               <xsd:enumeration value=Power Centre/><br />               <xsd:enumeration value=Office w/Retail/><br />               <xsd:enumeration value=Strip Mall/><br />               <xsd:enumeration value=Street/><br />               </xsd:extension><br />               </xsd:simpleContent><br />               </xsd:complexType><br />           <xsd:element><br />       </xsd:sequence><br />   </xsd:complexType><br />   <xsd:complexType name="MortgageInfo"><br />       <xsd:sequence><br />           <xsd:element name="PropertyPrice"     type="xsd:float"/><br />           <xsd:element name="DownPayment"       type="xsd:float"/><br />           <xsd:element name="Mortgage"          type="xsd:float"/><br />           <xsd:element name="Term"              type="xsd:string"/><br />           <xsd:element name="InterestRate"      type="xsd:string"/><br />        </xsd:sequence><br />   </xsd:complexType><br />   <xsd:complexType name="ApplicantInfo"><br />       <xsd:sequence><br />           <xsd:element name="LastName"          type="xsd:string"/><br />           <xsd:element name="FirstName"         type="xsd:string"/><br />           <xsd:element name="PhoneNumber"       type="xsd:string"/><br />           <xsd:element name="SSN"               type="xsd:string"/><br />       </xsd:sequence><br />    </xsd:complexType><br />   <xsd:complexType name="ApprovalInfo"><br />       <xsd:sequence><br />           <xsd:element name="Approved"          type="xsd:boolean"/><br />           <xsd:element name="Declined"          type="xsd:boolean"/><br />       </xsd:sequence><br />    </xsd:complexType><br /></xsd:schema>
        • 1. Re: Cannot load schema message...
          Level 1
          check to see if the schema file loads correctly in browser
          • 2. Re: Cannot load schema message...
            Level 1
            Hi Jeff,
            In your schema, you use two different type double quotes " and , so your schema can not load correctly. Use the first type of quote ".

            • 3. Re: Cannot load schema message...
              Level 1
              I changed the quotes as suggested, but still have the same problem. I presume that the issue relates to the following syntax - but it's identical to a sample that Adobe provided, so I can't really understand what could be wrong. I'm not sure how to validate the XSD with I.E. - if I select "open with I.E" nothing happens... if I type in the file path and press the "Go" button it opens the file in notepad...<br /> <br /><br /><xsd:element name="Building Type"> <br />               <xsd:complexType> <br />               <xsd:simpleContent> <br />               <xsd:extension base="xsd:string"> <br />               <xsd:enumeration value="Shopping Centre"/> <br />               <xsd:enumeration value="Power Centre"/> <br />               <xsd:enumeration value="Office w/Retail"/> "               <br /><xsd:enumeration value="Strip Mall"/> <br />               <xsd:enumeration value="Street"/> <br />               </xsd:extension> <br />               </xsd:simpleContent> <br />               </xsd:complexType> <br />           <xsd:element>
              • 4. Re: Cannot load schema message...
                Level 1
                Hi Jeff,<br />You can use Eclipse to validate your schema file. When I put your schema to eclipse, eclipse dont like:<br />1. Names containing spaces "Building Type" (change to BuildingType)<br />2. Building Type's containing xsd:element tag is not closed. second <xsd:element> must be </xsd:element>.<br />3. enumeration tag can not reside inside extension, it can be inside restriction.<br /><br />New Schema can be:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><schema xmlns="http://www.w3.org/2001/XMLSchema"<br />     xmlns:tns="http://www.example.org/Test/"<br />     targetNamespace="http://www.example.org/Test/"><br />     <annotation><br />          <documentation xml:lang="en"><br />               Adobe LiveCycle Workbench ES Mortgage Schema Sample<br />          </documentation><br />     </annotation><br />     <element name="MortgageApp" type="tns:mortgageFormType"></element><br /><br />     <complexType name="mortgageFormType"><br />          <sequence><br />               <element name="MortgageFields" type="tns:MortgageInfo" /><br />               <element name="ApplicantFields" type="tns:ApplicantInfo" /><br />               <element name="ApprovalFields" type="tns:ApprovalInfo" /><br />               <element name="BuildingType"><br />                    <complexType><br />                         <simpleContent><br />                              <restriction base="string"><br />                                   <enumeration value="Shopping Centre" /><br />                                   <enumeration value="Power Centre" /><br />                                   <enumeration value="Office w/Retail" /><br />                                   <enumeration value="Strip Mall" /><br />                                   <enumeration value="Street" /><br />                              </restriction><br />                         </simpleContent><br />                    </complexType><br />               </element><br />          </sequence><br />     </complexType><br />     <complexType name="MortgageInfo"><br />          <sequence><br />               <element name="PropertyPrice" type="float" /><br />               <element name="DownPayment" type="float" /><br />               <element name="Mortgage" type="float" /><br />               <element name="Term" type="string" /><br />               <element name="InterestRate" type="string" /><br />          </sequence><br />     </complexType><br />     <complexType name="ApplicantInfo"><br />          <sequence><br />               <element name="LastName" type="string" /><br />               <element name="FirstName" type="string" /><br />               <element name="PhoneNumber" type="string" /><br />               <element name="SSN" type="string" /><br />          </sequence><br />     </complexType><br />     <complexType name="ApprovalInfo"><br />          <sequence><br />               <element name="Approved" type="boolean" /><br />               <element name="Declined" type="boolean" /><br />          </sequence><br />     </complexType><br /></schema><br /><br />Hope it helps,<br />Asiye