Re: [relax-ng] Annotations in the non-XML syntax

From
John Cowan <>
Date
2002-03-19T11:12:37+00:00
ID
Thread
Re: [relax-ng] Annotations in the non-XML syntax
James Clark scripsit:

> - Just as adjacent patterns or name classes in a group require a connector
> (e.g. |), so annotation elements that are siblings of patterns or name
> classes require a connector (>)

I think that ">>" should be used instead of ">" (as in the previous
representation), because of its greater visibility.

> - There's one case where an arbitrary amount of lookahead is required: in
> order to determine whether a file contains a sequence of definitions or a
> pattern, you may have to lookahead past an annotation in square brackets,
> which can consist of arbitrarily many tokens (however, this is easily
> implementable in JavaCC without hackery)

This may be heresy, but it would be all right with me if the pattern
version wasn't represented in the non-XML syntax: any file containing
just a pattern can be prefixed with "start =" with no effect on
semantics.

> The non-XML syntax cannot represent the div element.

I continue to think that a bare curly-braces-block should be mapped
to div.  Some work would be needed after a datatype name and after
include, which are (?) the only places that make a block optional.

-- 
John Cowan <>     http://www.reutershealth.com
I amar prestar aen, han mathon ne nen,    http://www.ccil.org/~cowan
han mathon ne chae, a han noston ne 'wilith.  --Galadriel, _LOTR:FOTR_