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] annotations: am I straying too far?



> I use RNG Schemas to build property forms and drive WYSIWYG editing (I am
> loving it!). In so doing I am making up my own annotations for the GUI
> and for documentation.

That's exactly the way annotations are intended to be used.

> The "RELAX NG DTD Compatibility Annotations" shows a limited set of
> options.

These are just some standard annotations you can use if you want and they 
meet your needs.  They are not at all intended to be exhaustive.

> I was wondering if there was an extensibility mechanism planned

The extensibility mechanism is in RELAX NG itself, rather than in RELAX NG 
DTD Compatibility.  The latter takes advantage of the former.
>
> For a simple example, I want to give a descriptive label and rollover
> description for attributes in a properties form:
>
>   <rng:define name="title.attr">
>     <rng:attribute name="title">
>       <a:attr label="Title">
>         <a:description>A text title</a:description>
>       </a:attr>
>       <rng:data type="token"/>
>     </rng:attribute>
>   </rng:define>
>
> Am I going to be in trouble by doing this or is it a reasonable thing to
> do?

It's reasonable.

> Also, why does the annotation need to be a child?

You can put your annotations anywhere you like (that is allowed by RELAX 
NG).  However, it can make things difficult for applications that want to 
deal with RELAX NG generically and want to handle annotations if different 
annotations have a different relationship to the RELAX NG element that they 
semantically apply to (e.g. if some wrap and some are children).  For 
example, the compact syntax works best if child annotation elements 
semantically apply to the parent RELAX NG element.

> I would prefer to wrap
> some definitions in annotations so I can group them for documentation
> purposes.

That's fine, though you might consider putting the annotation as a child of 
an rng:div that wraps the definitions.

James



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


Powered by eList eXpress LLC