Style Annotation¶
This is a text markup annotation type for applying styling to text. The actual styling is defined by the user-defined set definition and can for example included classes such as italics, bold, underline
Specification¶
Annotation Category: | |
---|---|
Declaration: |
|
Version History: | |
since v0.10 |
|
Element: |
|
API Class: |
|
Required Attributes: | |
Optional Attributes: | |
|
|
Accepted Data: |
|
Valid Context: | |
Feature subsets (extra attributes): | |
|
Explanation¶
The text markup element <t-style>
marks a specific portion of textual
concent to be rendered in a specific style. Styles in turn are simply classes in your
set.
Text-markup elements may always be nested.
Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <?xml version="1.0" encoding="utf-8"?>
<FoLiA xmlns="http://ilk.uvt.nl/folia" version="2.0" xml:id="example">
<metadata>
<annotations>
<text-annotation>
<annotator processor="p1" />
</text-annotation>
<sentence-annotation>
<annotator processor="p1" />
</sentence-annotation>
<linebreak-annotation>
<annotator processor="p1" />
</linebreak-annotation>
<part-annotation>
<annotator processor="p1" />
</part-annotation>
<style-annotation set="https://raw.githubusercontent.com/proycon/folia/master/setdefinitions/styles.foliaset.xml">
<annotator processor="p1" />
</style-annotation>
</annotations>
<provenance>
<processor xml:id="p1" name="proycon" type="manual" />
</provenance>
</metadata>
<text xml:id="example.text">
<s>
<t>To <t-style class="italic">be</t-style> or not to be,<br/>that is the <t-style class="bold"><t-style class="red">question</t-style></t-style>.</t>
</s>
</text>
</FoLiA>
|
In the next example, features are used rather than nested styles:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <?xml version="1.0" encoding="utf-8"?>
<FoLiA xmlns="http://ilk.uvt.nl/folia" version="2.4.2" xml:id="example">
<metadata>
<annotations>
<text-annotation>
<annotator processor="p1" />
</text-annotation>
<sentence-annotation>
<annotator processor="p1" />
</sentence-annotation>
<linebreak-annotation>
<annotator processor="p1" />
</linebreak-annotation>
<part-annotation>
<annotator processor="p1" />
</part-annotation>
<style-annotation set="https://raw.githubusercontent.com/proycon/folia/master/setdefinitions/styles.foliaset.xml">
<annotator processor="p1" />
</style-annotation>
</annotations>
<provenance>
<processor xml:id="p1" name="proycon" type="manual" />
</provenance>
</metadata>
<text xml:id="example.text">
<s>
<t>To <t-style class="italic">be</t-style> or not to be,<br/>that is the <t-style class="bold"><feat subset="color" class="red"/>question</t-style>.</t>
</s>
</text>
</FoLiA>
|