Working with Schemas
Schemas are a powerful mechanism for controlling the structure of resources in your project. Your project automatically comes with a schema that includes some of the most commonly used elements in the TEI Guidelines. But perhaps you want to streamline this further, removing elements that aren’t used in your project. You may also wish to add new elements that just change the way they are presented in the FairCopy user interface. All of this is possible using schemas.
To modify the schema for your project, open the Project Settings Screen by clicking on the gear icon in the upper left corner of the interface. Select “Schema” from the nav bar on the left. A two-column screen appears. To the left are all of the Elements and Element Groups currently in the project. To the right is the complete library of elements available in FairCopy. Along the top are three tabs: Structures, Marks, and Inlines. These correspond the FairCopy element types (See the “Using the Editor” section).
The elements and groups displayed in the “Structures” tab are the elements and groups that will be displayed in the Element Palette in the editor. Likewise, the Marks and Inlines menus are driven by the elements and groups in their respective tabs. The Element Library to the right is filtered to only display elements that can be added to the currently selected element type. For example, when the Inlines tab is selected, the contents of the inline menu are displayed and the library only displays inline elements.
The element groups can be added, removed, or renamed on the screen. You can add new elements to a group by dragging them in from the element library. Likewise, you can remove an element from a group by dragging it out of the group to anywhere else on the screen. Elements can be re-ordered or moved between groups in a similar fashion.
Taken together, the elements present on the menus comprise the “schema” of the project. That is, if an element is not present on a menu, then it is not in the project schema. Elements that are not in the project schema are marked as validation errors when encountered in the editor.
Finding and Resolving Validation Errors
Validation errors detected within open resources are shown in the Open Resources list on the sidebar. If a resource has validation errors, the total number of these errors is displayed here. Within the resource, these errors can be identified as red outlines for structures and red underlines for marks and inlines. From within the editor, you can quickly add an element to the schema by selecting it and then clicking on the “Add to Schema” button in the Element Inspector.
Other types of validation errors include attribute values that are not valid for their data type, the presence of values for attributes that are not in the project schema, and IDs that are not unique within the project.
Validation errors are commonly introduced when importing XML from another source or project. When importing XML, you have the option to either have your project learn the elements and attributes from the incoming XML or to resolve any validation errors after importing them. The latter option is useful if you wish to modify the imported document to conform with the existing schema.
When importing XML from another source, be sure to validate it first using a TEI Validator such as TEI By Example. Invalid XML can produce unexpected results as FairCopy attempts to patch in unrecognized elements. In addition, there are some valid TEI elements that FairCopy at present does not recognize. These are described in the following section.
Compatibility with TEI Guidelines
While FairCopy recognizes the vast majority of elements in TEI, there are a few that are presently not supported by the software. When new versions of the TEI Guidelines are released, FairCopy will be updated to take new changes into account.
Elements in the following modules are not presently supported in FairCopy. Some of these elements may be included in future versions of the software.
analysis
c
pc
w
m
core module
binaryObject
teiCorpus
header
xenoData
textstructure
group
transcr
am
ex
line
path
transpose
listTranspose
modules not included
- [dictionaries] Dictionaries
- [gaiji] Character and glyph documentation
- [iso-fs] Feature structures
- [nets] Graphs, networks, and trees [tagdocs] Documentation of TEI and other XML markup languages