[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Annotation issue: applying a:documentation to value
> I like addition of some specialized wrapper elements rather than <div>.
There are two things we can wrap. We can put the wrapper around the value,
param ane name elements, or we can put it around the content of these
elements.
I think it is going to work out cleanest to put the wrapper around the
content, eg
<value>
<a:documentation>Japan</a:documentation>
<content>JP</content>
</value>
That way, we don't have to special case the rules for what a:documentation
applies to: it always applies to the parent. <content> itself wouldn't be
allowed to have annotation attributes. Thus in all places where the
content of an RELAX NG element is currently <data type="X"/> it would become
<choice>
<data type="X"/>
<interleave>
<element name="content">
<data type="X"/>
</element>
<ref name="other"/>
</interleave>
</choice>
Is there a better name than <content>?
At first I thought it would be better to have a wrapper around arbitrary
patterns, so that for example you could use it to implement something like
our old key/keyRef elements as annotations. The trouble is that is that
you use the wrapper element for something like key/keyRef then you might
want to apply a documentation to that wrapper element. Also it's just too
similar to <group>. You can ALWAYS use a group around a single pattern in
any case where you could use that pattern (even in <except>) because schema
simplication replaces a group containing a single pattern by that pattern.
James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC