Jeff Hooker wrote:
>  
> Docbook's profiling attributes allow users, in theory, to enter more
> than one attribute value in each attribute. If the "audience" attribute
> has three possible values (e.g. internal, external, reviewer), you could
> define an element as belonging to both the internal and reviewer
> audience (i.e. NOT external) by writing it as audience="internal; reviewer".
>  
> The problem arises when actually trying to allow users to enter the
> multiple values. Since the values are defined within the schema, they
> appear as a drop-down list in XXE, forcing users to pick only one at a
> time. This is completely reasonable, since while the publishing scripts
> understand the meaning of values separated by a semicolon, there is no
> way of explaining to a schema, so XXE interprets the schema and manages
> the presentation. Ideally, however, they would appear as a pick list so
> that users could select more than one of the values.
>  
> I understand that this cuts directly against XXE's grain; basically
> setting it up so that users can create an invalid document. That said,
> is there any way of doing this?
>  

No, there is no way to make XXE allow users to specify something which
does not conform to the schema.

You seem to have already modified the schema to specify:

audience=internal|external|reviewer

So why not modify it to specify all the possible combinations?

audience=internal|external|reviewer|internal;external|...|internal;external;reviewer

With 3 atomic values, this is not a big deal.

With more than 3 ou 4 atomic values, do not use an enumeration. Instead
use a more free form attribute (CDATA). With DocBook 5, you can
constrain the attribute value with a regexp.





Reply via email to