Parenthesised groups are used not only for establishing
order of precedence and atoms for quantification, but also for
creating subpatterns to be referenced by the replacementPattern
attribute.
replacementPattern
specifies a ‘replacement pattern’
which, once subpattern substitution has been performed, provides
a URI.
Status
Required
Datatype
<rng:text/>
text
Values
Should be the skeleton of a relative or absolute URI,
with references to groups in the matchPattern.
Note
The strings ‘$1’ through ‘$9’ are references to
the corresponding group in the regular expression specified
by re (counting open parenthesis, left to right).
Processors are expected to replace them with whatever matched
the corresponding group in the regular expression.
If a digit preceded by a dollar sign is needed in the
actual replacement pattern (as opposed to being used as a back
reference), the dollar sign must be written as
%24.
The result of the substitution may be either an absolute or a
relative URI reference. In the latter case it is combined with the
value of xml:base in force at the place where the
cRef attribute occurs to form an absolute URI in the
usual manner as prescribed by XML Base.