Skip to content

tutorials: bosnian translation (BA) #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _tutorials-BA/100_structure/100_Structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: tutorials
type: tutorial
name: "BEGINNERS: XML basics and minimal MEI structure"
fullname: "A short tutorial about the basics of XML & MEI"
data: "100_structure.json"
---
81 changes: 81 additions & 0 deletions _tutorials-BA/100_structure/100_structure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"steps": [
{
"label":"Welcome to MEI",
"descFile": "100_structure_step-00-desc.html"
},
{
"label": "The MEI root element",
"editorLines": 1,
"descFile": "100_structure_step-01-desc.html",
"prefillFile": "100_structure_step-01-prefill.xml",
"xmlFile": "100_structure_step-01.xml",
"xpaths": [
{"rule": "count(//mei) = 1", "renderanyway": true, "hint": "You need one mei element."}
]
},
{
"label": "The MEI namespace",
"editorLines": 1,
"descFile": "100_structure_step-02-desc.html",
"prefillFile": "100_structure_step-02-prefill.xml",
"xmlFile": "100_structure_step-02.xml",
"xpaths": [
{"rule": "count(*[local-name()='mei']) = 1", "renderanyway": true, "hint": "You need one mei element."},
{"rule": "*[local-name()='mei' and namespace-uri()='http://www.music-encoding.org/ns/mei']", "renderanyway": true, "hint": "You need a @xmlns declaration with the mei namespace 'http://www.music-encoding.org/ns/mei'."}
]
},
{
"label": "Two basic child elements",
"editorLines": 4,
"descFile": "100_structure_step-03-desc.html",
"prefillFile": "100_structure_step-03-prefill.xml",
"xmlFile": "100_structure_step-03.xml",
"xpaths": [
{"rule": "count(//*[local-name()='mei']) = 1", "renderanyway": false, "hint": "You need one mei element."},
{"rule": "*[local-name()='mei' and namespace-uri()='http://www.music-encoding.org/ns/mei']", "renderanyway": true, "hint": "You need a @xmlns declaration with the mei namespace 'http://www.music-encoding.org/ns/mei' in the mei element."},
{"rule": "count(//*[local-name()='meiHead']) = 1", "renderanyway": false, "hint": "You need one meiHead element."},
{"rule": "//*[local-name()='mei']/*[local-name()='meiHead']", "renderanyway": false, "hint": "meiHead has to a be child of the mei element."},
{"rule": "count(//*[local-name()='music']) = 1", "renderanyway": false, "hint": "You need one music element."},
{"rule": "//*[local-name()='mei']/*[local-name()='music']", "renderanyway": false, "hint": "music has to a be child of the mei element."},
{"rule": "//*[local-name()='mei']/*[local-name()='meiHead']/following-sibling::*[local-name()='music']", "renderanyway": false, "hint": "music has to follow the meiHead element."}
]
},
{
"label": "The minimum MEI header",
"editorLines": 11,
"descFile": "100_structure_step-04-desc.html",
"prefillFile": "100_structure_step-04-prefill.xml",
"xmlFile": "100_structure_step-04.xml",
"xpaths": [
{"rule": "count(//*[local-name()='mei']) = 1", "renderanyway": false, "hint": "You need one mei element."},
{"rule": "*[local-name()='mei' and namespace-uri()='http://www.music-encoding.org/ns/mei']", "renderanyway": true, "hint": "You need a @xmlns declaration with the mei namespace 'http://www.music-encoding.org/ns/mei' in the mei element."},
{"rule": "count(//*[local-name()='meiHead']) = 1", "renderanyway": false, "hint": "You need one meiHead element."},
{"rule": "//*[local-name()='mei']/*[local-name()='meiHead']", "renderanyway": false, "hint": "meiHead has to be a child of the mei element."},
{"rule": "count(//*[local-name()='music']) = 1", "renderanyway": false, "hint": "You need one music element."},
{"rule": "//*[local-name()='mei']/*[local-name()='music']", "renderanyway": false, "hint": "music has to be a child of the mei element."},
{"rule": "//*[local-name()='mei']/*[local-name()='meiHead']/following-sibling::*[local-name()='music']", "renderanyway": false, "hint": "music has to follow the meiHead element."},
{"rule": "count(//*[local-name()='fileDesc']) = 1", "renderanyway": false, "hint": "You need one fileDesc element."},
{"rule": "//*[local-name()='meiHead']/*[local-name()='fileDesc']", "renderanyway": false, "hint": "fileDesc has to be a child of the meiHead element."},
{"rule": "count(//*[local-name()='titleStmt']) = 1", "renderanyway": false, "hint": "You need one titleStmt element."},
{"rule": "//*[local-name()='fileDesc']/*[local-name()='titleStmt']", "renderanyway": false, "hint": "titleStmt has to be a child of the fileDesc element."},
{"rule": "count(//*[local-name()='pubStmt']) = 1", "renderanyway": false, "hint": "You need one pubStmt element."},
{"rule": "//*[local-name()='fileDesc']/*[local-name()='pubStmt']", "renderanyway": false, "hint": "pubStmt has to be a child of the fileDesc element."},
{"rule": "//*[local-name()='fileDesc']/*[local-name()='titleStmt']/following-sibling::*[local-name()='pubStmt']", "renderanyway": false, "hint": "pubStmt has to follow the titleStmt element."},
{"rule": "count(//*[local-name()='title']) = 1", "renderanyway": false, "hint": "You need one title element."},
{"rule": "//*[local-name()='titleStmt']/*[local-name()='title']", "renderanyway": false, "hint": "title has to be a child of the titleStmt element."}
]
}
],
"end": "100_structure_end.html",
"resp":[
{
"name":"Stefan Münnich",
"affiliation":"Anton Webern Gesamtausgabe | University of Basel"
},
{
"name":"Johannes Kepper",
"affiliation":"Beethovens Werkstatt | Universität Paderborn"
}
]
}
31 changes: 31 additions & 0 deletions _tutorials-BA/100_structure/100_structure_end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div>
<h3>Congratulations!</h3>
<p>
You have just written a valid MEI file and successfully finished this tutorial. You should be able now</p>
<ul>
<li>to understand the basic principles of XML and how it is the basis for MEI</li>
<li>to identify and to write the outermost basic structure of an MEI-conformant document
including its title</li>
<li>to differentiate between two main sections of a MEI file responsible for metadata information
(<code>&lt;meiHead&gt;</code>) or information about the musical content (<code>&lt;music&gt;</code>).</li>
</ul>
<p>
Since the topics addressed in this tutorial referred to the chapter <a href="https://music-encoding.org/guidelines/v4/content/shared.html#sharedStructuralElements" target="_blank" rel="noopener, noreferrer">Structural Elements</a> of the MEI Guidelines,
we recommend to consult this chapter whenever you need more detailed information.
</p>
<p>
Of course, a lot more is needed for a comprehensive MEI file – we left out all information about any musical
content like measures, staves, or notes, and you also need to learn how to set up meter, key, and clefs.
Here are some other tutorials we would like to recommend as next steps with MEI. Of course, you can always come
back to these (or even this one) when you would like to remind yourself how to do certain things in MEI.
</p>
<p>
As soon as you have familiarized yourself with MEI to some degree, we invite you to share your
experience with the <a href="/community/community-contacts.html" target="_blank" rel="noopener, noreferrer">MEI Community</a>
and write a tutorial on an aspect of MEI that you're particularly interested in. You don't have to be an expert
for this – it's good to have tutorials on different levels, and very often a tutorial written by other beginners
which just mastered a task is easier to follow than a guide written by someone who's not seeing the problem at all.
We do have a <a href="./tutorials.html" target="_blank" rel="noopener, noreferrer">tutorial on how to write tutorials</a>,
and there are templates to follow. It's that easy to become an active member of the MEI Community :-)
</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div>
<p>
In this tutorial, you will get accustomed with some very basic XML backgrounds and learn about the outermost
structure of a valid MEI document. You will learn to identify different parts of an MEI file and which type of
information you can expect in which part.
</p>
<p>
The topics addressed in this tutorial are referring to the chapter <a href="https://music-encoding.org/guidelines/v4/content/shared.html#sharedStructuralElements" target="_blank" rel="noopener, noreferrer">Structural Elements</a> of the MEI Guidelines. We recommend to consult this
chapter whenever you need more detailed information.
</p>
<p>
Please be aware that the code you write in this tutorial cannot be immediately rendered because it lacks information
about any actual musical content.
</p>
<p>
However, after you have finished this tutorial, you may want to do other tutorials, which will introduce you to
other important aspects of MEI. (Many of them include renderable music encodings.) These tutorials also serve as simple
reference to MEI – you can always go back to them.
</p>
<p>In order to get started, please hit the "continue" button on the lower right of this paragraph.</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div>
<p class="tutorialGoal">
Step one: get accustomed with some very basic XML backgrounds and learn about the root
element of MEI.
</p>
<p>
MEI uses <a href="https://en.wikipedia.org/wiki/XML" target="_blank" rel="noopener, noreferrer">XML</a> to represent music notation. XML is a hierarchical
encoding system in which elements are the core objects. They are represented using so called “tags”. Most of the
time these tags consist of an opening tag (that is a name enclosed in angle brackets like
<code>&lt;element&gt;</code>) and its corresponding closing tag (<code>&lt;/element&gt;</code>). If there is no content
between these two tags (like text or other elements) the element can be shortened to a so called self-closing
tag of the form <code>&lt;element /&gt;</code>. In any case, every opened tag must be closed later on.
</p>
<p>
You can think of an XML document like a tree that branches from one (outer) root element to nested (inner) child
elements. The root element is the parent of all other elements. In MEI documents, this root element is called –
for obvious reasons – <code>&lt;mei&gt;</code>, but it could have been any arbitrary name.
</p>

