[relaxng-user] line terminator in compact syntax

David Tolpin dvd at davidashen.net
Sat Dec 6 02:09:39 ICT 2003

> On Tue, 2003-11-25 at 16:14, David Tolpin wrote:
> > Hi,
> > 
> > do I understand it correctly that while #xA terminates a comment and is a whitespace
> > in the compact syntax,
> Right. This ensures that a user can always replace any literal character
> in the original source by an escape.
> >  #xD does not and is not?
> Right.  There didn't seem any reason why it should be whitespace.
> This is covered by:
> http://relaxng.org/compact.html#t-separator


I implemented it as it is covered by the specification. What caused my question is that

> Representations of newlines are normalized to a newline marker. Specifically,
> each occurrence of
> * a #xA character,
> * a #xD character that is not followed by a #xA character, or
> * a #xD, #xA character pair
> is transformed to a newline marker. The result of this stage is thus a sequence
> whose members are Unicode characters and newline markers.

But if I replace literal characters in the original source, the interpretation will
be different, since #xD, when escaped, is not normalized to newline marker and is not
a line terminator.

I am just trying to make sure that I got it right. I want my interpretation to be
complying to the specification.


More information about the relaxng-user mailing list