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


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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

Subject: [relax-ng] Re: [relax-ng-comment] Annotations in compact syntaxcausing non-well-formed translations

I think the best way to deal with this is to add a constraint to the pattern
alternative of topLevelBody that requires the result to be a single element.


----- Original Message -----
From: "David Rosenborg" <david.rosenborg@pantor.com>
To: <relax-ng-comment@lists.oasis-open.org>
Sent: Saturday, September 28, 2002 4:23 PM
Subject: [relax-ng-comment] Annotations in compact syntax causing
non-well-formed translations

I might have missed something in the grammar, but I think
the following compact schema is allowed by the grammar:

## Oops
"Just a value pattern"

The problem is that this will be translated into a document with
more than one document element. Even though there
is a "catch all" constraint saying "A textual object is a correct
RELAX NG Compact Syntax schema if the result of the translation
is a correct RELAX NG schema.", I think this could be made
more explicit in the grammar. Or at least it should be mentioned
in a note that this and similar constructs are not allowed.

The schema <value>Just a value pattern</value> is of course not
a correct schema by it self but must be included by <externalRef/>
from another schema.
However, you can easily create other schemas that would be correct
by them selves if it were not for the malplaced annotation:

namespace a = "http://bad.annotations.org/";
element foo { empty } >> a:oops [ ]


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

Powered by eList eXpress LLC