a) The XML schema to represent courses offered at a university is shown in Figure 1.
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
a) The XML schema to represent courses offered at a university is shown in Figure 1.
a) The XML schema to represent courses offered at a university is shown in Figure 1. <?xml version="1.0"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="courses"> <xs: complexType> <xs: sequences <xs: element name="course" type="courseType" maxOccurs="unbounded" /> </xs: sequences </xs: complexType> </xs:element> <xs: complexType name="courseType"> <xs: sequences <xs:element name="courseTitle" type="xs:string" /> <xs:element name="lecturer" type="xs:string" maxOccurs="unbounded" /> <xs:element name="credits" type="xs:integer" /> </xs: sequence> <xs:attribute name="courseID" type-"xs:ID" use="required" /> </xs: complexType> </xs:schema Figure 1 XML Schema Write an Extensible Markup Language (XML) document that is valid according to the XML schema provided in Figure 1. Ensure that your XML document has at least 3 occurrences of course and is able to demonstrate all the possible applications of the rules specified in the XML schema. (9 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!