< freestyle markuplanguage >

Freestyle Concepts

There are 10 fundamental FML-concepts, that consider many requirements for a new markup generation. These concepts mainly arise from new possibilities in an unrestricted polyhierarchical environment. Each concept is concisely described and illustrated with examples using the features of FML documents and FML graphs.

Annotation
Declaration
Tagging
Attribution
Interference
Identification
Congruence
Independence
Segmentation
Fragmentation

Annotation

According to the two general characteristics for markup ([. . . ] part of the text, yet distinguishable from it. Raymond 1993), annotations are embedded in the content and separable from it. The position of markup-components (tag, comment, processing instruction, wildcard) in the content-sequence is very important: Changing it leads to a totally different document interpretation, a different FML graph. Markup embedding is based upon simple rules:

  1. Markup section start is indicated by the familiar symbol "<".

  2. Markup section end is indicated by the familiar symbol ">".

  3. If occurring in content or markup-identifiers, the markup-symbols "<" and ">" (as well as "\") may have to be escaped properly ("\<", "\>", "\\").

  4. The prolog-components are optional but have to be well ordered and the first annotations in the document.

  5. The other markup-components (start-, end-, empty- or multi-) tag, comment, processing instruction and wildcard may be inserted unrestricted into the content.

The following example illustrates the use of all markup-components (excl. prolog) in an wellformed FML document and the use of all nodes types in a corresponding FML graph.

FML content:
png image (fmlConceptAnnotationContent.png)

FML document:

<?palindrome start>
able was i
<!Bonaparte!>
e
<>
re i saw
<island latin="ilva">
    elba
</island>
annotation.fml

FML graph:
png image (fmlConceptAnnotationGraph.png)

FML graph (representing an empty document):
png image (fmlConceptAnnotationGraphEmpty.png)

Declaration

Informations about the document itself, perspectives and namespaces may be declared at the very beginning of an FML document. These declarations are optional and a support for authors, editors and external processors for the evaluation of the document. The attributes of each declaration are self-describing and relevant for all use cases of a declarative markup language. For document interpretation all declared informations will be lossless transformed into the attributed root of an FML graph, a node of the type fml.node.document.

The following example contains all of the optional declarations with all possible attributes.

FML document:

<@ fml.name="important institutions" fml.uri="http://www.freestyle-markup.org" fml.description="institutions relevant to FML" fml.version="1.0" fml.fragment="f1" fml.schema="temp.fsd" fml.trim="true" fml.writing-direction="lr">

<@ fml.perspective.name="org" fml.perspective.uri="http://de.wikipedia.org/wiki/Organisation" fml.perspective.description="organisations" fml.perspective.schema="org.fsd">

<@ fml.perspective.name="geo" fml.perspective.uri="http://de.wikipedia.org/wiki/Geographie" fml.perspective.description="geographic informations" fml.perspective.schema="geo.fsd">

<@ fml.namespace.name="iso31661" fml.namespace.uri="http://de.wikipedia.org/wiki/ISO_3166" fml.namespace.description="iso country codes">

<org|university>Universität Bremen<org|/university>,
<geo|iso31661:DE>Bremen<geo|/iso31661:DE>

<org|institute>Institut für Deutsche Sprache<org|/institute>,
<geo|iso31661:DE>Mannheim<geo|/iso31661:DE>

<org|conference>Balisage Conference<org|/conference>,
<geo|iso31661:CA>Montréal<geo|/iso31661:CA>
declaration.fml

Tagging

For FML the primary instrument for structuring document content are tags: empty-tags and start-tags with corresponding end-tags. A corresponding tag-pair forms an element in an FML graph interpretation and subordinates the data sequence in between. Tagging and interpretation is handled about the same as in XML/SGML, except that there are less restrictions and more features.

A root-element is possible, but not necessary. Isolated tags (tags with a missing corresponding start- or end-tag) are alright: Missing start or end is assumed beyond document borders (see concept fragmentation).

FML content * :
png image (fmlConceptTaggingContent.png)

FML document:

<cheer>
    Fix
    <canton>
        Schwyz
    </canton>
</cheer>
quäkt Jürgen blöd vom Pa
<orthography1903/>
ß!
tagging.fml

FML graph:
png image (fmlConceptTaggingGraph.png)

Attribution

Attributes refine tags and enrich them with additional informations. This specialization is realized by declaring an ordered list of attributes within start-tags or empty-tags in an FML document. Within one tag each attribute name must be unique. Therefore elements may possess an unlimited number of children, nodes of type fml.node.attribute. Each attribute again contains an ordered value-list.

According to the object-oriented inheritance paradigm FML offers a mechanism for passing on attributes from parents to children: An element e1 will inherit from element e0, if e1 is a direct or indirect child of e0. Neither this concept has syntactical implications for an FML document nor it influences the transformation into an FML graph. Rather the inheritance concept reflects on the level of implementation: With the method Attribut[] Element.getAttributes(boolean enableInheritance) attributes are queried with or without inheritance, depending on the parameter enableInheritance.

The following scenario illustrates concept and usage of inheritance.

FML content:
Markup of the content
png image (fmlConceptAttributionContent0.png)
by the typographic properties italic, black, red, and UPPERCASE is realized by the general formatting-tag f* and the specializing attributes style, color and ucase. Four markups along these properties will result in the following document structure:
png image (fmlConceptAttributionContent1.png)

FML document:

A
<f0 style="u" color="r">
    s
    <f1 color="b">lut n</f1>
    i
<f3 style="i">
    x
    <f2 ucase="t">es se</f2>
    x
</f0>
    in Tuls
</f3>
a
attribution.fml

FML graph:
png image (fmlConceptAttributionGraph.png)

Implementation:

f0.getAttributes(false): style="u"; color="r"
f0.getAttributes(true):  style="u"; color="r"

f1.getAttributes(false): color="b"
f1.getAttributes(true):  color="b"; style="u"

f2.getAttributes(false): ucase="t"
f2.getAttributes(true):  ucase="t"; style="i","u"; color="r"

f3.getAttributes(false): style="i"
f3.getAttributes(true):  style="i"

Interference

The markup of interfering structures is not subject to any restrictions and demands no special attention. Start- and endpositions of semantic segments are marked up separately and independently. Resulting interferences are absolutely permitted. A content-segment that is located in the markup-area of n corresponding tag-pairs will directly or indirectly be a child of n elements in an FML graph.

The following scenario illustrates the handling of overlapping. For clearness, the semantic markup segments are typographic ones.

FML content:
Marking up the content
png image (fmlConceptInterferenceContent0.png)
with the typographic properties italic (i), bold (b) and red (r)
png image (fmlConceptInterferenceContent1.png)
will result in the following document structure:
png image (fmlConceptInterferenceContent2.png)

FML document:

r <i> e d <r> r u </i> m </r> s i r <b> i s <r> m <i> u </b> r </r> d e </i> r
interference.fml

FML graph:
png image (fmlConceptInterferenceGraph.png)

Identification

The concept identification serves for the secure assignment of corresponding tags. Generally a start-tag and an end-tag will correspond, if they exhibit the same name in the same perspective and in the same namespace. But if a document contains several start-tags of the same name or several end-tags of the same name, then the identification of corresponding tags will be ambivalent for element-construction. This interpretation uncertainty will be dissolved with the concept identification: The assignment (applying tag-name-suffix ~IDi) of an unique identification key IDi to both parts of a tag-pair will weld them and assure correspondency.

This concept is convenient for scenarios where complex structures with interferring markup occur and where the available tag-set has a high degree of semantic overload.

The following typographic example illustrates the use of the concept identification:

FML content:
For the markup of the content
png image (fmlConceptIdentificationContent0.png)
along the typographic properties italic, bold and red
png image (fmlConceptIdentificationContent1.png)
only one formatting element (tag-name f) is available. The specialization of f gets effected with the attribute style and its value-range i for italic, b for bold and r for red. The resulting document structure is the following:
png image (fmlConceptIdentificationContent2.png)

If we now mark-up the interfering structures without applying the concept identification

r <f style="i"> e d <f style="r"> r u </f> m </f> s i r <f style="b"> i s <f style="r"> m <f style="i"> u </f> r </f> d e </f> r

then corresponding tags are defined from outside to inside (according to the properly-nested principle of XML). Thus that FML document would get interpreted in an FML graph as follows:
png image (fmlConceptIdentificationGraph0.png)
This default-interpretation of course does not reflect the real scenario, the real document structure. The question "Which <f> forms with which </f> an element?" must be determinable (actually 2! + 3! = 8 element arrangements are possible).

The right result can be achieved applying the simple and intuitive concept identification:

FML document:

r <f~i1 style="i"> e d <f~r1 style="r"> r u </f~i1> m </f~r1> s i r <f~b1 style="b"> i s <f~r2 style="r"> m <f~i2 style="i"> u </f~b1> r </f~r2> d e </f~i2> r
identification.fml

FML graph:
png image (fmlConceptIdentificationGraph1.png)

Congruence

The markup of congruent structures gets realized using indecomposable multiple-tags. A multiple-tag unites any number of start-tags, end-tags and empty-tags in an irrelevant order, not allowing any content in between.

The concept congruence ensures structural security and consistency. Placing tags one after another in a sequence results in unintended hierarchical relations and the feasibility to break congruence by inserting content between the tags.

The following scenario illustrates the markup of congruent structures:

FML content:
Marking up the content
png image (fmlConceptCongruenceContent0.png)
with the typographic properties italic (i), bold (b) and red (r)
png image (fmlConceptCongruenceContent1.png)
will result in the following document structure:
png image (fmlConceptCongruenceContent2.png)

FML document:

<<b><i>>Cigar? Toss it in a can. <</b></i><r>>It is so tragic.</r>
congruence.fml

FML graph:
png image (fmlConceptCongruenceGraph.png)

Independence

FML admits a consolidated markup of heterogeneous perspectives into one redundance-free document. One perspective represents an identified annotation layer. The components tag, processing instruction and wildcard may optionally be assigned to exactly one perspective. The assignment to a perspective Pi with the unique name Piname will be effected by inserting the prefix Piname| right after the markup delimiter < . This assignment concept applies for components, not for attributes or for each tag in a multiple-tag.

All of the perspectives in use will share the documents content. Components that are not explicit assigned to a perspective will be subordinated to the default-perspective. Thus each FML document contains at least one perspective.

Perspectives may optionally be declared in the prolog. Neither declared perspectives have to be in use in the document nor the perspectives in use in the document have to be declared in the prolog. For a document interpretation within an FML graph only the perspectives that are really in use will be transformed to a node of type fml.node.perspective. During transformation (FML documentFML graph) optionally any perspectives may get included or excluded.

The following example illustrates the application of the concept independence with two indepentent annotation layers structuring the same content:

FML content * :
Marking up the content
png image (fmlConceptIndependenceContent0.png)
with the typographic properties bold and red is accomplished differently by two Illustrators I1 and I2
png image (fmlConceptIndependenceContent1.png)
and results in the following document structures (bold=b, red=r):
png image (fmlConceptIndependenceContent2.png)

FML document I1:

Lewd <i1|b>did I live<i1|/b> & <i1|r>evil<i1|/r> I did dwel

FML graph I1:
png image (fmlConceptIndependenceGraph0.png)

FML document I2:

Lewd did I <i2|b>live & <i2|r>evil<i2|/b> I did<i2|/r> dwel

FML graph I2:
png image (fmlConceptIndependenceGraph1.png)

FML document I1 + I2:

Lewd <i1|b>did I <i2|b>live<i1|/b> & <i2|r><i1|r>evil<i1|/r><i2|/b> I did<i2|/r> dwel
independence.fml

FML graph I1 + I2:
png image (fmlConceptIndependenceGraph2.png)

Segmentation

The powerful concept segmentation offers the composition of new content based on segments of the existing content. A virtual element encapsulates the content of participating tags and will be subordinated to the corresponding perspective-node (fml.node.perspective) in an FML graph as a direct child with the constant position -1. Since beside position and run length also quantity and order of involved segments is arbitrary via the language inherent tag-attributes fml.segment.id and fml.segment.pos, boundless composition possibilities arise from the charachter pool of the linear content sequence of a document.

An intensive use of this concept will decrease readability, but for pure mechanical operating fulminant potentials arise. For instance the treasury of words of a language could without redundancy be entirely marked up based on only the alphabet characters of that language.

In the following example
png image (fmlConceptSegmentationContent0.png)
gets assembled from
png image (fmlConceptSegmentationContent1.png)

FML document:

ris
<s1 fml.segment.id="eve" fml.segment.pos="0">
    e
</s1>
to
<s2 fml.segment.id="eve" fml.segment.pos="1">
    v
</s2>
ot
<s3 fml.segment.id="eve" fml.segment.pos="2">
    e
</s3>
sir
segmentation.fml

FML graph:
png image (fmlConceptSegmentationGraph.png)

Fragmentation

A fragment of a wellformed FML document is also a wellformed FML document. As a consequence of that, start-tags or end-tags may also be arranged outside of the document borders. If a start-tag can not find a corresponding end-tag, then it may be assumed that it marks up to the very end of the document. For the purpose of document interpretation the missing end-tag will be inserted at the end of the document. If a end-tag can not find a corresponding start-tag, then it may be assumed that it marks up from the very beginning of the document. For the purpose of document interpretation the missing start-tag will be inserted at the beginning of the document. If several tags have to be added at the beginning or at the end of the document, then those are subsumed into one multiple-tag.

That automatic completion takes place during the transformation of an FML document to an FML graph. For an FML graph-node of type fml.node.element the attribute

fml.element.autocompleted = "start-tag" | "end-tag"

indicates that automatic completion applies. The re-transformation to an FML document will reconstruct the fragmented document with isolated tags.

The main benefits of the concept fragmentation are, that documents can be serialized and exchanged fragmented, and that - according to the requirement entropy - a sparingly encoding is generally possible.

In the following example FML document1 has been marked up with 4 tags. Each tag is isolated. Automatic completion (row 01 and 03) will lead to FML document2, which then may be interpreted in an FML graph.

FML document1:

si<t1~IDX>t on a po<t2>tato p<t3>an ot</t1>is
fragmentation.fml

FML document2:

<t1>
si<t1~IDX>t on a po<t2>tato p<t3>an ot</t1>is
</t1~IDX /t2 /t3>

FML graph:
png image (fmlConceptFragmentationGraph.png)