### TEI Text Body and Paragraphs Example (XML)
Source: https://context7.com/teic/tei/llms.txt
Shows the fundamental structure of the main text content in a TEI document, using the
element to contain the text and elements to mark individual paragraphs. Includes examples of quoted text using the element.
```xml
Hallgerd was outside. There is blood on your axe,
she said.
What have you done?
Then you must mean that Thorvald is dead,
she said.
Yes,
said Thjostolf. And now you must think up some
plan for me.
```
--------------------------------
### Roma Command-Line Tool Usage Examples
Source: https://context7.com/teic/tei/llms.txt
Demonstrates various command-line options for the Roma tool, used for processing TEI ODD files. It covers generating different schema types, documentation formats, and specifying custom stylesheets or TEI server configurations.
```bash
# Generate all outputs with default settings
roma myCustomization.odd output/
# Generate only RELAX NG schema
roma --nodtd --noxsd myCustomization.odd output/
# Create documentation in HTML format
roma --doc --dochtml myCustomization.odd output/
# Use local stylesheets and TEI server
roma --xsl=/path/to/stylesheets \
--teiserver=http://localhost:8080/Query/ \
myCustomization.odd output/
# Specify language for element names
roma --lang=es myCustomization.odd output/
# Generate PDF documentation
roma --doc --docpdf myCustomization.odd output/
```
--------------------------------
### TEI Root Element Example (XML)
Source: https://context7.com/teic/tei/llms.txt
Demonstrates the basic structure of a TEI-conformant XML document, including the root element, which encloses the and the content. It specifies the TEI namespace and version.
```xml
The Shortest TEI Document Imaginable
First published as part of TEI P2, this is the P5 version using a namespace.
No source: this is an original work.
This is about the shortest TEI document imaginable.
```
--------------------------------
### TEI Header Metadata Example (XML)
Source: https://context7.com/teic/tei/llms.txt
Illustrates the structure and content of the element, which provides essential metadata for a TEI document. It includes bibliographic details, encoding descriptions, and revision history.
```xml
Shakespeare: the first folio (1623) in electronic form
Shakespeare, William (1564-1616)
Originally prepared by
Trevor Howard-Hill
Oxford Text Archive
13 Banbury Road, Oxford OX2 6NN, UK
119
Freely available on a non-commercial basis.
1968
The first folio of Shakespeare, prepared by Charlton Hinman
(The Norton Facsimile, 1968)
Originally prepared for use in the production of a series of
old-spelling concordances in 1968.
Turned letters are silently corrected.
Original spelling and typography is retained.
Last checked by CAC
LB made new file
```
--------------------------------
### Report Pattern Evaluation Start with process-pattern
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
The process-pattern template reports on the start of the evaluation of a pattern element. It includes parameters for $name (title), $is-a (abstract pattern derivation), and rich properties like $icon, $id, $fpi, $lang, $see, and $space. To print documentation, use .
```XSLT
```
--------------------------------
### Create and Switch to a New Branch
Source: https://github.com/teic/tei/blob/dev/Documents/Git-README.md
Creates a new branch named 'newbranchname' starting from the current commit (HEAD) and immediately switches the working directory to this new branch.
```bash
git checkout -b newbranchname
```
--------------------------------
### Build TEI Schemas with Make (Bash)
Source: https://context7.com/teic/tei/llms.txt
This section provides common 'make' commands for building, validating, and cleaning TEI P5 schemas and documentation. It covers generating schemas, HTML documentation, running tests, and building exemplars.
```bash
# Build all schemas, run validation and tests
make default
# Generate just the schemas (DTD, RELAX NG, W3C Schema)
make schemas
# Generate HTML documentation
make html-web
# Run validation tests
make validate
# Build exemplar customizations
make exemplars
# Run test suite
make test
# Clean build artifacts
make clean
```
--------------------------------
### Complete TEI Schema (XML)
Source: https://context7.com/teic/tei/llms.txt
The tei_all customization includes all TEI modules, suitable for comprehensive testing or as a base for further customization. It defines the schema specification with required and optional module references.
```xml
```
--------------------------------
### Remove Existing TEI Element with elementSpec
Source: https://context7.com/teic/tei/llms.txt
Shows how to remove unwanted elements from a TEI schema customization using `mode="delete"` on `elementSpec`. This example removes 'headItem', 'headLabel' from the 'core' module and 'hyphenation' from the 'header' module.
```xml
```
--------------------------------
### Create Basic TEI Schema with schemaSpec
Source: https://context7.com/teic/tei/llms.txt
Demonstrates how to create a basic TEI schema customization using the `` element. It includes essential core modules like header, core, tei, and textstructure. This is the foundational step for any custom TEI schema.
```xml
TEI with simple setup
Sebastian Rahtz
freely available
Written from scratch.
```
--------------------------------
### Process ODD with Roma Command Line (Bash)
Source: https://context7.com/teic/tei/llms.txt
This command-line snippet illustrates how to use the 'roma' tool to process ODD (One Document Does-it-all) specifications into various schema formats. It's a fundamental step in generating TEI schemas.
```bash
# Example command structure (specific arguments depend on ODD file and desired output)
# roma [options] input.odd -f [output_format] -o [output_file]
# Example: Generate RELAX NG schema from an ODD file
# roma my_custom_schema.odd -f rng -o my_custom_schema.rng
```
--------------------------------
### Modify Existing TEI Element with elementSpec
Source: https://context7.com/teic/tei/llms.txt
Demonstrates modifying an existing TEI element, 'div', using `mode="change"`. This example specifically changes the 'type' attribute to be required and replaces its value list with a closed set of options: 'section', 'subsection', and 'subsubsection'.
```xml
You must indicate the level of the section
1st level section
2nd level section
3rd level section
```
--------------------------------
### Stage and Commit Specific Files
Source: https://github.com/teic/tei/blob/dev/Documents/Git-README.md
Stages a specific file ('filename.xml') for commit, and then commits it with a message. This is used when you want to commit only selected changes or add new files.
```bash
git add filename.xml
git commit -m "My message"
```
--------------------------------
### Minimal TEI Schema (XML)
Source: https://context7.com/teic/tei/llms.txt
The tei_bare customization provides the minimum TEI elements for a valid document. It includes essential modules and modifies specific elements to remove certain attributes, offering a streamlined structure.
```xml
```
--------------------------------
### Report Namespace Declarations with process-ns
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
The process-ns template reports on namespace declarations, which are used to transmit namespace information via the skeleton. It requires a $prefix for the namespace and a $uri for its reference.
```XSLT
```
--------------------------------
### ISO Schematron Skeleton API
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
This section details the XSLT API available in the iso_schematron_skeleton.xsl implementation. It covers templates for processing Schematron schemas, including assertions, diagnostics, and root elements.
```APIDOC
## process-prolog
### Description
This template is called at the beginning of the validation session. The default implementation performs no action.
### Method
N/A (XSLT Template)
### Endpoint
N/A
### Parameters
None
### Request Example
N/A
### Response
N/A
* * *
## process-root
### Description
This template processes the root element of the Schematron schema. It receives several parameters providing metadata about the schema.
### Method
N/A (XSLT Template)
### Endpoint
N/A
### Parameters
#### Schema Content Parameters
- **$contents** (_node-list_) - The content of the schema.
#### Schema Metadata Parameters
- **$schemaVersion** (_string_) - The version of the schema, possibly a datestamp.
- **$queryBinding** (_string_) - The query language binding (e.g., "xslt", "xpath", "xslt2").
- **$title** (_string_) - The title of the schema.
- **$version** (_string_) - The version of Schematron being used (e.g., "iso", "1.5", "1.6").
#### Rich Properties Parameters
- **$icon** (_XML SystemId_) - The URI of an icon.
- **$id** (_XML ID_) - The unique identifier within the schema for the schema element.
- **$fpi** (_SGML FPI_) - The Formal Public Identifier for this schema.
- **$lang** (_IETF language_) - The human language used in this schema, from xml:lang.
- **$see** (_URL_) - Link to documentation on WWW or file.
- **$space** (_string_) - The value for xml:space ("preserve" or "default").
### Request Example
```xml
```
### Response
#### Success Response (N/A)
- The template's actions are defined by the meta-stylesheet that overrides it.
#### Response Example
N/A
* * *
## process-assert
### Description
This template handles Schematron assertions whose test has failed. It provides information about the failed assertion.
### Method
N/A (XSLT Template)
### Endpoint
N/A
### Parameters
#### Assertion Details Parameters
- **$test** (_XPath_) - The XPath expression of the failed assertion.
- **$diagnostics** (_XML IDREFS_) - A list of idrefs for diagnostic elements related to the current assertion.
- **$flag** (_XML NMTOKEN_) - The name of a flag that becomes true because this assertion fails. (Note: For compatibility, this parameter should not be used with Schematron 1.5).
#### Rich Properties Parameters
- **$icon** (_XML SystemId_) - The URI of an icon.
- **$id** (_XML ID_) - The unique identifier within the schema for the assert element.
- **$fpi** (_SGML FPI_) - The Formal Public Identifier for this assertion.
- **$lang** (_IETF language_) - The human language used in this assertion, from xml:lang.
- **$see** (_URL_) - Link to documentation on WWW or file.
- **$space** (_string_) - The value for xml:space ("preserve" or "default").
#### Linking Properties Parameters
- **$role** (_XML NMTOKEN_) - A name for the generic role of this assertion.
- **$subject** (_XPath_) - An XPath expression relative to the current context, pointing to some interesting node considered the subject.
### Request Example
```xml
```
### Response
#### Success Response (N/A)
- The template's actions are defined by the meta-stylesheet that overrides it. It can use `xsl:apply-templates mode="text"` to print text contents.
#### Response Example
N/A
* * *
## process-diagnostic
### Description
This template handles diagnostic elements within the Schematron schema. (Details for parameters are not provided in the source text).
### Method
N/A (XSLT Template)
### Endpoint
N/A
### Parameters
(Details not specified in the provided text)
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Handle Paragraphs with process-p
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
The process-p template is responsible for handling paragraph elements. It supports rich properties such as $class for styling, $id for unique identification, $icon for a URI, and $lang for human language. To print text content, use .
```XSLT
```
--------------------------------
### Commit All Changes Locally
Source: https://github.com/teic/tei/blob/dev/Documents/Git-README.md
Stages all modified tracked files and commits them with a specified message. The '-a' flag automatically stages modified files.
```bash
git commit -am "My helpful commit message"
```
--------------------------------
### Configure Git User Information
Source: https://github.com/teic/tei/blob/dev/Documents/Git-README.md
Sets the global user name and email address for Git commits. This is essential for identifying the author of changes.
```bash
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
```
--------------------------------
### Handle Bi-directionality Markup with process-dir
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
The process-dir template manages bi-directionality markup, essential for scripts like Arabic. It accepts a $value parameter which can be 'ltr', 'rtl', or an empty string for unspecified directionality.
```XSLT
```
--------------------------------
### Integrate MathML into TEI Schema (XML)
Source: https://context7.com/teic/tei/llms.txt
This schema customization demonstrates integrating MathML elements into TEI for mathematical formulas. It includes the MathML schema and redefines the 'formula' element to contain MathML content.
```xml
```
--------------------------------
### Handle Successful Report Statements with process-report
Source: https://github.com/teic/tei/blob/dev/P5/Utilities/schematron-skeleton-api.htm
The process-report template handles report statements whose tests have succeeded. It includes parameters for $test (XPath expression), $diagnostics (list of diagnostic elements), and $flag. Rich properties and linking properties are also supported. To print text content, use .
```XSLT
```