A newer version of the Ed-Fi Data Standard is new available. See the Ed-Fi Technology Version Index for a link to the latest version.
XML Schema - Extended Reference Types
XSD Extended Reference Types
Extended reference types support cases where specific data interchange must denote an association.
Extended reference types provide the mechanism for denoting associations in Ed-Fi XML interchanges. Extended reference types define associations in one of three ways:
Using an XML
IDREFto refer to an ID defined for an entity within the same interchange fileSpecifying attributes that represent the natural key for the entity (which may be either in the same interchange file or previously loaded)
Optionally specifying attributes that provide enough information to look up the entity from those previously loaded, when appropriate
Extended reference types are used when an entity or association must reference another, as follows:
When an entity has an association with another and that association has no attributes, then the entity uses an extended reference type to reference the other entity.
When an association has attributes, the association uses an extended reference type to reference the associated entity.
Each extended reference type extends the base ReferenceType complex type, as defined below:
<xs:complexType name=”ReferenceType”>
. . .
<xs:attribute name=”id” type=”xs:ID”>
. . .
<xs:attribute name=”ref” type=”xs:IDREF”>
. . .
</xs:complexType>For example, the extended reference type for a SessionReferenceType is:
<xs:complexType name=”SessionReferenceType”>
. . .
<xs:complexContent>
<xs:extension base=”ReferenceType”>
<xs:sequence>
<xs:element name=”SessionIdentity” type=”SessionIdentityType” minOccurs=”0”>
. . .
<xs:element name=”SessionLookup” type=”SessionLookupType” minOccurs=”0”>
. . .
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>The SessionReferenceType allows the reference to be made in one of three ways:
Using an XML
IDREF(if interchanged in the file)Specifying the natural key information contained in the types SessionIdentityType, as follows:
<xs:complexType name=”SessionIdentityType”>
. . .
<xs:sequence>
<xs:element name=”SchoolReference” type=”SchoolReferenceType”>
. . .
<xs:element name=”SchoolYear” type=”SchoolYearType”>
. . .
<xs:element name=”Term” type=”TermDescriptorReferenceType”>
. . .
</xs:sequence>
</xs:complexType>Specifying attributes in the types SessionLookupType to provide enough information to look up the entity from those previously loaded, as follows:
<xs:complexType name=”SessionLookupType”>
. . .
<xs:sequence>
<xs:element name=”SessionName” type=”IdentificationCode” minOccurs=”0”>
. . .
<xs:element name=”SchoolYear” type=”SchoolYearType” minOccurs=”0”>
. . .
<xs:element name=”Term” type=”TermDescriptorReferenceType” minOccurs=”0”>
. . .
<xs:element name=”SchoolReference” type=”SchoolReferenceType” minOccurs=”0”>
. . .
</xs:sequence>
</xs:complexType>Thus, when CourseOffering refers to its association with a Session, it defines a SessionReference of the type SessionReferenceType, as follows:
<xs:complexType name=”CourseOffering”>
. . .
<xs:complexContent>
<xs:extension base=”ComplexObjectType”>
<xs:sequence>
. . .
<xs:element name=”SessionReference” type=”SessionReferenceType”/>
. . .
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>In associations with attributes, extended reference types are similarly used to relate the associated entities. For example, the StudentParentAssociation has a StudentReference and a ParentReference, as shown below. The StudentReference is of type StudentReferenceType and the ParentReference is of type ParentReferenceType.
<xs:complexType name=”StudentParentAssociation”>
. . .
<xs:complexContent>
<xs:extension base=”ComplexObjectType”>
<xs:sequence>
<xs:element name=”StudentReference” type=”StudentReferenceType”>
. . .
<xs:element name=”ParentReference” type=”ParentReferenceType”/>
. . .
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>The StudentIdentityType and the StudentLookupType (used within the StudentReferenceType) provide several options for specifying the identity of a student, as is shown below.
<xs:complexType name=”StudentIdentityType”>
. . .
<xs:sequence>
<xs:element name=”StudentUniqueId” type=”UniqueId”>
. . .
</xs:sequence>
</xs:complexType>
<xs:complexType name=”StudentLookupType”>
. . .
<xs:sequence>
<xs:element name=”StudentUniqueId” type=”UniqueId” minOccurs=”0”>
. . .
<xs:element name=”StudentIdentificationCode” type=”StudentIdentificationCode” minOccurs=”0”>
. . .
<xs:element name=”Name” type=”Name” minOccurs=”0”>
. . .
<xs:element name=”OtherName” type=”OtherName” minOccurs=”0”>
. . .
<xs:element name=”Sex” type=”SexType” minOccurs=”0”>
. . .
<xs:element name=”BirthData” type=”BirthData” minOccurs=”0”>
. . .
<xs:element name=”HispanicLatinoEthnicity” type=”xs:boolean” minOccurs=”0”>
. . .
<xs:element name=”Race” type=”RaceType” minOccurs=”0”>
. . .
<xs:element name=”EducationOrganizationReference” type=”EducationOrganizationReferenceType” minOccurs=”0”>
. . .
</xs:sequence>
</xs:complexType>First, a student may be specified by a StudentUniqueId provided by the StudentIdentityType. Alternatively, additional attributes provided by the StudentLookup may be specified for lookup providing a combination of StudentUniqueId, StudentIdentificationCode, Name, OtherName, Sex, BirthData, HispanicLatinoEthnicity, Race, and EducationOrganizationReference.