<s>
OmniMark	B-Application
is	O
a	O
fourth-generation	B-Language
programming	I-Language
language	I-Language
used	O
mostly	O
in	O
the	O
publishing	O
industry	O
.	O
</s>
<s>
It	O
is	O
currently	O
a	O
proprietary	B-Application
software	I-Application
product	O
of	O
Stilo	O
International	O
.	O
</s>
<s>
As	O
of	O
July	O
2022	O
,	O
the	O
most	O
recent	O
release	O
of	O
OmniMark	B-Application
was	O
11.0	O
.	O
</s>
<s>
OmniMark	B-Application
is	O
used	O
to	O
process	O
data	O
,	O
and	O
convert	O
it	O
from	O
one	O
format	O
to	O
another	O
,	O
using	O
a	O
streaming	B-Architecture
architecture	I-Architecture
that	O
allows	O
it	O
to	O
handle	O
large	O
volumes	O
of	O
content	O
sequentially	O
without	O
having	O
to	O
keep	O
it	O
all	O
in	O
memory	O
.	O
</s>
<s>
It	O
has	O
a	O
built-in	O
XML	B-Protocol
parser	I-Protocol
,	O
and	O
support	O
for	O
XQuery	B-Language
via	O
integration	O
with	O
Sedna	B-Application
native	O
XML	B-Protocol
database	O
.	O
</s>
<s>
It	O
also	O
has	O
features	O
to	O
process	O
find	O
rules	O
which	O
implement	O
a	O
similar	O
concept	O
to	O
regular	B-Language
expressions	I-Language
,	O
although	O
the	O
pattern	O
expression	O
syntax	O
is	O
more	O
English-like	O
than	O
the	O
regular	B-Language
expression	I-Language
syntax	O
used	O
in	O
Perl	B-Language
and	O
other	O
languages	O
like	O
the	O
Ruby	B-Language
programming	I-Language
language	I-Language
,	O
both	O
of	O
which	O
are	O
more	O
widely	O
used	O
than	O
OmniMark	B-Application
.	O
</s>
<s>
OmniMark	B-Application
can	O
also	O
be	O
used	O
for	O
schema	O
transformation	O
tasks	O
in	O
the	O
same	O
way	O
as	O
XSLT	B-Application
,	O
but	O
supports	O
switching	O
between	O
procedural	O
and	O
functional	O
code	O
without	O
the	O
need	O
for	O
any	O
additional	O
constructs	O
to	O
support	O
the	O
procedural	O
elements	O
.	O
</s>
<s>
OmniMark	B-Application
was	O
originally	O
created	O
in	O
the	O
1980s	O
by	O
Exoterica	O
,	O
a	O
Canadian	O
software	O
company	O
,	O
as	O
a	O
SGML	B-Language
processing	O
program	O
called	O
XTRAN	O
.	O
</s>
<s>
XTRAN	O
was	O
later	O
renamed	O
OmniMark	B-Application
,	O
and	O
Exoterica	O
became	O
OmniMark	B-Application
Technologies	O
.	O
</s>
<s>
The	O
current	O
owners	O
of	O
OmniMark	B-Application
,	O
Stilo	O
International	O
,	O
have	O
their	O
main	O
offices	O
in	O
the	O
UK	O
but	O
also	O
maintain	O
an	O
office	O
in	O
Canada	O
.	O
</s>
<s>
In	O
1999	O
,	O
OmniMark	B-Application
president	O
and	O
CEO	O
John	O
McFadden	O
announced	O
that	O
OmniMark	B-Application
5	O
would	O
be	O
available	O
free	O
of	O
charge	O
,	O
to	O
better	O
compete	O
with	O
Perl	B-Language
.	O
</s>
<s>
OmniMark	B-Application
is	O
no	O
longer	O
distributed	O
under	O
such	O
a	O
model	O
.	O
</s>
<s>
OmniMark	B-Application
treats	O
input	O
as	O
a	O
flow	O
that	O
can	O
be	O
scanned	O
once	O
,	O
rather	O
than	O
as	O
a	O
static	O
collection	O
of	O
data	O
that	O
supports	O
random	O
access	O
.	O
</s>
<s>
Much	O
of	O
an	O
OmniMark	B-Application
program	O
is	O
in	O
the	O
form	O
of	O
condition	O
=>	O
action	O
rule	O
where	O
the	O
condition	O
recognizes	O
a	O
length	O
of	O
data	O
to	O
be	O
acted	O
upon	O
and	O
the	O
action	O
specifies	O
what	O
is	O
to	O
be	O
done	O
with	O
the	O
data	O
.	O
</s>
<s>
An	O
element	O
rule	O
,	O
which	O
can	O
only	O
be	O
used	O
with	O
structured	O
documents	O
(	O
well-formed	O
XML	B-Protocol
,	O
valid	O
XML	B-Protocol
,	O
or	O
SGML	B-Language
)	O
,	O
recognizes	O
a	O
complete	O
element	O
:	O
the	O
start	O
tag	O
,	O
the	O
element	O
content	O
,	O
and	O
the	O
end	O
tag	O
.	O
</s>
<s>
OmniMark	B-Application
manages	O
the	O
nesting	O
in	O
such	O
a	O
way	O
that	O
the	O
element	O
rules	O
can	O
be	O
defined	O
independently	O
of	O
each	O
other	O
.	O
</s>
<s>
Patterns	O
are	O
used	O
like	O
regular	B-Language
expressions	I-Language
in	O
other	O
languages	O
(	O
python	O
,	O
Perl	B-Language
,	O
awk	O
,	O
...	O
)	O
but	O
have	O
an	O
English-like	O
syntax	O
that	O
facilitates	O
the	O
creation	O
of	O
complex	O
expressions	O
.	O
</s>
<s>
When	O
parsing	O
a	O
structured	O
document	O
,	O
patterns	O
can	O
be	O
used	O
on	O
text	O
going	O
into	O
the	O
parser	B-Language
or	O
on	O
text	O
coming	O
out	O
of	O
the	O
parser	B-Language
.	O
</s>
<s>
OmniMark	B-Application
sees	O
input	O
as	O
a	O
flow	O
;	O
a	O
program	O
does	O
not	O
hold	O
input	O
data	O
in	O
memory	O
unless	O
part	O
of	O
the	O
data	O
has	O
been	O
saved	O
in	O
variables	O
.	O
</s>
<s>
As	O
the	O
input	O
flows	O
by	O
,	O
OmniMark	B-Application
maintains	O
an	O
element	O
stack	O
containing	O
information	O
that	O
can	O
be	O
used	O
to	O
guide	O
the	O
transformation	O
of	O
text	O
via	O
the	O
OmniMark	B-Application
pattern-matching	O
facility	O
.	O
</s>
<s>
When	O
each	O
start	O
tag	O
is	O
encountered	O
,	O
OmniMark	B-Application
pushes	O
another	O
element	O
description	O
on	O
the	O
stack	O
.	O
</s>
<s>
The	O
element	O
description	O
includes	O
the	O
element	O
name	O
,	O
the	O
attribute	O
names	O
with	O
the	O
types	O
and	O
values	O
of	O
the	O
attributes	O
,	O
along	O
with	O
other	O
information	O
from	O
the	O
parser	B-Language
(	O
such	O
as	O
whether	O
that	O
element	O
is	O
an	O
EMPTY	O
element	O
)	O
.	O
</s>
<s>
With	O
SGML	B-Language
,	O
some	O
tags	O
may	O
be	O
omitted	O
,	O
but	O
OmniMark	B-Application
acts	O
as	O
if	O
the	O
tags	O
were	O
present	O
and	O
in	O
the	O
right	O
places	O
.	O
</s>
<s>
An	O
OmniMark	B-Application
program	O
uses	O
element	O
rules	O
to	O
process	O
XML	B-Protocol
or	O
SGML	B-Language
documents	O
.	O
</s>
<s>
passes	O
control	O
back	O
to	O
the	O
parser	B-Language
by	O
requesting	O
the	O
parsed	O
content	O
of	O
the	O
element	O
in	O
the	O
special	O
value	O
"	O
%c	O
"	O
.	O
</s>
<s>
Element	O
rules	O
are	O
suspended	O
while	O
waiting	O
for	O
the	O
parser	B-Language
to	O
finish	O
parsing	O
their	O
content	O
.	O
</s>
<s>
The	O
tags	O
before	O
the	O
current	O
point	O
in	O
the	O
input	O
have	O
already	O
gone	O
through	O
the	O
parser	B-Language
,	O
so	O
the	O
element	O
stack	O
already	O
has	O
a	O
description	O
of	O
the	O
element	O
(	O
or	O
nested	O
elements	O
)	O
that	O
contain	O
the	O
text	O
.	O
</s>
<s>
This	O
can	O
greatly	O
reduce	O
the	O
size	O
and	O
complexity	O
of	O
a	O
program	O
and	O
,	O
in	O
the	O
case	O
of	O
XML	B-Protocol
documents	I-Protocol
,	O
can	O
make	O
a	O
program	O
very	O
tolerant	O
of	O
changes	O
in	O
the	O
structure	O
of	O
the	O
input	O
document	O
.	O
</s>
<s>
OmniMark	B-Application
can	O
accept	O
well-formed	O
XML	B-Protocol
,	O
valid	O
XML	B-Protocol
or	O
SGML	B-Language
as	O
structured	O
input	O
.	O
</s>
<s>
This	O
program	O
replaces	O
the	O
omitted	O
tags	O
in	O
a	O
simple	O
SGML	B-Language
document	O
and	O
outputs	O
something	O
similar	O
to	O
well-formed	O
XML	B-Protocol
.	O
</s>
<s>
The	O
program	O
does	O
not	O
translate	O
SGML	B-Language
empty	O
tags	O
correctly	O
to	O
XML	B-Protocol
empty	O
tags	O
and	O
it	O
does	O
not	O
handle	O
many	O
of	O
the	O
SGML	B-Language
features	O
that	O
can	O
be	O
used	O
in	O
SGML	B-Language
documents	O
.	O
</s>
