I'm working on a schema, needing to validate a list of attribute
values. I was happy for a colleagues to point out the "list" pattern
in RNG (having never known about it), but I'm having problems with it.
Here's the fragment:
div {
choose = element cs:choose { if, else-if*, else? }
if = element cs:if { condition, text }
else-if = element cs:else-if { condition, text }
else = element cs:else { text }
condition =
(attribute type {
list { cs-types }
}
| attribute variable {
list { variables }
}),
attribute match { "all" | "any" }?
}
I was happy to see that oXygen will handle this as I expect, giving me
a list of completion options, such that I can end up with:
<choose>
<if match="any" type="article book chapter">...</if>
<else-if match="all" variable="collection-title
container-title">...</else-if>
</choose>
Now, the problem: both oXygen (which uses Jing) and RNV validate thee
attribute values as errors. Example from RNV:
test.xml:6:6: error: attribute ^type with invalid value "article book chapter"
required:
value ^token "article"
value ^token "book"
value ^token "chapter"
>From oXygen/Jing:
E bad value for attribute "type"
So what's going on?
I see two possibilities:
1) user error (I'm missing something)
2) tool bugs (list is not well-supported in validators)
Bruce