[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?
There is nothing wrong with what you are doing with a:attr/a:description. You are not straying too far. As you probably already know, step #1 (4.1) of simplification is to discard foreign elements and attributes. As far as a conforming RELAX NG processor is concerned, foreign elements and attributes just go hasta la bye-bye. The <a:documentation> element may not have children and that very likely will not change in the future, but you could use XHTML or DocBook or SmartDoc or whatever you want. As I recall our discussions on <a:documentation>, the committee decided not to get into the business of providing more elaborate documentation markup because there are other, more familiar vocabularies that are readily available. I believe that the reason why an annotation must be a child is that when foreign elements are discarded in step #1, it discards child elements as well, so that if <define> were a child of an annotation, it would disappear at validation time as well. However, you can use <rng:div> for wrapping annotations; in fact, that's its main purpose. For example, this should work. <rng:div a:contains="label"> <a:attr label="Title"> <a:description>A text title</a:description> </a:attr> <rng:define name="title.attr"> <rng:attribute name="title"> <rng:data type="token"/> </rng:attribute> </rng:define> </rng:div> Hope this helps. Mike > -----Original Message----- > From: Robert Koberg [mailto:rob@livestoryboard.com] > Sent: Tuesday, December 03, 2002 6:48 AM > To: relax-ng > Subject: [relax-ng-comment] annotations: am I straying too far? > > > Hi, > > 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. The schema and the content still validates using > the Jing task. > > The "RELAX NG DTD Compatibility Annotations" shows a limited set > of options. I > was wondering if there was an extensibility mechanism planned (or > present where > I don't have to maintain my own RNG validating Schema). > > 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? > > Also, why does the annotation need to be a child? I would prefer > to wrap some > definitions in annotations so I can group them for documentation purposes. > > thanks for any advice/clarification, > -Rob > > > > ---------------------------------------------------------------- > To subscribe or unsubscribe from this elist use the subscription > manager: <http://lists.oasis-open.org/ob/adm.pl> >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC