OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: [relax-ng-comment] Abbreviated compact syntax (Re: Compact syntaxis not compact enough. Why?)




> using a subtle roadsigns ( < and > ) to
> differentiate  between <element> and 'reference'

I don't want the difference between an element name and a reference to be
subtle. I want it to be blindingly obvious.

> RELAX NG addresses the same problem, using the
> word 'element' as a roadsign and I think it makes a
> mistake, because not a single preceding engine
> solves this ('referencing') problem with *that*
> kind of solution (introducing special keyword).

Consider struct/union/enum in C.  Or even Java: bare names are references;
the class keyword is followed by a class name and then the definition of the
class.

> If <element> is confusing, we may
> agree on some other roadsign ( like #for_example )
> to differentiate between elements and non-elements.

The problem is to find a roadsign that will be obvious to the uninitiated.
The "element" keyword does achieve this.  If there was something that had
all the virtues of the "element" keyword while being terser, I would be all
for it.  I have explained what I think the problems with <> are.

> I mean, for example
>
> library
> {
>   book
>   {
>     @id { #text }, @available { #text},
>     isbn { #text },
>     title {@xml:lang {#text}, #text},
>     author {@id {#text}, name {#text}, born {#text}, dead {#text}?}*,
>     character {@id {#text}, name {#text}, born {#text}, qualification
> {#text}}*
>   } +
> }

That doesn't solve the problem of recognizing in

  foo | bar | baz { ... }

that foo is an element name rather than a reference.  Requiring arbitrary
lookahead to disambiguate is bad not just for machines but for humans as
well.  If you don't have roadsign in front of elements, then I think you
need to have a roadsign in front of references (e.g. $) and probably a
roadsign in front of keywords (e.g. # as you suggest).

James









[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC