Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Validation and Well-formed errors?

    I have an assignment for school where we are given a schema, and we have the write the XML instance file for. Now i was able to write the code just fine, but when i ran the schema and instance through XML Schema Validator like instructed, i receive these 2 errors:

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'PhaseA_Instance_File_Matthew_Knab'. One of '{client}' is expected. at 5,36

    XML document structures must start and end within the same entity. at 82,37

    Here's my code:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <client_information xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Access Data_Client Projects_Schema.xsd">
    <?xml-stylesheet type="text/css" href="Access Data_Phase A_Test Program.css"?> 
    
    <PhaseA_Instance_File_Matthew_Knab>
    	<Client>
    		<Client_ID>1</Client_ID>
    		<Client_Name>John Hill</Client_Name>
    		<Client_Address_Street_1>123 Broad Street</Client_Address_Street_1>
    		<Client_Address_Street_2>Apartment 2</Client_Address_Street_2>
    		<Client_Address_City>State College</Client_Address_City>
    		<Client_Address_State>PA</Client_Address_State>
    		<Client_Address_Zip>16801</Client_Address_Zip>
    		<Client_Phone_Number>614222333</Client_Phone_Number>
    		<Client_Fax_Number>6143234444</Client_Fax_Number>
    		<Client_Email>jhill@ist.psu.edu</Client_Email>
    		<Project_Number>22</Project_Number>
    		<Contact_Person_Name>Patrick Lunney</Contact_Person_Name>
    		<Contact_Person_Phone>5554443333</Contact_Person_Phone>
    		<Contact_Person_Fax>6667778888</Contact_Person_Fax>
    		<Contact_Person_Email>pat@email.com</Contact_Person_Email>
    		<Delivery_Preference>Phone</Delivery_Preference>
    	</Client>	
    	
    	<Client>
    		<Client_ID>2</Client_ID>
    		<Client_Name>Matthew Knab</Client_Name>
    		<Client_Address_Street_1>501 Vairo Blvd</Client_Address_Street_1>
    		<Client_Address_Street_2>Apartment 1533</Client_Address_Street_2>
    		<Client_Address_City>State College</Client_Address_City>
    		<Client_Address_State>PA</Client_Address_State>
    		<Client_Address_Zip>16803</Client_Address_Zip>
    		<Client_Phone_Number>6102839642</Client_Phone_Number>
    		<Client_Fax_Number>8145553679</Client_Fax_Number>
    		<Client_Email>mknabster@verizon.net</Client_Email>
    		<Project_Number>22</Project_Number>
    		<Contact_Person_Name>Kelly Unce</Contact_Person_Name>
    		<Contact_Person_Phone>8145559720</Contact_Person_Phone>
    		<Contact_Person_Fax>8145556310</Contact_Person_Fax>
    		<Contact_Person_Email>kunce@email.com</Contact_Person_Email>
    		<Delivery_Preference>Email</Delivery_Preference>
    	</Client>	
    	
    	<Client>
    		<Client_ID>3</Client_ID>
    		<Client_Name>Mary Scoob</Client_Name>
    		<Client_Address_Street_1>Park Avenue Plaza</Client_Address_Street_1>
    		<Client_Address_Street_2>55 East 52nd Street</Client_Address_Street_2>
    		<Client_Address_City>New York</Client_Address_City>
    		<Client_Address_State>NY</Client_Address_State>
    		<Client_Address_Zip>10055</Client_Address_Zip>
    		<Client_Phone_Number>2128105300</Client_Phone_Number>
    		<Client_Fax_Number>2127543123</Client_Fax_Number>
    		<Client_Email>mscoob@email.com</Client_Email>
    		<Project_Number>18</Project_Number>
    		<Contact_Person_Name>Giovanni Guido</Contact_Person_Name>
    		<Contact_Person_Phone>2125558490</Contact_Person_Phone>
    		<Contact_Person_Fax>2125556798</Contact_Person_Fax>
    		<Contact_Person_Email>gguido@email.com</Contact_Person_Email>
    		<Delivery_Preference>Phone</Delivery_Preference>
    	</Client>	
    	
    	<Client>
    		<Client_ID>4</Client_ID>
    		<Client_Name>Jennifer Smierkiey</Client_Name>
    		<Client_Address_Street_1>Park Avenue Plaza</Client_Address_Street_1>
    		<Client_Address_Street_2>55 East 52nd Street</Client_Address_Street_2>
    		<Client_Address_City>New York</Client_Address_City>
    		<Client_Address_State>NY</Client_Address_State>
    		<Client_Address_Zip>10055</Client_Address_Zip>
    		<Client_Phone_Number>2128105300</Client_Phone_Number>
    		<Client_Fax_Number>2127543123</Client_Fax_Number>
    		<Client_Email>jennsmierk@email.com</Client_Email>
    		<Project_Number>18</Project_Number>
    		<Contact_Person_Name>Giovanni Guido</Contact_Person_Name>
    		<Contact_Person_Phone>2125558490</Contact_Person_Phone>
    		<Contact_Person_Fax>2125556798</Contact_Person_Fax>
    		<Contact_Person_Email> gguido@email.com</Contact_Person_Email>
    		<Delivery_Preference>Phone</Delivery_Preference>
    	</Client>
    
    </PhaseA_Instance_File_Matthew_Knab>
    If anyone could help me understand what's wrong with my code here, i would appreciate it. Thanks for your time

  • #2
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,453
    Thanks
    1
    Thanked 21 Times in 19 Posts
    We have a long-standing policy of not doing homework, but instead of hinting in which direction you should go.

    Can you post the XML Schema document?
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Woops, sorry about a breach of rules. Turns out after doing it a few more hours, i was able to get it. Turns out that the provided schema didn't match up with what i had wrote out, so i went by that and it all was fine. Thanks

  • #4
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,453
    Thanks
    1
    Thanked 21 Times in 19 Posts
    You didn't break the rules. Again, we provide hints.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •