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: Re: [relax-ng] Proposal: remove annotations from the compact syntax



> I thought of an alternative, less unattractive syntax for annotations
(very
> late, I admit). Instead of:
>
> namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0";
>
> [ a:annotation [ "glip glop glorp" ]
>
> We have this:
>
> namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0";
>
> a:annotation { "glip glop glorp" }

This would be ambiguous:

 foo:bar { att = "value" }

could be a datatype foo:bar with parameter att="value" or an annotation
element

 <foo:bar att="value"/>

?  It would be very messy to distinguish these on the basis of how the
prefix was declared.

If you are going to propose alternative syntaxes you need to consider
annotation attributes as well.  Square brackets are used consistently to
enclose a list of attributes followed by a list of children.  When you see
something like

[ a:annotation [ "glip glop glorp" ] ]

the outer square brackets are not restricted to contain a single element,
but can contain zero or more attributes followed by zero or more elements.
Similarly the inner square brackets also contain zero or more attributes
followed by zero or more elements/strings.  Note also that at the top-level
you can have annotation elements without surrounding square brackets, which
will appear as siblings of the <define>s.

James




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


Powered by eList eXpress LLC