James Clark wrote:
> How can an a:documentation element be applied to a value element?
>
> At the moment, the spec follows XSD and RELAX Core in making
> a:documentation apply to the parent element. This presents a problem for
> the value element and the other elements that take text content and hence
> do not allow child elements (value, param and name).
True. I have already encountred this problem while converting a large DTD.
>The spec suggests one
> workaround: wrap the value in a group.
Or, use a <choice> containing a single <data>, when we use <data> in <except>.
> Other possibilities are:
>
> a) Add an a:documentation attribute. This doesn't completely solve the
> problem in that you can have multiple a:documentation elements (for
> example, each a:documentation element might be in a separate language
> identified by an xml:lang attribute), but only a single a:documentation
> attribute would be possible.
I would like to have a consistent solution. We always use attributes
or always use elements.
> b) Say that an a:documentation element can be applied to a value, param or
> name element by making it a following sibling of the value, param or name
> element.
I don't like it, since people will be confused.
> c) Make some change to RELAX NG itself. For example, allow the div element
> where patterns and/or name classes are allowed.
I like addition of some specialized wrapper elements rather than <div>.
Cheers,
Makoto