<p class="task">Enter a <code>&lt;mei&gt;</code> root element in the editor below. Do not forget to close the opening tag by a corresponding closing tag.</p>

<p>
PS: We will cover some more basic XML principles in the next steps. For more detailed information consider to have a
look at the dozens of materials available on the web, e.g. the
<a href="https://www.tei-c.org/release/doc/tei-p5-doc/en/html/SG.html" target="_blank" rel="noopener, noreferrer">Gentle Introduction to XML</a> of the
Text Encoding Initative (<a href="https://tei-c.org/" target="_blank" rel="noopener, noreferrer">TEI</a>).
</p>

</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- Your encoding should replace this line -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div>
<p class="tutorialGoal">
Step two: learn about the application and use of namespaces.
</p>
<p>
Fine! As mentioned in the previous step, the name of the root element of an XML document is basically an arbitrary
name that provides no meaning in itself for machine-processing. To make clear in which context an element is
defined and to avoid name conflicts with elements, XML makes use of so called
<a href="https://en.wikipedia.org/wiki/XML_namespace" target="_blank" rel="noopener, noreferrer">namespaces</a>.
Namespaces can be declared by adding an <code>@xmlns</code> namespace declaration to the root element.
</p>
<p>
For example, the MEI namespace is <code>http://www.music-encoding.org/ns/mei</code> and can be declared
as follows: <code>xmlns="http://www.music-encoding.org/ns/mei"</code>
</p>
<p>
Whenever you see an entity with a prepended <code>@</code>-sign in the text (like <code>@xmlns</code> above),
this means we refer to an XML attribute. (This kind of reference is common practice and originates in the
<a href="https://en.wikipedia.org/wiki/XPath" target="_blank" rel="noopener, noreferrer">XPath</a> language.)
Attributes contain specified information (attribute values) that are related to elements. However, unlike
elements, XML attributes do not have their own opening or closing brackets, but are placed solely inside the
opening tag of an element, next to the element's name. They consist of the plain attribute's name connected by
an equal sign to an attribute's value which must always be quoted (with single or double quotes). Multiple
attributes are separated by blank spaces. Be aware that the <code>@</code>-sign is only prepended in textual
descriptions, not in the encoding itself.
</p>

<p class="task">In the editor below, add a MEI namespace declaration to the <code>MEI</code> root element.</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mei></mei>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<div>
<p class="tutorialGoal">
Step three: learn about the main child elements of the <code>&lt;mei&gt;</code> root element: <code>&lt;meiHead&gt;</code>
and <code>&lt;music&gt;</code>.
</p>
<p>
Well done! Now, that we have declared a namespace within our root element, all other elements nested in the root
element can be resolved according to the MEI namespace by machine-processing.
</p>
As already mentioned, you can think of an XML document like a tree that branches from one (outer) root element
to nested (inner) child elements. A MEI-encoded file contains at least two structures within the
<code>&lt;mei&gt;</code> root element:
</p>
<ul>
<li>
<code>&lt;meiHead&gt;</code> - contains a set of elements that supply metadata related to the MEI encoding, including
bibliographic information, responsibility statements, encoding standards, or provenance.
</li>
<li>
<code>&lt;music&gt;</code> - contains a set of elements that provide for the encoding of the actual musical content.
Beside others, it may comprise structural elements to describe the form of a musical piece (sections,
movements, document groups), or notational elements, like e.g. notes, rest, articluations, or dynamics.
</li>
</ul>

<p class="task">In the editor below, add a <code>&lt;meiHead&gt;</code> and a <code>&lt;music&gt;</code> element inside the
<code>&lt;mei&gt;</code> root element.</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<mei xmlns="http://www.music-encoding.org/ns/mei">
<!-- Your encoding should replace this line -->
</mei>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div>
<p class="tutorialGoal">
Step four: provide the minimum necessary information for the MEI header.
</p>
<p>
Perfect! You are now pretty close to a valid basic MEI file structure. What is missing yet, are two mandatory
elements of the MEI header:
<ul>
<li>
<code>&lt;titleStmt&gt;</code> - a container element for title and responsibility meta-data. The title of a
bibliographic entity is given via its mandatory sub-element <code>&lt;title&gt;</code>;
</li>
<li>
<code>&lt;pubStmt&gt;</code> - a container element for information regarding the publication or distribution of a
bibliographic item, including the publisher's name and address, the date of publication, and other relevant
details.
</li>
</ul>
<p>
Both these elements are part of the file description (<code>&lt;fileDesc&gt;</code>), which is a direct child element
of <code>&lt;meiHead&gt;</code> and provides for a full bibliographic description of a MEI file.</p>

<p class="task">In the editor below, add a <code>&lt;fileDesc&gt;</code> element inside the given <code>&lt;meiHead&gt;</code>.
Then add the mandatory <code>&lt;titleStmt&gt;</code> and <code>&lt;pubStmt&gt;</code> elements to
<code>&lt;fileDesc&gt;</code> and a <code>&lt;title&gt;</code> element to <code>&lt;titleStmt&gt;</code>.</p>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<mei xmlns="http://www.music-encoding.org/ns/mei">
<meiHead>
<!-- Your encoding should replace this line -->
</meiHead>
<music></music>
</mei>
7 changes: 7 additions & 0 deletions _tutorials-BA/101_quickstart/101_Quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: tutorials
type: tutorial
name: "BEGINNERS: Quickstart"
fullname: "A 5-minute Quickstart tutorial for MEI"
data: "101_quickstart.json"
---
Loading