Next in thread → Next in month →

Re: [relax-ng] Further comments on the compatc syntax spec

From
James Clark <>
Date
2002-10-24T07:40:14+00:00
ID
00a701c27b30$51795cf0$
Thread
Re: [relax-ng] Further comments on the compatc syntax spec
> - The third para of A.1.  "named non-terminals" should read
>   "named terminals".

You mean "named non-terminal" should read "named terminal" (in the
penultimate sentence of that paragraph) right?

> (Does the spec use two BNFs (one for
>   lexical analysis and another for real work) or one BNF?

Two BNFs.

> - What is a context in this spec?  It appears that contexts include
>   datatype declarations.  However, contexts are not defined in this
>   spec, and contexts in this spec are different from contexts
>   defined in the RELAX NG spec.  It is probably a good idea to
>   pick a different word.

Point taken.  How about environement (abbreviated to env in semantic rules)?

An environment is a pair <x, y>, where x is the namespace environment and y
is the datatypes environment.  The datatypes environment is just a mapping
from prefixes to URIs.  The namespace environment consists of a default
namespace URI a mapping from prefixes to namespace URI, where a namespace
URI is a string or the special value inherit.

> - foo(x, y) should read foo(x, y, ...), since more than two
>   arguments are allowed.

Agreed.

> - bindDatattypePrefix and lookupDatatypePrefix are unclear, since
>   contexts are not clearly defined.
>
> - stripFirstSpace is not defined.

stripFirstSpace(s) returns s with the first character removed if the first
character is a space and otherwise returns s.  The idea is that

## This is a comment

turns into

  <a:documentation>This is a comment</a:documentation>

not

  <a:documentation> This is a comment</a:documentation>

> - Media types RFC should be introduced as normative references.

Where should it be referenced?  What should the text say when it references
it?

> - I do not quite understand A.2.5.  I might be wrong, but comments
>   beginning with not ## but # do not appear to be addressed anywhere
>   in Appendix A.

They are handled by separator.

James
Next in thread → Next in month →