Question: XML My code in the roster.xsd file does not work with the XML file These were my instructions: Complete the following: Using your text editor,

XML

My code in the roster.xsd file does not work with the XML file

These were my instructions:

Complete the following:

  1. Using your text editor, open the rostertxt.xml and rostertxt.xsd files from the xml03 case3

    folder, enter your name and todays date in the comment section of each file, and then save the files as roster.xml and roster.xsd, respectively.

  2. Go to the roster.xsd file in your text editor. Add the root schema element to the document and declare the XML Schema namespace using the xs prefix.

  3. Attach the schema file roster.xsd to the instance document, indicating that the schema and instance document do not belong to any namespace.

  4. Create the following named simple types:

    1. pType, based on the string data type and limited to the enumerated values home, cell,

      and work

    2. methodType, based on the string data type and limited to the enumerated values Phone,

      Personal, and Mail

    3. levelType, based on the string data type and limited to the enumerated values founder,

      sponsor, patron, and friendship

    4. phoneType, based on the string data type consisting of 14 charactersthe first character

      should be a left opening parenthesis, followed by three digits from 0 to 9, followed by a right closing parenthesis, followed by a space, followed by three digits from 0 to 9, followed by a hyphen, and then four digits from 0 to 9 (Hint: Opening and closing parentheses are special characters in creating regular expressions. To include one of these characters in your expression, enter a backslash before it.)

  5. Declare the roster element containing the child element listed in the vocabulary structure. The child element must occur at least once but its upper limit is unbounded.

    1. Declare the donor element containing the sequence of nested child elements shown in thevocabulary structure. Set properties for the minimum and/or maximum occurrences of thedonor, phone, and email elements as illustrated in the vocabulary structure. Specify that thedonor element must contain the required level attribute.

    2. Declare the phone element, containing the required attribute type.

    3. Declare the following attributes and elements:

      1. The attribute type, which uses the pType data type

      2. The attribute level, which uses the levelType data type

      3. The element name, which uses the string data type

      4. The element address, which uses the string data type

      5. The element email, which uses the string data type

      6. The element donation, which uses the decimal data type

      7. The element effectiveDate, which uses the date data type

      8. The element method, which uses the methodType data type

    4. Save your changes to the roster.xsd file, and then validate the schema. Continue to correct any validation errors you discover until the schema validates.

    5. Validate the roster.xml file against the schema. In response to any validation errors, correct relevant values in the roster.xml document to match the schema rules. Continue to correct any validation errors you discover until the instance document validates.

Here is my code is far:

//roster.xsd

                                                                                    

//roster.xml

    David Brennan 
5133 Oak Street Windermere, FL 34786
(407) 555-8981 (407) 555-8189 dbrennan@delisp.net $50,000 Phone 1982-09-01
Cindy Wu
31 Alice Avenue Windermere, FL 34786
(407) 555-7212 cwu@ispnet.net $50,000 Phone 1982-09-01
David Olson
5133 Oak Street Windermere, FL 34786
(407) 555-8981 (407) 555-8189 dolson@davolsonlisp.net $25,000 Personal 1985-07-31
Wilmer Stonehedge
31 Alice Avenue Windermere, FL 34786
(407) 555-7212 wstone@ispnet.net $25,000 Personal 1994-10-03
Lee Unwin
451 Unwin Ct. Orlando, FL 32801
(534) 555-9082 leeunwin@clarion.net $18,000 Personal 1998-11-01
Jane Whitney
87 Hilltop Drive Windermere, FL 34786
(534) 555-7493 $15,000 Personal 1998-11-01
Andrew Sanchez
891 Lindon Lane Windermere, FL 34786
(407) 555-4313 asanchez@yulit.com $15,000 Personal 2000-03-04
Gary Windt
55 Hawking Street Windermere, FL 34786
(407) 555-9939 windtg@brockton.com $1000 Phone 2000-03-04
Cynthia Browne
71 Circuit Ct. Orlando, FL 32801
(407) 555-3813 cynthia@brownes.com $1000 Phone 2000-03-04
Howard Li
4312 East Oak Avenue Orlando, FL 32801
(407) 555-3921 $1000 Mail 2011-03-04
Uma Thu
25 Longton Lane Windermere, FL 34786
(407) 555-8730 $1000 Personal 2012-04-04
Alan Wilkes
321 Ashburn Orlando, FL 32801
(407) 555-1181 wilkes_alan@wuilt.edu $500 Mail 2012-01-04
Steve Bones
900 Lawton Street Orlando, FL 32801
(407) 555-5434 $500 Personal 2012-09-14
Jeri White
Hawkes Lane Windermere, FL 89211
(542) 555-8828 jeri_white@kyu.edu $300 Phone 2012-12-14
Tom Thomas
Rigel Avenue Apopka, FL 32703
(531) 555-8311 $100 Phone 2012-02-14

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!