I would like to define an alternation of patterns of up to three
attributes, where the datatype of attribute.2 and attribute.3 is
uniform and depends on the value of attribute.1.
Something like the following (in *pseudo-markup*):
data.pointer, data.pointer </rng:group>
<rng:group> "character", data.nonNegativeInteger,
<rng:group> "byte_offset", data.nonNegativeInteger,
data.integer, data.integer </rng:group>
I could do that in RNG, but can I do that in ODD as well?
If I understand correctly, ODD expects me to list the three attDef
declarations in an <attList> for my new class, and to declare
a new data type that groups the data types that I need for
attribute.2 and attribute.3, and to make the value of attribute.1 a
closed list, and then to slam a huuuge piece of Schematron onto this
(hopefully inside this very class definition; I haven't checked
that) that would attempt to rule out unwanted sequences.
Is my diagnosis correct? I probably wouldn't mind being wrong.
I also admit to having a rather hazy idea of the extent of the
difference in "staticness" between listing potential patterns in an
RNG schema on the one hand, and defining them in the ODD on the
other. I mean, I am not really sure if I could <alternate> a
series of <sequence>s containing <attDef>s. Would I end
up defining a single attribute several times? Would/Should ODD allow
me to do that?
Thanks in advance,