Question
I need help with this xml!
1. Write an XML Schema for the following XML file and validate the xml file against your XML Schema using the online validato
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Done. Included the XSD file needed for XML schema. and verified on W3C Schema validator. Please let me know if you have any doubts:

///////////////////////////////////////Employee.xml//////////////////////

<?xml version="1.0" encoding="UTF-8"?>
<Employees>
   <Employee>
       <SSN>73733399</SSN>
       <Name>Christo Dichev</Name>
       <DateOfBirth>1950-03-03</DateOfBirth>
       <EmployeeType>FULLTIME</EmployeeType>
       <Salary>7000</Salary>
   </Employee>
   <Employee>
       <SSN>73733333</SSN>
       <Name>Paul Fisher</Name>
       <DateOfBirth>1960-01-01</DateOfBirth>
       <EmployeeType>FULLTIME</EmployeeType>
       <Salary>6000</Salary>
   </Employee>
</Employees>

/////////////////////////////////END/////////////////////////////////

//////////////////////////////////EmpSchema.xsd///////////////////////////////////

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <xsd:element name="Employees" type="EmployeesType" />
   <xsd:complexType name="EmployeesType">
       <xsd:sequence>
           <xsd:element ref="Employee" minOccurs="0"
               maxOccurs="unbounded" />
       </xsd:sequence>
   </xsd:complexType>

   <xsd:element name="Employee" type="EmployeeType" />
   <xsd:complexType name="EmployeeType">
       <xsd:sequence>
           <xsd:element ref="SSN" />
           <xsd:element ref="Name" />
           <xsd:element ref="DateOfBirth" />
           <xsd:element ref="EmployeeType" />
           <xsd:element ref="Salary" />
       </xsd:sequence>

   </xsd:complexType>

   <xsd:element name="SSN" type="xsd:integer" />
   <xsd:element name="Name" type="xsd:string" />
   <xsd:element name="DateOfBirth" type="xsd:date" />
   <xsd:element name="EmployeeType" type="xsd:string" />
   <xsd:element name="Salary" type="xsd:integer" />

</xsd:schema>

///////////////////////////////////End Schema/////////////////////////

e l Need Help With This Xml! | Che 、W3C XML Schema DSD) Validat ← → C Δ Not secure! www.utilities-online.info/ksdvalidation/#

Add a comment
Know the answer?
Add Answer to:
I need help with this xml! 1. Write an XML Schema for the following XML file...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with this xml! Write a CSS file that renders the that will render...

    I need help with this xml! Write a CSS file that renders the that will render the following XML file <?xml version-"1.0"?> <?xml-stylesheet type-"text/css" href-"Q13.css"?> <planet> <continent> <name>Africa</name> Karea>30.37</area> <population>1, 022</population> </continent> <continent <name >Asia</ name> Karea>43.82</area> <population>4, 164</population> </continent> <continent> <name>Australia</name> Karea>9.01</area> くpopulation>29.1</population> </continent> <continent> <name> Europe</name> Karea>10.18</area <population>738.2</population> </continent> <continent> <name >North America </name> <area>24.49</area> <population> 542.1</population> </continent> <continent> <name >South America</name> Karea>17.84</area> <population-392.6</population> </continent> </planet> as shown in the following screenshot Note: You are not supposed to...

  • I need help referencing an XML file that serves as a lookup for another XML file using XSL and ke...

    I need help referencing an XML file that serves as a lookup for another XML file using XSL and keys. Instead of just printing the customer ID from the main XML file as shown in the screenshot, I need to also print the customer's first name, last name, etc., as referenced in the supplemental customersxml file. Thank you. ---------------------------------------------------------------------- XSL: <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:variable name="rentals" select="rentals"/> <xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" /> <xsl:template match="/"> <html>                <head>                   ...

  • I need help with the following SQL query for a company database (script given below). The...

    I need help with the following SQL query for a company database (script given below). The name of the Department. The number of employees working in that department. The number of different projects controlled by this department. The name of the project controlled by this department that has the maximum number of employees of the company working on it. The number of the above project. The cumulative sum of the number of employees of the company working on the projects...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT