-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path14_dtd.xml
More file actions
39 lines (38 loc) · 1.48 KB
/
14_dtd.xml
File metadata and controls
39 lines (38 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Report SYSTEM "report.dtd">
<Report>
<Students>
<Student StudId="s1">
<Name>
<First>John</First>
<Last>Doe</Last>
</Name>
<Status>Enrolled</Status>
<CrsTaken CrsCode="c1"/>
<CrsTaken CrsCode="c2"/>
</Student>
<Student StudId="s2">
<Name>
<First>Jane</First>
<Last>Smith</Last>
</Name>
<Status>Graduated</Status>
<CrsTaken CrsCode="c1"/>
</Student>
</Students>
<Classes>
<Class>
<Semester>Fall 2022</Semester>
<ClassRoster Members="s1 s2"/>
</Class>
</Classes>
<Courses>
<Course CrsCode="c1">Computer Science</Course>
<Course CrsCode="c2">Mathematics</Course>
</Courses>
</Report>
<!-- The XML document references the DTD using the <!DOCTYPE ...> declaration.
The structure of the XML document follows the specified DTD elements and attributes.
The StudId attribute for the <Student> element, CrsCode attribute for the <Course> element, and CrsCode attribute for the <CrsTaken> element are defined as IDs or IDREFs in the DTD.
The Members attribute for the <ClassRoster> element is defined as IDREFS in the DTD.
This is a simple example, and in a real-world scenario, the XML document may contain more data and follow a more complex structure based on the specific requirements. -->