On 09/16/2015 11:29 PM, Leif Halvard Silli (russisk.no) wrote:
I am not capable of evaluting those specs right now. I note what you say
versus what Michal Kay (on the page I linked to above) says:
]]
In XSD 1.0 you can allow these attributes (and many others of course) by
use of an xs:anyAttribute wildcard.
In XSD 1.1 you can then constrain the attribute names that match the
wildcard using assertions.»
[[
However, I can see that the XSD 1.0 option generally probably isn’t any
useful, since it seems that in order to, in accordance with HTMl5, allow
data-* on any element, one would have to allow *any* attribute
everywhere … Meaning that there would not really be any attribute level
valiation of attributes …
What Michael Kay has written above is correct.
What I have written:
---
* XSD 1.1 attribute wildcards do not allow to specify data-* attributes.
* XSD 1.1 assertions are just like Schematron rules. Both technologies
cannot be used to express the grammar of an XML vocabulary.
---
is correct too.
The word not to be missed in Michael Kay's second sentence:
---
In XSD 1.1 you can then constrain the attribute names that match the
wildcard using assertions
---
is word "then". Notice that "In XSD 1.0 you can ..." is followed by "In
XSD 1.1 you can *then* ...".
In a nutshell, in XSD 1.1, first allow any attribute in the content
model of all elements and then assert that the only allowed attribute
names are prefixed by "data-". Not very elegant and anyway would not
help XMLmind XML Editor which is grammar-driven.
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support