Customizing by Using XML Complex Type Extension
XML supports the extension of complex types that can be used to add new elements. Building upon the example and continuing from Part 2, we will add the following elements:
- A new element to ClassRanking to capture graduation information for special education students
- A new element to StudentAcademicRecord to indicate if the transcript is an official or unoffical submission
To accomplish this, the following steps are taken:
- Define an enumeration type for EXTENSION-SpecialEducationGraduationStatusType with the following enumerations:
- Completion of IEP and Reached Age 22
- Completion of IEP and Access to Services, Employment, or Education
- Completion of IEP and Demonstrated Self-Help Skills
- Define an enumeration type for EXTENSION-SubmissionCertificationType with the following enumerations:
- Define a new complex type EXTENSION-ClassRankingExtension.
- Define the EXTENSION-ClassRankingExtension to be an extension with a base of EXTENSION-ClassRankingRestriction, as defined in Part 1. (Note that if extending a complex type in the Ed-Fi-Core.xsd without restriction, the original type from Ed-Fi-Core.xsd would become the base of the extension.)
- Within the EXTENSION-ClassRankingExtension type, add a sequence and define a new optional element for SpecialEducationGraduationStatus of type EXTENSION-SpecialEducationGraduationStatusType.
- Define a new complex type EXTENSION-StudentAcademicRecordExtension.
- Define the EXTENSION-StudentAcademicRecordExtension to be an extension with a base of EXTENSION-StudentAcademicRecordRestriction (as defined in Part 1).
- Within the EXTENSION-StudentAcademicRecordExtension, add a sequence and define the following new elements:
- For ClassRanking of type EXTENSION-ClassRankingExtension
- For SubmissionCertification of type EXTENSION-SubmissionCertificationType
The following is the resulting schema with annotations removed for brevity:
As seen in this example, deleting an element with restriction and adding an element with extension may be combined to replace an element.
Developers' Guide Documentation Contents
Find out more about how to develop solutions based on the Ed-Fi Data Standard v2.2: