Extended Schema

This mechanism would be used where new elements need to be added to the standard schema. An example might be a requirement to represent vehicles through a new <Vehicle> element. Under these circumstances, the author designing the extension needs to provide an associated XSD schema file defining the syntax of those new elements. The new XML elements and attributes are then referenced with the prefix of the associated namespace. For instance:

 

<?xml version="1.0"?>

<Datasets xmlns='http://stemma.parallaxview.co/2017-04'

xmlns:vh=’http://www.vehicle-history/2012’>

 

<Dataset Name=’Example’>

<vh:MotorCycle Key=’Harley1’>

...data parts...

</vh:MotorCycle>

 

<Person>

<Text>

Text with embedded Vehicle reference <vh:VehRef Key=’Harley1’/>

</Text>

</Person>

</Dataset>

</Datasets>

 

A schema validation operation on such XML would use both the standard schema associated with the default unnamed namespace and the extended schema associated with the additional namespace.

 

STEMMA implements a number of subject entities Person, Place, Animal, and Group and it is this area where schema extensions are most likely to be proposed. The existing entities are treated uniformly using OOP techniques such that they all inherit from a base subject-entity class, with intermediate base classes to differentiate inanimate and animate subjects.