OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

dita message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Proposed Resolution to XSD Generation Issue WRT Enabling Constraint

The technical issue (or at least one such issue) is that sequence groups
cannot be directly constrained due to requirements of XSD redefine, e.g.,
the content model of taskbody.

The solution used for 1.2 was to use named groups within taskbody, where
each named group is just an OR group, which can then be constrained all
the way to being an empty group.

However, the groups used in the 1.2 XSD do not directly correspond to
anything in the DTD and likewise nothing in the RNG (which reflect the DTD
structure as literally as possible).

Likewise, the approach used for taskbody was not applied to all sequence
groups in DITA (e.g., prolog, which is also a sequence group). Any such
sequence group cannot be constrained such that components are omitted
without modifying the OASIS-provided XSD declarations.

For today I've simply hard-coded the generation of the taskbody content
model and the corresponding strict task constraint but that is not a
general solution and does not address the problem of enabling constraint
of other sequence groups.

One possible generation solution would be to modify the XSD generation
such that sequence groups are always converted to sequences of named
groups where the groups are OR groups. This would make all sequence groups
inherently constrainable but would make the 1.3 XSDs materially different
from the 1.2 XSDs.

However, we recognize that the intersection of the people using XSDs with
the people using constraints applied to sequence groups is probably
vanishingly small since nobody is aware of anybody reporting this issue to
date. I only realized it in the context of implementing the XSD generation.

Therefore, it seems like a reasonable approach to change the rules for XSD
for 1.3 so that they are inherently constrainable.

However, I'm not 100% sure that this is sufficient to allow all possible
constraints--will require some experimentation. But based on my initial
tests it appears to work.

Implementing this would require analyzing the RNG patterns that are
sequences to produce the smallest number of named groups but I don't think
that should be too hard.


Eliot Kimber, Owner
Contrext, LLC

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]