Jump to content

riyong

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About riyong

  • Rank
    Newbie
  1. <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="schedule"> <xsd:complexType> <xsd:sequence> <xsd:element name ="course" type = "xsd:string"/> <xsd:element name="Engineering" type="xsd:string"/> <xsd:element name= "course_name" type="xsd:string"/> <xsd:element name="course_number" type="xsd:integer"/> <xsd:element name="instructor" type="xsd:string"/> <xsd:element name="course_type" type="xsd:boolean"/> <xsd:element name = "time" type="xsd:decimal"/> <xsd:element name ="room" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
  2. XML SCHEMA <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xsd:element name="schedule"> <xsd:complexType> <xsd:sequence> <xsd:element name ="course" type = "xsd:string"/> <xsd:element name="Engineering" type="xsd:string"/> <xsd:element name= "course_name" type="xsd:string"/> <xsd:element name="course_number" type="xsd:integer"/> <xsd:element name="instructor" type="xsd:string"/> <xsd:element name="course_type" type="xsd:boolean"/> <xsd:element name = "time" type="xsd:decimal"/> <xsd:element name ="room" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
  3. Anyone please help me if I am doing right ??? Create an XML Schemas definition for your course structure. Put reasonable constraints on the various values. (You don't need to go overboard, though. If you're unsure about something, make it xsd:text.) XML CODE <schedule> <course> <department>Engineering</department> <course_name>Mechanical</course_name> <course_number>101</course_number> <instructor>Tony Stark</instructor> <course_type lab="true" lecture="false">Hands on</course_type> <time>10:00 AM</time> <room>401</room> </course> <course> <department>Medicine</department> <course_name>Brain surgery</course_name> <course_number>101</course_number> <instructor>Doctor Octavious</instructor> <course_type lab="true" lecture="false">Hands on</course_type> <time>10:00 AM</time> <room>501</room> </course> </schedule> XML SCHEMA <?xml version="1.0"?> <xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsd:element name="schedule""> <xsd:complexType> <xsd:sequence> <xsd:element name ="course" type = "xsd:string"/> <xsd:element name="Engineering" type="xsd:string"/> <xsd:element name= "course_name" type="xsd:string"/> <xsd:element name="course_number" type="xsd:string"/> <xsd:element name="instructor" type="xsd:string"/> <xsd:element name="course_type" type="xsd:string" lab="true" lecture="false">Hands on</xsd:course_type> <xsd:element name = "time" type="xsd:string"/> <xsd:element name ="room" type="xsd:string"/> </xsd:course> </xsd:sequence> </xsd:complexType> </xsd:schema>
×
×
  • Create New...