Exercise Example
From LMNLWiki
A short LMNL document illustrating just about every kind of LMNL construct. Please alert us to features that need to be illustrated, but aren't.
(For now, we will concentrate on features of LMNL itself, not of its serializations.)
More examples (and more extensive examples) are available: see LMNL Examples.
Features:
- Cleanly nested ranges (e.g., div inside div)
- Overlapping ranges
- Empty ranges (e.g. meta)
- Mixing (aka "self-overlap") - ranges overlapping ranges of the same type
- Multiple mixing (more than two ranges)
Eventual features:
- Atoms (apart from characters)
- Congruence (ranges over the same content)
[edit]
Sawtooth syntax
[div}
[head}Exercise example{head]
[div}
[head}Simple mixing{head]
[p}[o=o1}Overlap [o=o2}springs{o=o1] eternal{o=o2].{p]
{div]
[div}
[head}More mixing{head]
[p}[o=o4}Arbitrary [o=o5}[o]mixing{o=o4] is
interesting{o=o5] stuff.{p][o [eID}o6{eID]]
{div]
[div}
[head}Rhetorical elaborations{head]
[meta [author}WB Yeats{author]]
[stanza}
[l}[par [id}p1{id]}I measured all{par], brought all to mind{l]
[chi}[l}The years to come seemed [axis}waste of breath,{l]
[l}A waste of breath{axis] the years behind{l]{chi]
[l}[par [id}p1{id]}in balance with{par] [opp}this life, this death.{opp]{l]
{stanza]
{div]
{div]
[edit]
ECLIX syntax
Note: differences in whitespace from the sawtooth version!
<div xmlns:c="http://lmnl.net/clix">
<head>Exercise example</head>
<div>
<head>Simple mixing</head>
<p><o c:sID="o1"/>Overlap <o c:sID="o2"/>springs
<o c:eID="o1"/> eternal<o c:eID="o2"/>.</p>
</div>
<div>
<head>More mixing</head>
<p><o c:sID="o4"/>Arbitrary <o c:sID="o5"/>
<o c:sID="o6"/>mixing<o c:eID="o4"/> is
interesting<o c:eID="o5"/> stuff.<o eID="o6"/></p>
</div>
<div>
<head>Rhetorical elaborations</head>
<meta author="WB Yeats"/>
<stanza>
<l><par id="p1">I measured all</par>, brought all to mind</l>
<l><chi c:sID="rh1"/>The years to come seemed
<axis c:sID="a1"/>waste of breath,</l>
<l>A waste of breath<axis c:eID="a1"/> the years behind
<chi c:eID="rh1"/></l>
<l><par id="p1">in balance with</par> <opp>this life, this death.</opp></l>
</stanza>
</div>
</div>
