Yup. Glad you pointed that out. Because it is not insane, even if a bad idea, to allow references to attributes in <content>. That's how RELAX NG handles it. This: | <content> | <alternate minOccurs="1" maxOccurs="1"> | <classRef key="att.datable.iso" include="when-w3c"/> | <dataRef name="xs:date"/> | </alternate> | </content> makes perfect sense to me, and can be represented in RELAX NG as: | ( att.datable.w3c.attribute.when | xsd:date ) No reason, I don't think, that the plurals or <sequence> wouldn't work, either, but that would be a heavy load on the Stylesheets.[1] Notes ----- [1] Note that in RELAX NG, "att.datable.w3c.attribute.when*" is valid, but "xsd:date*" is not. I guess that's because RELAX NG knows that an attribute cannot be repeated, but does not know how to repeat a string. (Need to use the 'list' construct if you want to repeat a string.)
I think #3 is interesting:
3. content/descendent::classRef[ starts-with( @key, 'att.') ]
If a classRef appears within an alternate[@maxOccurs="1"], then presumably it _should_ mean that the element would either have those attributes, or it would allow another descendant element, but not both. That would be kind of useful, although horrible to process, and presumably better achieved with Schematron.