atom feed23 messages in org.oasis-open.lists.relax-ng-commentRE: [relax-ng-comment] annotations: a...
FromSent OnAttachments
Daniel PragerSep 26, 2002 7:48 pm 
Michael FitzgeraldSep 27, 2002 10:34 am 
Michael FitzgeraldSep 27, 2002 5:02 pm 
Michael FitzgeraldSep 28, 2002 11:31 pm 
Daniel PragerSep 29, 2002 6:41 pm 
Eddie RobertssonSep 29, 2002 7:16 pm 
Daniel PragerSep 29, 2002 8:37 pm 
Rick JelliffeSep 29, 2002 9:11 pm 
Daniel PragerSep 29, 2002 9:41 pm 
Rick JelliffeSep 30, 2002 2:04 am 
Yonekura KojiSep 30, 2002 3:28 am 
Robert KobergOct 7, 2002 11:05 am 
didier demanyOct 8, 2002 1:35 am 
Robert KobergOct 8, 2002 1:45 am 
Robert KobergOct 8, 2002 1:48 am 
Kohsuke KAWAGUCHIOct 8, 2002 6:32 am 
Robert KobergOct 9, 2002 11:50 am 
MURATA Makoto (FAMILY Given)Oct 9, 2002 5:26 pm 
Eddie RobertssonOct 14, 2002 4:24 pm 
Robert KobergDec 3, 2002 6:52 am 
Michael FitzgeraldDec 3, 2002 8:43 am 
James ClarkDec 3, 2002 8:57 pm 
Robert KobergDec 4, 2002 3:09 am 
Subject:RE: [relax-ng-comment] annotations: am I straying too far?
From:Michael Fitzgerald (mi@wyeast.net)
Date:Dec 3, 2002 8:43:59 am
List:org.oasis-open.lists.relax-ng-comment

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:ro@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