All of us played with Legos in our childhood. How much is exciting?
Think about a very big Lego with hundreds of pieces there. We always enjoy challenging ourselves. So, you might join your brothers and sisters and even parents to help you how to assemble it correctly. Most of the time there are pictures of Legos that can help you how to figure it out.
Hold on one second. Just right now think about a faded paper of a very old book. It can be a poem? Yes, why not! Is it very hard to read and understand all the words of the poem? Is that too much boring? If you're very curious like me it must be more exciting than boring, and a lot of questions come to your mind firstly. What it looks like? How much information are there in the book about the poem? What kind of language, alphabet or characters have been used? What does it mean those symbols? What about poem's format, literature and punctuation?
And HOW to answer to all of those questions together? Undoubtedly there more questions come out again and again later. So, you will need to have a unified structure to be able design an infrastructure framework that accepts unlimited inputs.
Now you will ask that what’s relevant between those two concepts that I’ve just mentioned above.
Now, I am going to introduce you a kind of fantastic electronic Lego that is more exciting and challenging, goes by TEI. TEI helps you how to bring all pieces of a puzzle (like I said a poem) together with more flexibility and higher accordance.
You will be able to bring all information of an object, (i.e poem, puzzle, real Lego, …) in a single piece (A TEI file) together, that helps the other people to access to an extensive knowledge of that object. Also, it lets people how to contribute to your project.
Now, let’s talk more about TEI. TEI is kind of XML file (mark-up language) with a lot of features and is applicable for many reasons.
Like all kinds of XML files, TEI contains two main parts (we will use “tag” instead of “part” from then on), Header and Body. First, remember that header and body are integral part of TEI and any of them has some essential tags that without them TEI file can't be processed. Header can’t come after body. It comes first with its tags.
All TEIs starts with an opened <TEI> tag and ends with closed </TEI> tag.
The necessary header tags are <teiHeader>, <fileDesc>, <titleStmt>, <title>, <publicationStmt> and <sourceDesc>. Not we intruduce them here:
teiHeader (TEI header) supplies descriptive and declarative metadata associated with a digital resource or set of resources.
fileDesc (file description) contains a full bibliographic description of an electronic file.
title title contains a title for any kind of work. Example <title>Hello TEI</title>
This is a simple structure of TEI:
<TEI xmlns="a url">
:::::header tags come here:::::
:::::body tags come here:::::
Also, the most important part of TEI file is xml-model. That’s exactly is XML specification that tells you how to behave (how to design your TEI/XML). Standard TEI has its own xml-model and you have to follow it.
So, how to modify your TEI metadata/tags? For example, you are willing to have some specific tags in the header file in order to control users and force them how to follow your specifications by filling out your desired tags.
ELAX NG (.rnc) is the solution here. ELAX NG (REgular LAnguage for XML Next Generation) is a schema language for XML - a RELAX NG schema specifies a pattern for the structure and content of an XML document.
Finally, you will need to specify version and encoding on the top of the page. "UTF-8" is default encoding for all mark-up languages. Also, there are more attributes xml-model and schematypens that are generating by editors (i.e. Oxygen) and you are not supposed to delete or change them.