<s>
In	O
computing	O
,	O
RELAX	B-Language
NG	I-Language
(	O
REgular	O
LAnguage	O
for	O
XML	B-Protocol
Next	O
Generation	O
)	O
is	O
a	O
schema	B-Language
language	O
for	O
XML	B-Protocol
—	O
a	O
RELAX	B-Language
NG	I-Language
schema	B-Language
specifies	O
a	O
pattern	O
for	O
the	O
structure	O
and	O
content	O
of	O
an	O
XML	B-Protocol
document	I-Protocol
.	O
</s>
<s>
A	O
RELAX	B-Language
NG	I-Language
schema	B-Language
is	O
itself	O
an	O
XML	B-Protocol
document	I-Protocol
but	O
RELAX	B-Language
NG	I-Language
also	O
offers	O
a	O
popular	O
compact	O
,	O
non-XML	O
syntax	O
.	O
</s>
<s>
Compared	O
to	O
other	O
XML	B-Language
schema	I-Language
languages	O
RELAX	B-Language
NG	I-Language
is	O
considered	O
relatively	O
simple	O
.	O
</s>
<s>
It	O
was	O
defined	O
by	O
a	O
committee	O
specification	O
of	O
the	O
OASIS	O
RELAX	B-Language
NG	I-Language
technical	O
committee	O
in	O
2001	O
and	O
2002	O
,	O
based	O
on	O
Murata	O
Makoto	O
's	O
RELAX	B-Language
and	O
James	O
Clark	O
's	O
TREX	B-Language
,	O
and	O
also	O
by	O
part	O
two	O
of	O
the	O
international	O
standard	O
ISO/IEC	B-Language
19757	I-Language
:	O
Document	B-Language
Schema	I-Language
Definition	I-Language
Languages	I-Language
(	O
DSDL	B-Language
)	O
.	O
</s>
<s>
Suppose	O
we	O
want	O
to	O
define	O
an	O
extremely	O
simple	O
XML	B-Protocol
markup	O
scheme	O
for	O
a	O
book	O
:	O
a	O
book	O
is	O
defined	O
as	O
a	O
sequence	O
of	O
one	O
or	O
more	O
pages	O
;	O
each	O
page	O
contains	O
text	O
only	O
.	O
</s>
<s>
A	O
sample	O
XML	B-Protocol
document	I-Protocol
instance	O
might	O
be	O
:	O
</s>
<s>
A	O
RELAX	B-Language
NG	I-Language
schema	B-Language
can	O
be	O
written	O
in	O
a	O
nested	O
structure	O
by	O
defining	O
a	O
root	O
element	O
that	O
contains	O
further	O
element	O
definitions	O
,	O
which	O
may	O
themselves	O
contain	O
embedded	O
definitions	O
.	O
</s>
<s>
A	O
schema	B-Language
for	O
our	O
book	O
in	O
this	O
style	O
,	O
using	O
the	O
full	O
XML	B-Protocol
syntax	O
,	O
would	O
be	O
written	O
:	O
</s>
<s>
Nested	O
structure	O
becomes	O
unwieldy	O
with	O
many	O
sublevels	O
and	O
cannot	O
define	O
recursive	O
elements	O
,	O
so	O
most	O
complex	O
RELAX	B-Language
NG	I-Language
schemas	O
use	O
references	O
to	O
named	O
pattern	O
definitions	O
located	O
separately	O
in	O
the	O
schema	B-Language
.	O
</s>
<s>
Here	O
,	O
a	O
"	O
flattened	O
schema	B-Language
"	O
defines	O
precisely	O
the	O
same	O
book	O
markup	O
as	O
the	O
previous	O
example	O
:	O
</s>
<s>
RELAX	B-Language
NG	I-Language
compact	O
syntax	O
is	O
a	O
non-XML	O
format	O
inspired	O
by	O
extended	O
Backus	O
–	O
Naur	O
form	O
and	O
regular	B-Language
expressions	I-Language
,	O
designed	O
so	O
that	O
it	O
can	O
be	O
unambiguously	O
translated	O
to	O
its	O
XML	B-Protocol
counterpart	O
,	O
and	O
back	O
again	O
,	O
with	O
one-to-one	O
correspondence	O
in	O
structure	O
and	O
meaning	O
,	O
in	O
much	O
the	O
same	O
way	O
that	O
Simple	B-Language
Outline	I-Language
XML	I-Language
(	O
SOX	O
)	O
relates	O
to	O
XML	B-Protocol
.	O
</s>
<s>
Here	O
is	O
the	O
compact	O
form	O
of	O
the	O
above	O
schema	B-Language
:	O
</s>
<s>
A	O
compact	O
RELAX	B-Language
NG	I-Language
parser	O
will	O
treat	O
these	O
two	O
as	O
the	O
same	O
pattern	O
.	O
</s>
<s>
Although	O
the	O
RELAX	B-Language
NG	I-Language
specification	O
was	O
developed	O
at	O
roughly	O
the	O
same	O
time	O
as	O
the	O
W3C	O
XML	B-Language
Schema	I-Language
specification	O
,	O
the	O
latter	O
was	O
arguably	O
better	O
known	O
and	O
more	O
widely	O
implemented	O
in	O
both	O
open-source	O
and	O
proprietary	O
XML	B-Protocol
parsers	I-Protocol
and	O
editors	O
when	O
it	O
became	O
a	O
W3C	O
Recommendation	O
in	O
2001	O
.	O
</s>
<s>
Since	O
then	O
,	O
however	O
,	O
RELAX	B-Language
NG	I-Language
support	O
has	O
increasingly	O
found	O
its	O
way	O
into	O
XML	B-Protocol
software	O
,	O
and	O
its	O
acceptance	O
has	O
been	O
aided	O
by	O
its	O
adoption	O
as	O
a	O
primary	O
schema	B-Language
for	O
popular	O
document-centric	O
markup	O
languages	O
such	O
as	O
DocBook	B-Protocol
,	O
the	O
TEI	B-Language
Guidelines	O
,	O
OpenDocument	B-Application
,	O
and	O
EPUB	O
.	O
</s>
<s>
RELAX	B-Language
NG	I-Language
shares	O
with	O
W3C	O
XML	B-Language
Schema	I-Language
many	O
features	O
that	O
set	O
both	O
apart	O
from	O
traditional	O
DTDs	O
:	O
data	O
typing	O
,	O
regular	B-Language
expression	I-Language
support	O
,	O
namespace	O
support	O
,	O
ability	O
to	O
reference	O
complex	O
definitions	O
.	O
</s>
<s>
By	O
informal	O
convention	O
,	O
RELAX	B-Language
NG	I-Language
schemas	O
in	O
the	O
regular	O
syntax	O
are	O
typically	O
named	O
with	O
the	O
filename	O
extension	O
"	O
.rng	O
"	O
.	O
</s>
<s>
For	O
schemas	O
in	O
the	O
compact	O
syntax	O
,	O
the	O
extension	O
"	O
.rnc	B-Language
"	O
is	O
used	O
.	O
</s>
<s>
Relax	B-Language
NG	I-Language
schemas	O
can	O
be	O
converted	O
to	O
DTDs	O
by	O
applying	O
Trang	O
which	O
can	O
be	O
found	O
at	O
:	O
.	O
</s>
<s>
Note	O
that	O
Trang	O
is	O
unable	O
to	O
convert	O
the	O
OASIS	O
DITA	B-Language
1.3	O
schema	B-Language
to	O
DTDs	O
,	O
failing	O
with	O
messages	O
like	O
:	O
</s>
